Skip to main content

Google Cloud Compute

This Integration is part of the Google Cloud Compute Pack.#

Google Compute Engine delivers virtual machines running in Google's innovative data centers and worldwide fiber network. Compute Engine's tooling and workflow support enable scaling from single instances to global, load-balanced cloud computing.

Configure Google Cloud Compute on Cortex XSOAR#

  1. Navigate to Settings > Integrations > Servers & Services.
  2. Search for Google Cloud Compute.
  3. Click Add instance to create and configure a new integration instance.
ParameterDescriptionRequired
serviceService Account Private Key file contents (JSON)True
proxyUse system proxy settingsFalse
default_search_scopeWhat is the top level object to search in (usually a project or organization in format of organization/XX).False
  1. Click Test to validate the URLs, token, and connection.

Create a Service Account#

  1. Go to the Google documentation and follow the procedure in the Creating a Service Account section. After you create a service account, a Service Account Private Key file is downloaded. You will need this file when configuring an instance of the integration.
  2. Grant the Compute Admin permission to the Service Account to enable the Service Account to perform certain Google Cloud API commands.
  3. In Cortex XSOAR, configure an instance of the Google Cloud Compute integration. For the Service Account Private Key parameter, add the Service Account Private Key file contents (JSON).

Commands#

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.

gcp-compute-insert-instance#


Creates an instance resource in the specified project using the data included in the request.

Base Command#

gcp-compute-insert-instance

Input#
Argument NameDescriptionRequired
nameThe 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.Required
descriptionAn optional description of this resource. Provide this property when you create the resource.Optional
zoneThe name of the zone for this request.Required
tagsTags 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.Optional
tagsFingerprintSpecifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.Optional
canIpForwardAllows 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.Optional
machine_typeThe machine type EX: n1-standard-1 or custom-4-5120Optional
networkURL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.Optional
subnetworkThe URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL.Optional
networkIPAn IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.Optional
networkInterfacesfingerprintFingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.Optional
externalInternetAccessThis will set accessConfigs to type ONE_TO_ONE_NAT and name to External NATOptional
externalNatIPAn 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.Optional
setPublicPtrSpecifies whether a public DNS ‘PTR’ record should be created to map the external IP address of the instance to a DNS domain name.Optional
publicPtrDomainNameThe DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled.Optional
networkTierThis signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.Optional
ipCidrRangeThe IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 0.0.0.0), a netmask (e.g. /24) or a CIDR format string (e.g. 0.0.0.0/24).Optional
subnetworkRangeNameOptional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.Optional
diskTypeSpecifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.Optional
diskModeThe 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.Optional
diskSourceSpecifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name, not the URL for the disk.Optional
diskDeviceNameSpecifies 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.Optional
diskBootIndicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.Optional
initializeParamsDiskNameSpecifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.Optional
initializeParamsSourceImageThe source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDDOptional
initializeParamsdiskSizeGbSpecifies the size of the disk in base-2 GB.Optional
initializeParamsDiskTypeSpecifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example: https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL.Optional
initializeParamsSourceImageEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
initializeParamsSourceImageEncryptionKeykmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
initializeParamsDiskLabelsLabels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks. EX: key=abc,value=123;key=abc,value=123Optional
initializeParamsDiskDescriptionAn optional description. Provide this property when creating the disk.Optional
diskAutodeleteSpecifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).Optional
diskInterfaceSpecifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.Optional
diskGuestOsFeaturesA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. comma separated.Optional
diskEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
diskEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
metadataItemsThe metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. EX: key=abc,value=123;key=abc,value=123Optional
serviceAccountEmailEmail address of the service account.Optional
serviceAccountscopesThe list of scopes to be made available for this service account.Optional
schedulingOnHostMaintenanceDefines 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 Instance Scheduling Options.Optional
schedulingAutomaticRestartSpecifies 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. By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.Optional
schedulingPreemptibleDefines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.Optional
labelsLabels to apply to this instance. These can be later modified by the setLabels method. key=abc,value=123;key=abc,value=123Optional
labelFingerprintA 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.Optional
minCpuPlatformSpecifies 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".Optional
guestAcceleratorsAcceleratorTypeFull or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.Optional
guestAcceleratorsAcceleratorCountThe number of the guest accelerator cards exposed to this instance.Optional
deletionProtectionWhether the resource should be protected against deletion.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-get-image-from-family#


Returns the latest image that is part of an image family and is not deprecated.

Base Command#

gcp-compute-get-image-from-family

Input#
Argument NameDescriptionRequired
projectProject ID for this request.Required
familyName of the image family to search for.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Images.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Images.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Images.namestringName 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.
GoogleCloudCompute.Images.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Images.sourceTypestringThe type of the image used to create this disk. The default and only value is RAW
GoogleCloudCompute.Images.rawDiskstringThe parameters of the raw disk image.
GoogleCloudCompute.Images.rawDisk.sourcestringThe full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
GoogleCloudCompute.Images.rawDisk.sha1ChecksumstringAn optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
GoogleCloudCompute.Images.rawDisk.containerTypestringThe format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
GoogleCloudCompute.Images.deprecatedstringThe deprecation status associated with this image.
GoogleCloudCompute.Images.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.Images.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.Images.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Images.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Images.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Images.statusstringThe status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
GoogleCloudCompute.Images.archiveSizeBytesstringSize of the image tar.gz archive stored in Google Cloud Storage (in bytes).
GoogleCloudCompute.Images.diskSizeGbstringSize of the image when restored onto a persistent disk (in GB).
GoogleCloudCompute.Images.sourceDiskstringURL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values: https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk , projects/project/zones/zone/disks/disk , zones/zone/disks/disk
GoogleCloudCompute.Images.sourceDiskIdstringThe ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
GoogleCloudCompute.Images.licensesstringAny applicable license URI.
GoogleCloudCompute.Images.familystringThe name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
GoogleCloudCompute.Images.imageEncryptionKeystringEncrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
GoogleCloudCompute.Images.imageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.imageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.imageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.sourceDiskEncryptionKeystringThe customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Images.labelsstringLabels to apply to this image. These can be later modified by the setLabels method.
GoogleCloudCompute.Images.labelFingerprintstringA fingerprint for the labels being applied to this image, which is essentially a hash of the labels 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Images.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Images.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Images.licenseCodesstringInteger license codes indicating which licenses are attached to this image.
GoogleCloudCompute.Images.sourceImagestringURL of the source image used to create this image. This can be a full or valid partial URL.
GoogleCloudCompute.Images.sourceImageIdstringThe ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
GoogleCloudCompute.Images.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.sourceSnapshotstringURL of the source snapshot used to create this image. This can be a full or valid partial URL.
GoogleCloudCompute.Images.sourceSnapshotIdstringThe ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKeystringThe customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.kindstringType of the resource. Always compute#image for images.
Command Example#

Human Readable Output#

gcp-compute-get-network#


Returns the specified network.

Base Command#

gcp-compute-get-network

Input#
Argument NameDescriptionRequired
networkName of the network to return.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Networks.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Networks.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Networks.namestringName 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.
GoogleCloudCompute.Networks.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Networks.gatewayIPv4stringThe gateway address for default routing out of the network. This value is read only and is selected by GCP.
GoogleCloudCompute.Networks.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Networks.autoCreateSubnetworksbooleanWhen set to true, the VPC network is created in "auto" mode. When set to false, the VPC network is created in "custom" mode.
GoogleCloudCompute.Networks.subnetworksstringServer-defined fully-qualified URLs for all subnetworks in this VPC network.
GoogleCloudCompute.Networks.peeringsstringA list of network peerings for the resource.
GoogleCloudCompute.Networks.peerings.namestringName of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
GoogleCloudCompute.Networks.peerings.networkstringThe URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.
GoogleCloudCompute.Networks.peerings.statestringState for the peering.
GoogleCloudCompute.Networks.peerings.stateDetailsstringDetails about the current state of the peering.
GoogleCloudCompute.Networks.peerings.autoCreateRoutesbooleanThis field will be deprecated soon. Prefer using exchangeSubnetRoutes instead. Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.
GoogleCloudCompute.Networks.peerings.exchangeSubnetRoutesbooleanWhether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.
GoogleCloudCompute.Networks.routingConfigstringThe network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.
GoogleCloudCompute.Networks.routingConfig.routingModestringThe network-wide routing mode to use. If set to REGIONAL, this networks cloud routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this networks cloud routers will advertise routes with all subnets of this network, across regions.
GoogleCloudCompute.Networks.kindstringType of the resource. Always compute#network for networks.
Command Example#

!gcp-compute-get-network network=default

Context Example#
{
"GoogleCloudCompute": {
"Networks": {
"autoCreateSubnetworks": true,
"creationTimestamp": "creationTimestamp",
"description": "Default network for the project",
"id": "42",
"kind": "compute#network",
"name": "default",
"routingConfig": {
"routingMode": "REGIONAL"
},
"selfLink": "selfLink",
"subnetworks": [
"https://www.mockapi.com/regions/us-central1/subnetworks/default"
]
}
}
}
Human Readable Output#

Google Cloud Compute Networks#

idname
42default

gcp-compute-list-instances#


Retrieves the list of instances contained within the specified zone.

Base Command#

gcp-compute-list-instances

Input#
Argument NameDescriptionRequired
zoneThe name of the zone for this request.Required
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Instances.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Instances.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Instances.namestringThe 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.
GoogleCloudCompute.Instances.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Instances.tagsstringTags 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.
GoogleCloudCompute.Instances.tags.itemsstringAn array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.Instances.tags.fingerprintstringSpecifies a fingerprint for this request, which is essentially a hash of the tags contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
GoogleCloudCompute.Instances.machineTypestringFull 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.
GoogleCloudCompute.Instances.statusstringThe status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
GoogleCloudCompute.Instances.statusMessagestringAn optional, human-readable explanation of the status.
GoogleCloudCompute.Instances.zonestringURL 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.
GoogleCloudCompute.Instances.canIpForwardbooleanAllows 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.
GoogleCloudCompute.Instances.networkInterfacesstringAn 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.
GoogleCloudCompute.Instances.networkInterfaces.networkstringURL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
GoogleCloudCompute.Instances.networkInterfaces.subnetworkstringThe URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL
GoogleCloudCompute.Instances.networkInterfaces.networkIPstringAn IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
GoogleCloudCompute.Instances.networkInterfaces.namestringThe name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigsstringAn array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.typestringThe type of configuration. The default and only option is ONE_TO_ONE_NAT.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.namestringThe name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.natIPstringAn 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.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.setPublicPtrbooleanSpecifies whether a public DNS ‘PTR’ record should be created to map the external IP address of the instance to a DNS domain name.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.publicPtrDomainNamestringThe DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.networkTierstringThis signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.kindstringType of the resource. Always compute#accessConfig for access configs.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRangesstringAn array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.ipCidrRangestringThe IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 0.0.0.0), a netmask (e.g. /24) or a CIDR format string (e.g. 0.0.0.0/24).
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.subnetworkRangeNamestringOptional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
GoogleCloudCompute.Instances.networkInterfaces.fingerprintstringFingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Instances.networkInterfaces.kindstringType of the resource. Always compute#networkInterface for network interfaces.
GoogleCloudCompute.Instances.disksstringArray of disks associated with this instance. Persistent disks must be created before you can assign them.
GoogleCloudCompute.Instances.disks.typestringSpecifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
GoogleCloudCompute.Instances.disks.modestringThe 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.
GoogleCloudCompute.Instances.disks.sourcestringSpecifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
GoogleCloudCompute.Instances.disks.deviceNamestringSpecifies 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.
GoogleCloudCompute.Instances.disks.indexnumberA zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
GoogleCloudCompute.Instances.disks.bootbooleanIndicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
GoogleCloudCompute.Instances.disks.initializeParamsstringSpecifies 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.
GoogleCloudCompute.Instances.disks.initializeParams.diskNamestringSpecifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImagestringThe source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
GoogleCloudCompute.Instances.disks.initializeParams.diskSizeGbstringSpecifies the size of the disk in base-2 GB.
GoogleCloudCompute.Instances.disks.initializeParams.diskTypestringSpecifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.initializeParams.labelsstringLabels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
GoogleCloudCompute.Instances.disks.initializeParams.labels.keystringThe disk label key.
GoogleCloudCompute.Instances.disks.initializeParams.labels.valuestringThe disk label value.
GoogleCloudCompute.Instances.disks.initializeParams.descriptionstringAn optional description. Provide this property when creating the disk.
GoogleCloudCompute.Instances.disks.autoDeletebooleanSpecifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
GoogleCloudCompute.Instances.disks.licensesstringAny valid publicly visible licenses.
GoogleCloudCompute.Instances.disks.interfacestringSpecifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
GoogleCloudCompute.Instances.disks.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.diskEncryptionKeystringEncrypts or decrypts a disk using a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.kindstringType of the resource. Always compute#attachedDisk for attached disks.
GoogleCloudCompute.Instances.metadatastringThe metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
GoogleCloudCompute.Instances.metadata.fingerprintstringSpecifies a fingerprint for this request, which is essentially a hash of the metadatas 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Instances.metadata.itemsstringArray of key/value pairs. The total size of all keys and values must be less than 512 KB.
GoogleCloudCompute.Instances.metadata.items.keystringKey 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.
GoogleCloudCompute.Instances.metadata.items.valuestringValue 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 42 bytes (256 KiB).
GoogleCloudCompute.Instances.metadata.kindstringType of the resource. Always compute#metadata for metadata.
GoogleCloudCompute.Instances.serviceAccountsstringA list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
GoogleCloudCompute.Instances.serviceAccounts.emailstringEmail address of the service account.
GoogleCloudCompute.Instances.serviceAccounts.scopesstringThe list of scopes to be made available for this service account
GoogleCloudCompute.Instances.selfLinkstringServer-defined URL for this resource.
GoogleCloudCompute.Instances.schedulingstringSets the scheduling options for this instance.
GoogleCloudCompute.Instances.scheduling.onHostMaintenancestringDefines 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 Instance Scheduling Options.
GoogleCloudCompute.Instances.scheduling.automaticRestartbooleanSpecifies 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.
GoogleCloudCompute.Instances.scheduling.preemptiblebooleanDefines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
GoogleCloudCompute.Instances.scheduling.nodeAffinitiesstringA set of node affinity and anti-affinity.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.keystringCorresponds to the label key of Node resource.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.operatorstringDefines the operation of node selection.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.valuesstringCorresponds to the label values of Node resource.
GoogleCloudCompute.Instances.cpuPlatformstringThe CPU platform used by this instance.
GoogleCloudCompute.Instances.labelsstringLabels to apply to this instance. These can be later modified by the setLabels method.
GoogleCloudCompute.Instances.labels.keystringThe label key.
GoogleCloudCompute.Instances.labels.valuestringThe label value.
GoogleCloudCompute.Instances.labelFingerprintstringA fingerprint for this request, which is essentially a hash of the labels 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.
GoogleCloudCompute.Instances.minCpuPlatformstringSpecifies 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".
GoogleCloudCompute.Instances.guestAcceleratorsstringA list of the type and count of accelerator cards attached to the instance.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorTypestringFull or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorCountstringThe number of the guest accelerator cards exposed to this instance.
GoogleCloudCompute.Instances.startRestrictedbooleanWhether a VM has been restricted for start because Compute Engine has detected suspicious activity.
GoogleCloudCompute.Instances.deletionProtectionbooleanWhether the resource should be protected against deletion.
GoogleCloudCompute.Instances.hostnamestringHostname
GoogleCloudCompute.Instances.kindstring] Type of the resource. Always compute#instance for instances.
Command Example#

!gcp-compute-list-instances zone=europe-west2-a

Context Example#
{
"GoogleCloudCompute": {
"Instances": [
{
"canIpForward": true,
"cpuPlatform": "Intel Broadwell",
"creationTimestamp": "creationTimestamp",
"deletionProtection": false,
"disks": [
{
"autoDelete": true,
"boot": true,
"deviceName": "persistent-disk-0",
"diskSizeGb": "100",
"guestOsFeatures": [
{
"type": "VIRTIO_SCSI_MULTIQUEUE"
},
{
"type": "UEFI_COMPATIBLE"
}
],
"index": 0,
"interface": "SCSI",
"kind": "compute#attachedDisk",
"licenses": [
"https://www.mockapi.com/global/licenses/gke-node"
],
"mode": "READ_WRITE",
"source": "https://www.mockapi.com/zones/disks/mock-disk",
"type": "PERSISTENT"
}
],
"fingerprint": "fingerprint",
"id": "42",
"kind": "compute#instance",
"labelFingerprint": "labelFingerprint",
"labels": {
},
"machineType": "https://www.mockapi.com/zones//machineTypes/mock-machine",
"metadata": {
"fingerprint": "fingerprint",
"items": [
{
"key": "key",
"value": "value"
}
],
"kind": "compute#metadata"
},
"name": "mock-disk",
"networkInterfaces": [
{
"accessConfigs": [
{
"kind": "compute#accessConfig",
"name": "external-nat",
"natIP": "8.8.8.8",
"networkTier": "PREMIUM",
"type": "ONE_TO_ONE_NAT"
}
],
"aliasIpRanges": [
{
"ipCidrRange": "8.8.8.8",
"subnetworkRangeName": "mock-net-1-pods-42"
}
],
"fingerprint": "fingerprint",
"kind": "compute#networkInterface",
"name": "nic0",
"network": "network",
"networkIP": "8.8.8.8",
"subnetwork": "subnetwork"
}
],
"scheduling": {
"automaticRestart": true,
"onHostMaintenance": "MIGRATE",
"preemptible": false
},
"selfLink": "selfLink",
"serviceAccounts": [
{
"email": "email",
"scopes": [
"https://www.googleapis.com/auth/devstorage.read_only"
]
}
],
"shieldedInstanceConfig": {
"enableIntegrityMonitoring": true,
"enableSecureBoot": false,
"enableVtpm": true
},
"shieldedInstanceIntegrityPolicy": {
"updateAutoLearnPolicy": true
},
"startRestricted": false,
"status": "RUNNING",
"tags": {
"fingerprint": "fingerprint",
"items": [
"mock-net-1-42-node"
]
},
"zone": "https://www.mockapi.com/zones/"
}
]
}
}
Human Readable Output#

Google Cloud Compute Instances#

idmachineTypenamezone
42https://www.mockapi.com/zones//machineTypes/mock-machinemock-diskhttps://www.mockapi.com/zones/

gcp-compute-aggregated-list-instances#


Retrieves aggregated list of all of the instances in your project across all regions and zones.

Base Command#

gcp-compute-aggregated-list-instances

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Instances.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Instances.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Instances.namestringThe 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.
GoogleCloudCompute.Instances.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Instances.tagsstringTags 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.
GoogleCloudCompute.Instances.tags.itemsstringAn array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.Instances.tags.fingerprintstringSpecifies a fingerprint for this request, which is essentially a hash of the tags contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
GoogleCloudCompute.Instances.machineTypestringFull 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.
GoogleCloudCompute.Instances.statusstringThe status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
GoogleCloudCompute.Instances.statusMessagestringAn optional, human-readable explanation of the status.
GoogleCloudCompute.Instances.zonestringURL 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.
GoogleCloudCompute.Instances.canIpForwardbooleanAllows 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.
GoogleCloudCompute.Instances.networkInterfacesstringAn 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.
GoogleCloudCompute.Instances.networkInterfaces.networkstringURL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
GoogleCloudCompute.Instances.networkInterfaces.subnetworkstringThe URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL
GoogleCloudCompute.Instances.networkInterfaces.networkIPstringAn IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
GoogleCloudCompute.Instances.networkInterfaces.namestringThe name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigsstringAn array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.typestringThe type of configuration. The default and only option is ONE_TO_ONE_NAT.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.namestringThe name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.natIPstringAn 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.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.setPublicPtrbooleanSpecifies whether a public DNS ‘PTR’ record should be created to map the external IP address of the instance to a DNS domain name.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.publicPtrDomainNamestringThe DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.networkTierstringThis signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.kindstringType of the resource. Always compute#accessConfig for access configs.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRangesstringAn array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.ipCidrRangestringThe IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 0.0.0.0), a netmask (e.g. /24) or a CIDR format string (e.g. 0.0.0.0/24).
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.subnetworkRangeNamestringOptional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
GoogleCloudCompute.Instances.networkInterfaces.fingerprintstringFingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Instances.networkInterfaces.kindstringType of the resource. Always compute#networkInterface for network interfaces.
GoogleCloudCompute.Instances.disksstringArray of disks associated with this instance. Persistent disks must be created before you can assign them.
GoogleCloudCompute.Instances.disks.typestringSpecifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
GoogleCloudCompute.Instances.disks.modestringThe 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.
GoogleCloudCompute.Instances.disks.sourcestringSpecifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
GoogleCloudCompute.Instances.disks.deviceNamestringSpecifies 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.
GoogleCloudCompute.Instances.disks.indexnumberA zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
GoogleCloudCompute.Instances.disks.bootbooleanIndicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
GoogleCloudCompute.Instances.disks.initializeParamsstringSpecifies 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.
GoogleCloudCompute.Instances.disks.initializeParams.diskNamestringSpecifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImagestringThe source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
GoogleCloudCompute.Instances.disks.initializeParams.diskSizeGbstringSpecifies the size of the disk in base-2 GB.
GoogleCloudCompute.Instances.disks.initializeParams.diskTypestringSpecifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.initializeParams.labelsstringLabels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
GoogleCloudCompute.Instances.disks.initializeParams.labels.keystringThe disk label key.
GoogleCloudCompute.Instances.disks.initializeParams.labels.valuestringThe disk label value.
GoogleCloudCompute.Instances.disks.initializeParams.descriptionstringAn optional description. Provide this property when creating the disk.
GoogleCloudCompute.Instances.disks.autoDeletebooleanSpecifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
GoogleCloudCompute.Instances.disks.licensesstringAny valid publicly visible licenses.
GoogleCloudCompute.Instances.disks.interfacestringSpecifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
GoogleCloudCompute.Instances.disks.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.diskEncryptionKeystringEncrypts or decrypts a disk using a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.kindstringType of the resource. Always compute#attachedDisk for attached disks.
GoogleCloudCompute.Instances.metadatastringThe metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
GoogleCloudCompute.Instances.metadata.fingerprintstringSpecifies a fingerprint for this request, which is essentially a hash of the metadatas 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Instances.metadata.itemsstringArray of key/value pairs. The total size of all keys and values must be less than 512 KB.
GoogleCloudCompute.Instances.metadata.items.keystringKey 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.
GoogleCloudCompute.Instances.metadata.items.valuestringValue 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 42 bytes (256 KiB).
GoogleCloudCompute.Instances.metadata.kindstringType of the resource. Always compute#metadata for metadata.
GoogleCloudCompute.Instances.serviceAccountsstringA list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
GoogleCloudCompute.Instances.serviceAccounts.emailstringEmail address of the service account.
GoogleCloudCompute.Instances.serviceAccounts.scopesstringThe list of scopes to be made available for this service account
GoogleCloudCompute.Instances.selfLinkstringServer-defined URL for this resource.
GoogleCloudCompute.Instances.schedulingstringSets the scheduling options for this instance.
GoogleCloudCompute.Instances.scheduling.onHostMaintenancestringDefines 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 Instance Scheduling Options.
GoogleCloudCompute.Instances.scheduling.automaticRestartbooleanSpecifies 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.
GoogleCloudCompute.Instances.scheduling.preemptiblebooleanDefines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
GoogleCloudCompute.Instances.scheduling.nodeAffinitiesstringA set of node affinity and anti-affinity.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.keystringCorresponds to the label key of Node resource.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.operatorstringDefines the operation of node selection.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.valuesstringCorresponds to the label values of Node resource.
GoogleCloudCompute.Instances.cpuPlatformstringThe CPU platform used by this instance.
GoogleCloudCompute.Instances.labelsstringLabels to apply to this instance. These can be later modified by the setLabels method.
GoogleCloudCompute.Instances.labels.keystringThe label key.
GoogleCloudCompute.Instances.labels.valuestringThe label value.
GoogleCloudCompute.Instances.labelFingerprintstringA fingerprint for this request, which is essentially a hash of the labels 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.
GoogleCloudCompute.Instances.minCpuPlatformstringSpecifies 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".
GoogleCloudCompute.Instances.guestAcceleratorsstringA list of the type and count of accelerator cards attached to the instance.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorTypestringFull or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorCountstringThe number of the guest accelerator cards exposed to this instance.
GoogleCloudCompute.Instances.startRestrictedbooleanWhether a VM has been restricted for start because Compute Engine has detected suspicious activity.
GoogleCloudCompute.Instances.deletionProtectionbooleanWhether the resource should be protected against deletion.
GoogleCloudCompute.Instances.hostnamestringHostname
GoogleCloudCompute.Instances.kindstring] Type of the resource. Always compute#instance for instances.
Command Example#

!gcp-compute-aggregated-list-instances

Context Example#
{
"GoogleCloudCompute": {
"Instances": [
{
"canIpForward": false,
"cpuPlatform": "Unknown CPU Platform",
"creationTimestamp": "creationTimestamp",
"deletionProtection": false,
"description": "",
"disks": [
{
"autoDelete": true,
"boot": true,
"deviceName": "test01",
"diskSizeGb": "100",
"guestOsFeatures": [
{
"type": "UEFI_COMPATIBLE"
}
],
"index": 0,
"interface": "SCSI",
"kind": "compute#attachedDisk",
"licenses": [
"license"
],
"mode": "READ_WRITE",
"source": "source",
"type": "PERSISTENT"
}
],
"displayDevice": {
"enableDisplay": false
},
"fingerprint": "fingerprint",
"id": "42",
"kind": "compute#instance",
"labelFingerprint": "labelFingerprint",
"labels": {
"a123": "abc",
"a231": "cba"
},
"machineType": "machineType",
"metadata": {
"fingerprint": "fingerprint",
"kind": "compute#metadata"
},
"name": "test01",
"networkInterfaces": [
{
"accessConfigs": [
{
"kind": "compute#accessConfig",
"name": "External NAT",
"networkTier": "PREMIUM",
"type": "ONE_TO_ONE_NAT"
}
],
"fingerprint": "fingerprint",
"kind": "compute#networkInterface",
"name": "nic0",
"network": "network",
"networkIP": "8.8.8.8",
"subnetwork": "subnetwork"
}
],
"reservationAffinity": {
"consumeReservationType": "ANY_RESERVATION"
},
"scheduling": {
"automaticRestart": true,
"onHostMaintenance": "MIGRATE",
"preemptible": false
},
"selfLink": "selfLink",
"serviceAccounts": [
{
"email": "email",
"scopes": [
"https://www.googleapis.com/auth/devstorage.read_only"
]
}
],
"shieldedInstanceConfig": {
"enableIntegrityMonitoring": true,
"enableSecureBoot": false,
"enableVtpm": true
},
"shieldedInstanceIntegrityPolicy": {
"updateAutoLearnPolicy": true
},
"startRestricted": false,
"status": "TERMINATED",
"tags": {
"fingerprint": "fingerprint",
"items": [
"https-server"
]
},
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
]
}
}
Human Readable Output#

Google Cloud Compute Instances#

idmachineTypenamezone
42machineTypetest01https://www.mockapi.com/zones/europe-west2-c
42https://www.mockapi.com/zones//machineTypes/mock-machinemock-diskhttps://www.mockapi.com/zones/
42https://www.mockapi.com/zones//machineTypes/mock-machinemock_instance-8vkjhttps://www.mockapi.com/zones/
42https://www.mockapi.com/zones//machineTypes/mock-machinemock_instance-g4pthttps://www.mockapi.com/zones/
42https://www.mockapi.com/zones//machineTypes/mock-machinemock_instance-j381https://www.mockapi.com/zones/
42https://www.mockapi.com/zones//machineTypes/mock-machinemock_instance-j48zhttps://www.mockapi.com/zones/
42https://www.mockapi.com/zones//machineTypes/mock-machinemock_instance-wb7shttps://www.mockapi.com/zones/

gcp-compute-get-global-operation#


Retrieves the specified Operations resource. Gets a list of operations by making a list() request.

Base Command#

gcp-compute-get-global-operation

Input#
Argument NameDescriptionRequired
nameName of the Operations resource to return.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-get-global-operation name=mock-operation

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"endTime": "2020-04-21T02:14:57.415-07:00",
"id": "42",
"insertTime": "2020-04-21T02:14:45.416-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "compute.projects.setCommonInstanceMetadata",
"progress": 100,
"selfLink": "selfLink",
"startTime": "2020-04-21T02:14:45.421-07:00",
"status": "DONE",
"targetId": "42",
"targetLink": "https://www.mockapi.com",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationcompute.projects.setCommonInstanceMetadata100DONE

gcp-compute-get-zone-operation#


Retrieves the specified zone-specific Operations resource.

Base Command#

gcp-compute-get-zone-operation

Input#
Argument NameDescriptionRequired
nameName of the Operations resource to return.Required
zoneName of the zone for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-list-zone-operation#


Retrieves a list of Operation resources contained within the specified zone.

Base Command#

gcp-compute-list-zone-operation

Input#
Argument NameDescriptionRequired
zoneName of the zone for request.Required
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-list-zone-operation zone=europe-west2-a

Context Example#
{
"GoogleCloudCompute": {
"Operations": [
{
"endTime": "2020-04-21T02:13:14.167-07:00",
"id": "42",
"insertTime": "2020-04-21T02:13:05.679-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "compute.instanceGroupManagers.insert",
"progress": 100,
"selfLink": "selfLink",
"startTime": "2020-04-21T02:13:05.694-07:00",
"status": "DONE",
"targetId": "42",
"targetLink": "https://www.mockapi.com/zones//instanceGroupManagers/mock_instance-grp",
"user": "user",
"zone": "https://www.mockapi.com/zones/"
}
]
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstartTimestatus
42compute#operationmock-operationcompute.instanceGroupManagers.insert1002020-04-21T02:13:05.694-07:00DONE
42compute#operationmock-operationcompute.zoneInstanceTemplates.insert1002020-04-21T02:13:08.017-07:00DONE
42compute#operationmock-operationinsert1002020-04-21T02:13:16.811-07:00DONE
42compute#operationmock-operationinsert1002020-04-21T02:13:17.780-07:00DONE
42compute#operationmock-operationinsert1002020-04-21T02:13:17.622-07:00DONE
42compute#operationmock-operationsetLabels1002020-04-21T03:00:05.489-07:00DONE
42compute#operationmock-operationsetLabels1002020-04-21T03:00:06.782-07:00DONE
42compute#operationmock-operationsetLabels1002020-04-21T03:00:08.158-07:00DONE
42compute#operationmock-operationcompute.instanceGroupManagers.resize1002020-04-27T05:09:08.086-07:00DONE
42compute#operationmock-operationinsert1002020-04-27T05:09:12.270-07:00DONE
42compute#operationmock-operationinsert1002020-04-27T05:09:11.594-07:00DONE
42compute#operationmock-operationinsert1002020-04-27T05:09:12.297-07:00DONE
42compute#operationmock-operationsetLabels1002020-04-27T05:46:15.288-07:00DONE
42compute#operationmock-operationsetLabels1002020-04-27T05:46:17.483-07:00DONE
42compute#operationmock-operationsetLabels1002020-04-27T05:46:19.758-07:00DONE
42compute#operationmock-operationcreateSnapshot1002020-04-29T23:28:38.907-07:00DONE
42compute#operationmock-operationcreateSnapshot1002020-04-30T02:52:21.937-07:00DONE
42compute#operationmock-operationinsert1002020-04-30T03:28:27.942-07:00DONE
42compute#operationmock-operationsetLabels1002020-04-30T05:38:37.097-07:00DONE
42compute#operationmock-operationcompute.instanceGroups.insert1002020-04-30T05:49:45.300-07:00DONE
42compute#operationmock-operationcompute.instanceGroups.setNamedPorts1002020-05-03T00:30:43.933-07:00DONE
42compute#operationmock-operationcompute.instanceGroupManagers.setNamedPorts1002020-05-03T00:30:44.992-07:00DONE
42compute#operationmock-operationcompute.instanceGroups.setNamedPorts1002020-05-03T00:31:01.092-07:00DONE
42compute#operationmock-operationcompute.instanceGroupManagers.setNamedPorts1002020-05-03T00:31:01.999-07:00DONE
42compute#operationmock-operationcreateSnapshot1002020-05-03T00:40:58.861-07:00DONE
42compute#operationmock-operationcreateSnapshot02020-05-03T01:13:23.718-07:00RUNNING
42compute#operationsystemevent-42-5a3d42c0-a1515ace-f42compute.instances.migrateOnHostMaintenance1002020-04-21T17:27:39.000-07:00DONE

gcp-compute-delete-zone-operation#


Deletes the specified zone-specific Operations resource.

Base Command#

gcp-compute-delete-zone-operation

Input#
Argument NameDescriptionRequired
nameName of the Operations resource to delete.Required
zoneName of the zone for this request.Required
Context Output#

There is no context output for this command.

Command Example#

Human Readable Output#

gcp-compute-get-instance#


Returns the specified Instance resource. Gets a list of available instances by making a list() request.

Base Command#

gcp-compute-get-instance

Input#
Argument NameDescriptionRequired
instanceName of the instance resource to return.Required
zoneThe name of the zone for this request.Required
project_idProject ID that you want to run this command on.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Instances.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Instances.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Instances.namestringThe 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.
GoogleCloudCompute.Instances.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Instances.tagsstringTags 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.
GoogleCloudCompute.Instances.tags.itemsstringAn array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.Instances.tags.fingerprintstringSpecifies a fingerprint for this request, which is essentially a hash of the tags contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
GoogleCloudCompute.Instances.machineTypestringFull 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.
GoogleCloudCompute.Instances.statusstringThe status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
GoogleCloudCompute.Instances.statusMessagestringAn optional, human-readable explanation of the status.
GoogleCloudCompute.Instances.zonestringURL 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.
GoogleCloudCompute.Instances.canIpForwardbooleanAllows 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.
GoogleCloudCompute.Instances.networkInterfacesstringAn 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.
GoogleCloudCompute.Instances.networkInterfaces.networkstringURL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
GoogleCloudCompute.Instances.networkInterfaces.subnetworkstringThe URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL
GoogleCloudCompute.Instances.networkInterfaces.networkIPstringAn IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
GoogleCloudCompute.Instances.networkInterfaces.namestringThe name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigsstringAn array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.typestringThe type of configuration. The default and only option is ONE_TO_ONE_NAT.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.namestringThe name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.natIPstringAn 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.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.setPublicPtrbooleanSpecifies whether a public DNS ‘PTR’ record should be created to map the external IP address of the instance to a DNS domain name.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.publicPtrDomainNamestringThe DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.networkTierstringThis signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.kindstringType of the resource. Always compute#accessConfig for access configs.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRangesstringAn array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.ipCidrRangestringThe IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 0.0.0.0), a netmask (e.g. /24) or a CIDR format string (e.g. 0.0.0.0/24).
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.subnetworkRangeNamestringOptional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
GoogleCloudCompute.Instances.networkInterfaces.fingerprintstringFingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Instances.networkInterfaces.kindstringType of the resource. Always compute#networkInterface for network interfaces.
GoogleCloudCompute.Instances.disksstringArray of disks associated with this instance. Persistent disks must be created before you can assign them.
GoogleCloudCompute.Instances.disks.typestringSpecifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
GoogleCloudCompute.Instances.disks.modestringThe 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.
GoogleCloudCompute.Instances.disks.sourcestringSpecifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
GoogleCloudCompute.Instances.disks.deviceNamestringSpecifies 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.
GoogleCloudCompute.Instances.disks.indexnumberA zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
GoogleCloudCompute.Instances.disks.bootbooleanIndicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
GoogleCloudCompute.Instances.disks.initializeParamsstringSpecifies 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.
GoogleCloudCompute.Instances.disks.initializeParams.diskNamestringSpecifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImagestringThe source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
GoogleCloudCompute.Instances.disks.initializeParams.diskSizeGbstringSpecifies the size of the disk in base-2 GB.
GoogleCloudCompute.Instances.disks.initializeParams.diskTypestringSpecifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.initializeParams.labelsstringLabels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
GoogleCloudCompute.Instances.disks.initializeParams.labels.keystringThe disk label key.
GoogleCloudCompute.Instances.disks.initializeParams.labels.valuestringThe disk label value.
GoogleCloudCompute.Instances.disks.initializeParams.descriptionstringAn optional description. Provide this property when creating the disk.
GoogleCloudCompute.Instances.disks.autoDeletebooleanSpecifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
GoogleCloudCompute.Instances.disks.licensesstringAny valid publicly visible licenses.
GoogleCloudCompute.Instances.disks.interfacestringSpecifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
GoogleCloudCompute.Instances.disks.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.diskEncryptionKeystringEncrypts or decrypts a disk using a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.kindstringType of the resource. Always compute#attachedDisk for attached disks.
GoogleCloudCompute.Instances.metadatastringThe metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
GoogleCloudCompute.Instances.metadata.fingerprintstringSpecifies a fingerprint for this request, which is essentially a hash of the metadatas 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Instances.metadata.itemsstringArray of key/value pairs. The total size of all keys and values must be less than 512 KB.
GoogleCloudCompute.Instances.metadata.items.keystringKey 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.
GoogleCloudCompute.Instances.metadata.items.valuestringValue 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 42 bytes (256 KiB).
GoogleCloudCompute.Instances.metadata.kindstringType of the resource. Always compute#metadata for metadata.
GoogleCloudCompute.Instances.serviceAccountsstringA list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
GoogleCloudCompute.Instances.serviceAccounts.emailstringEmail address of the service account.
GoogleCloudCompute.Instances.serviceAccounts.scopesstringThe list of scopes to be made available for this service account
GoogleCloudCompute.Instances.selfLinkstringServer-defined URL for this resource.
GoogleCloudCompute.Instances.schedulingstringSets the scheduling options for this instance.
GoogleCloudCompute.Instances.scheduling.onHostMaintenancestringDefines 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 Instance Scheduling Options.
GoogleCloudCompute.Instances.scheduling.automaticRestartbooleanSpecifies 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.
GoogleCloudCompute.Instances.scheduling.preemptiblebooleanDefines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
GoogleCloudCompute.Instances.scheduling.nodeAffinitiesstringA set of node affinity and anti-affinity.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.keystringCorresponds to the label key of Node resource.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.operatorstringDefines the operation of node selection.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.valuesstringCorresponds to the label values of Node resource.
GoogleCloudCompute.Instances.cpuPlatformstringThe CPU platform used by this instance.
GoogleCloudCompute.Instances.labelsstringLabels to apply to this instance. These can be later modified by the setLabels method.
GoogleCloudCompute.Instances.labels.keystringThe label key.
GoogleCloudCompute.Instances.labels.valuestringThe label value.
GoogleCloudCompute.Instances.labelFingerprintstringA fingerprint for this request, which is essentially a hash of the labels 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.
GoogleCloudCompute.Instances.minCpuPlatformstringSpecifies 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".
GoogleCloudCompute.Instances.guestAcceleratorsstringA list of the type and count of accelerator cards attached to the instance.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorTypestringFull or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorCountstringThe number of the guest accelerator cards exposed to this instance.
GoogleCloudCompute.Instances.startRestrictedbooleanWhether a VM has been restricted for start because Compute Engine has detected suspicious activity.
GoogleCloudCompute.Instances.deletionProtectionbooleanWhether the resource should be protected against deletion.
GoogleCloudCompute.Instances.hostnamestringHostname
GoogleCloudCompute.Instances.kindstring] Type of the resource. Always compute#instance for instances.
Command Example#

!gcp-compute-get-instance instance=test01 zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"Instances": {
"canIpForward": false,
"cpuPlatform": "Unknown CPU Platform",
"creationTimestamp": "creationTimestamp",
"deletionProtection": false,
"description": "",
"disks": [
{
"autoDelete": true,
"boot": true,
"deviceName": "test01",
"diskSizeGb": "100",
"guestOsFeatures": [
{
"type": "UEFI_COMPATIBLE"
}
],
"index": 0,
"interface": "SCSI",
"kind": "compute#attachedDisk",
"licenses": [
"https://www.googleapis.com/compute/v1/projects"
],
"mode": "READ_WRITE",
"source": "https://www.mockapi.com/zones/europe-west2-c/disks/test01",
"type": "PERSISTENT"
}
],
"displayDevice": {
"enableDisplay": false
},
"fingerprint": "fingerprint",
"id": "42",
"kind": "compute#instance",
"labelFingerprint": "labelFingerprint",
"labels": {
"a123": "abc",
"a231": "cba"
},
"machineType": "machineType",
"metadata": {
"fingerprint": "fingerprint",
"kind": "compute#metadata"
},
"name": "test01",
"networkInterfaces": [
{
"accessConfigs": [
{
"kind": "compute#accessConfig",
"name": "External NAT",
"networkTier": "PREMIUM",
"type": "ONE_TO_ONE_NAT"
}
],
"fingerprint": "fingerprint",
"kind": "compute#networkInterface",
"name": "nic0",
"network": "network",
"networkIP": "8.8.8.8",
"subnetwork": "subnetwork"
}
],
"reservationAffinity": {
"consumeReservationType": "ANY_RESERVATION"
},
"scheduling": {
"automaticRestart": true,
"onHostMaintenance": "MIGRATE",
"preemptible": false
},
"selfLink": "selfLink",
"serviceAccounts": [
{
"email": "email",
"scopes": [
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring.write",
"https://www.googleapis.com/auth/servicecontrol",
"https://www.googleapis.com/auth/service.management.readonly",
"https://www.googleapis.com/auth/trace.append"
]
}
],
"shieldedInstanceConfig": {
"enableIntegrityMonitoring": true,
"enableSecureBoot": false,
"enableVtpm": true
},
"shieldedInstanceIntegrityPolicy": {
"updateAutoLearnPolicy": true
},
"startRestricted": false,
"status": "TERMINATED",
"tags": {
"fingerprint": "fingerprint",
"items": [
"https-server"
]
},
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
}
}
Human Readable Output#

Google Cloud Compute Instances#

idmachineTypenamezone
42machineTypetest01https://www.mockapi.com/zones/europe-west2-c

gcp-compute-delete-instance#


Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.

Base Command#

gcp-compute-delete-instance

Input#
Argument NameDescriptionRequired
instanceName of the instance resource to delete.Required
zoneThe name of the zone for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-start-instance#


Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.

Base Command#

gcp-compute-start-instance

Input#
Argument NameDescriptionRequired
instanceName of the instance resource to start.Required
zoneThe name of the zone for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-start-instance instance=test01 zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:15:34.334-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "start",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:15:34.350-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "selfLink",
"user": "user",
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationstart0RUNNING

gcp-compute-stop-instance#


Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.

Base Command#

gcp-compute-stop-instance

Input#
Argument NameDescriptionRequired
instanceName of the instance resource to stop.Required
zoneThe name of the zone for this request.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-stop-instance instance=test01 zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:15:37.391-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "stop",
"progress": 0,
"selfLink": "selfLink",
"status": "PENDING",
"targetId": "42",
"targetLink": "selfLink",
"user": "user",
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationstop0PENDING

gcp-compute-reset-instance#


Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.

Base Command#

gcp-compute-reset-instance

Input#
Argument NameDescriptionRequired
instanceName of the instance scoping this request.Required
zoneThe name of the zone for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-set-instance-labels#


Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.

Base Command#

gcp-compute-set-instance-labels

Input#
Argument NameDescriptionRequired
instanceName of the instance scoping this request.Required
zoneThe name of the zone for this request.Required
labelsAn object containing a list of "key": value pairs. Example: key=abc,value=123;key=ABC,value=321Required
labelFingerprintFingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to add or change labels.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-set-instance-metadata#


Sets metadata for the specified instance to the data included in the request.

Base Command#

gcp-compute-set-instance-metadata

Input#
Argument NameDescriptionRequired
instanceName of the instance scoping this request.Required
zoneThe name of the zone for this request.Required
metadataFingerprintSpecifies 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, otherwise the request will fail with error 412 conditionNotMet.Optional
metadataItemskey/value pairs. EX: key=abc,value=123;key=ABC,value=321Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-set-instance-machine-type#


Changes the machine type for a stopped instance to the machine type specified in the request.

Base Command#

gcp-compute-set-instance-machine-type

Input#
Argument NameDescriptionRequired
instanceName of the instance scoping this request.Required
zoneThe name of the zone for this request.Required
machineTypeFull or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-set-instance-machine-type instance=test01 machineType=machineType zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:15:30.910-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "setMachineType",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:15:30.938-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "selfLink",
"user": "user",
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationsetMachineType0RUNNING

gcp-compute-get-region-operation#


Retrieves the specified region-specific Operations resource.

Base Command#

gcp-compute-get-region-operation

Input#
Argument NameDescriptionRequired
nameName of the Operations resource to return.Required
regionName of the region for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-list-region-operation#


Retrieves a list of Operation resources contained within the specified region.

Base Command#

gcp-compute-list-region-operation

Input#
Argument NameDescriptionRequired
regionName of the region for this request.Required
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-list-region-operation region=europe-west2

Context Example#
{
"GoogleCloudCompute": {
"Operations": [
{
"endTime": "2020-04-21T02:12:58.388-07:00",
"id": "42",
"insertTime": "2020-04-21T02:12:37.886-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "compute.subnetworks.patch",
"progress": 100,
"region": "https://www.mockapi.com/regions/europe-west2",
"selfLink": "selfLink",
"startTime": "2020-04-21T02:12:37.901-07:00",
"status": "DONE",
"targetId": "42",
"targetLink": "subnetwork",
"user": "user"
}
]
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstartTimestatus
42compute#operationmock-operationcompute.subnetworks.patch1002020-04-21T02:12:37.901-07:00DONE

gcp-compute-delete-region-operation#


Deletes the specified region-specific Operations resource.

Base Command#

gcp-compute-delete-region-operation

Input#
Argument NameDescriptionRequired
nameName of the Operations resource to delete.Required
regionName of the region for this request.Required
Context Output#

There is no context output for this command.

Command Example#

Human Readable Output#

gcp-compute-list-global-operation#


Retrieves a list of Operation resources contained within the specified project.

Base Command#

gcp-compute-list-global-operation

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-list-global-operation maxResults=5

Context Example#
{
"GoogleCloudCompute": {
"Operations": [
{
"endTime": "2020-04-21T01:48:29.404-07:00",
"id": "42",
"insertTime": "2020-04-21T01:48:24.753-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "insert",
"progress": 100,
"selfLink": "selfLink",
"startTime": "2020-04-21T01:48:24.798-07:00",
"status": "DONE",
"targetId": "42",
"targetLink": "https://www.mockapi.com/global/firewalls/default-allow-https",
"user": "user"
}
]
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstartTimestatus
42compute#operationmock-operationinsert1002020-04-21T01:48:24.798-07:00DONE

gcp-compute-delete-global-operation#


Deletes the specified Operations resource.

Base Command#

gcp-compute-delete-global-operation

Input#
Argument NameDescriptionRequired
nameName of the Operations resource to delete.Required
Context Output#

There is no context output for this command.

Command Example#

Human Readable Output#

gcp-compute-delete-address#


Deletes the specified address resource.

Base Command#

gcp-compute-delete-address

Input#
Argument NameDescriptionRequired
addressName of the address resource to delete.Required
regionName of the region for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-delete-address address=testaddress region=europe-west2

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:16:04.322-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "delete",
"progress": 0,
"region": "https://www.mockapi.com/regions/europe-west2",
"selfLink": "selfLink",
"startTime": "2020-05-03T01:16:04.335-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/regions/europe-west2/addresses/testaddress",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationdelete0RUNNING

gcp-compute-get-address#


Returns the specified address resource.

Base Command#

gcp-compute-get-address

Input#
Argument NameDescriptionRequired
addressName of the address resource to return.Required
regionName of the region for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Addresses.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Addresses.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Addresses.namestringName 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.
GoogleCloudCompute.Addresses.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Addresses.addressstringThe static IP address represented by this resource.
GoogleCloudCompute.Addresses.prefixLengthnumberThe prefix length if the resource reprensents an IP range.
GoogleCloudCompute.Addresses.statusstringThe status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
GoogleCloudCompute.Addresses.regionstringURL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL. You cannot set this field in the request body.
GoogleCloudCompute.Addresses.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Addresses.usersstringThe URLs of the resources that are using this address.
GoogleCloudCompute.Addresses.networkTierstringThis signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.
GoogleCloudCompute.Addresses.ipVersionstringThe IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
GoogleCloudCompute.Addresses.addressTypestringThe type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
GoogleCloudCompute.Addresses.purposestringThe purpose of resource, only used with INTERNAL type.
GoogleCloudCompute.Addresses.subnetworkstringThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetworks IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.
GoogleCloudCompute.Addresses.networkstringThe URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.
GoogleCloudCompute.Addresses.kindstringType of the resource. Always compute#address for addresses.
Command Example#

!gcp-compute-get-address address=testaddress region=europe-west2

Context Example#
{
"GoogleCloudCompute": {
"Addresses": {
"address": "8.8.8.8",
"addressType": "EXTERNAL",
"creationTimestamp": "creationTimestamp",
"description": "",
"id": "42",
"kind": "compute#address",
"name": "testaddress",
"networkTier": "PREMIUM",
"region": "https://www.mockapi.com/regions/europe-west2",
"selfLink": "selfLink",
"status": "RESERVED"
}
}
}
Human Readable Output#

Google Cloud Compute Addresses#

addressidname
8.8.8.842testaddress

gcp-compute-insert-address#


Creates an address resource in the specified project using the data included in the request.

Base Command#

gcp-compute-insert-address

Input#
Argument NameDescriptionRequired
nameName 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.Required
regionName of the region for this request.Required
descriptionAn optional description of this resource. Provide this property when you create the resource.Optional
addressThe static IP address represented by this resource.Optional
prefixLengthThe prefix length if the resource reprensents an IP range.Optional
networkTierThis signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer. If this field is not specified, it is assumed to be PREMIUM.Optional
addressTypeThe type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.Optional
purposeThe purpose of resource, only used with INTERNAL type.Optional
subnetworkThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.Optional
networkThe URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-insert-address name=testaddress region=europe-west2

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:13:27.322-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "insert",
"progress": 0,
"region": "https://www.mockapi.com/regions/europe-west2",
"selfLink": "selfLink",
"startTime": "2020-05-03T01:13:27.366-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/regions/europe-west2/addresses/testaddress",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationinsert0RUNNING

gcp-compute-list-addresses#


Retrieves a list of addresses contained within the specified region.

Base Command#

gcp-compute-list-addresses

Input#
Argument NameDescriptionRequired
regionName of the region for this request.Required
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Addresses.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Addresses.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Addresses.namestringName 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.
GoogleCloudCompute.Addresses.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Addresses.addressstringThe static IP address represented by this resource.
GoogleCloudCompute.Addresses.prefixLengthnumberThe prefix length if the resource reprensents an IP range.
GoogleCloudCompute.Addresses.statusstringThe status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
GoogleCloudCompute.Addresses.regionstringURL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL. You cannot set this field in the request body.
GoogleCloudCompute.Addresses.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Addresses.usersstringThe URLs of the resources that are using this address.
GoogleCloudCompute.Addresses.networkTierstringThis signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.
GoogleCloudCompute.Addresses.ipVersionstringThe IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
GoogleCloudCompute.Addresses.addressTypestringThe type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
GoogleCloudCompute.Addresses.purposestringThe purpose of resource, only used with INTERNAL type.
GoogleCloudCompute.Addresses.subnetworkstringThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetworks IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.
GoogleCloudCompute.Addresses.networkstringThe URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.
GoogleCloudCompute.Addresses.kindstringType of the resource. Always compute#address for addresses.
Command Example#

!gcp-compute-list-addresses region=europe-west2

Context Example#
{
"GoogleCloudCompute": {
"Addresses": {
"address": "8.8.8.8",
"addressType": "EXTERNAL",
"creationTimestamp": "creationTimestamp",
"description": "",
"id": "42",
"kind": "compute#address",
"name": "testaddress",
"networkTier": "PREMIUM",
"region": "https://www.mockapi.com/regions/europe-west2",
"selfLink": "selfLink",
"status": "RESERVED"
}
}
}
Human Readable Output#

Google Cloud Compute Addresses#

addressidname
8.8.8.842testaddress

gcp-compute-aggregated-list-addresses#


Retrieves an aggregated list of addresses.

Base Command#

gcp-compute-aggregated-list-addresses

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Addresses.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Addresses.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Addresses.namestringName 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.
GoogleCloudCompute.Addresses.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Addresses.addressstringThe static IP address represented by this resource.
GoogleCloudCompute.Addresses.prefixLengthnumberThe prefix length if the resource reprensents an IP range.
GoogleCloudCompute.Addresses.statusstringThe status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
GoogleCloudCompute.Addresses.regionstringURL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL. You cannot set this field in the request body.
GoogleCloudCompute.Addresses.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Addresses.usersstringThe URLs of the resources that are using this address.
GoogleCloudCompute.Addresses.networkTierstringThis signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.
GoogleCloudCompute.Addresses.ipVersionstringThe IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
GoogleCloudCompute.Addresses.addressTypestringThe type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
GoogleCloudCompute.Addresses.purposestringThe purpose of resource, only used with INTERNAL type.
GoogleCloudCompute.Addresses.subnetworkstringThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetworks IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.
GoogleCloudCompute.Addresses.networkstringThe URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.
GoogleCloudCompute.Addresses.kindstringType of the resource. Always compute#address for addresses.
Command Example#

!gcp-compute-aggregated-list-addresses

Context Example#
{
"GoogleCloudCompute": {
"Addresses": [
{
"address": "8.8.8.8",
"addressType": "EXTERNAL",
"creationTimestamp": "creationTimestamp",
"description": "",
"id": "42",
"ipVersion": "IPV4",
"kind": "compute#address",
"name": "a-b-c-1",
"networkTier": "PREMIUM",
"selfLink": "selfLink",
"status": "RESERVED"
}
]
}
}
Human Readable Output#

Google Cloud Compute Addresses#

addressidname
8.8.8.842a-b-c-1
8.8.8.842testaddress

gcp-compute-delete-global-address#


Deletes the specified address resource.

Base Command#

gcp-compute-delete-global-address

Input#
Argument NameDescriptionRequired
addressName of the address resource to delete.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-delete-global-address address=a-b-c-1

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:15:57.463-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "delete",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:15:57.477-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/global/addresses/a-b-c-1",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationdelete0RUNNING

gcp-compute-get-global-address#


Deletes the specified address resource.

Base Command#

gcp-compute-get-global-address

Input#
Argument NameDescriptionRequired
addressName of the address resource to delete.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Addresses.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Addresses.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Addresses.namestringName 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.
GoogleCloudCompute.Addresses.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Addresses.addressstringThe static IP address represented by this resource.
GoogleCloudCompute.Addresses.prefixLengthnumberThe prefix length if the resource reprensents an IP range.
GoogleCloudCompute.Addresses.statusstringThe status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
GoogleCloudCompute.Addresses.regionstringURL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL. You cannot set this field in the request body.
GoogleCloudCompute.Addresses.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Addresses.usersstringThe URLs of the resources that are using this address.
GoogleCloudCompute.Addresses.networkTierstringThis signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.
GoogleCloudCompute.Addresses.ipVersionstringThe IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
GoogleCloudCompute.Addresses.addressTypestringThe type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
GoogleCloudCompute.Addresses.purposestringThe purpose of resource, only used with INTERNAL type.
GoogleCloudCompute.Addresses.subnetworkstringThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetworks IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.
GoogleCloudCompute.Addresses.networkstringThe URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.
GoogleCloudCompute.Addresses.kindstringType of the resource. Always compute#address for addresses.
Command Example#

!gcp-compute-get-global-address address=a-b-c-1

Context Example#
{
"GoogleCloudCompute": {
"Addresses": {
"address": "8.8.8.8",
"addressType": "EXTERNAL",
"creationTimestamp": "creationTimestamp",
"description": "",
"id": "42",
"ipVersion": "IPV4",
"kind": "compute#address",
"name": "a-b-c-1",
"networkTier": "PREMIUM",
"selfLink": "selfLink",
"status": "RESERVED"
}
}
}
Human Readable Output#

Google Cloud Compute Addresses#

addressidname
8.8.8.842a-b-c-1

gcp-compute-insert-global-address#


Creates an address resource in the specified project using the data included in the request.

Base Command#

gcp-compute-insert-global-address

Input#
Argument NameDescriptionRequired
nameName 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.Required
descriptionAn optional description of this resource. Provide this property when you create the resource.Optional
addressThe static IP address represented by this resource.Optional
prefixLengthThe prefix length if the resource reprensents an IP range.Optional
networkTierThis signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer. If this field is not specified, it is assumed to be PREMIUM.Optional
ipVersionThe IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.Required
addressTypeThe type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.Optional
purposeThe purpose of resource, only used with INTERNAL type.Optional
subnetworkThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.Optional
networkThe URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-insert-global-address ipVersion=IPV4 name=a-b-c-1

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:13:36.687-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "insert",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:13:36.702-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/global/addresses/a-b-c-1",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationinsert0RUNNING

gcp-compute-list-global-addresses#


Retrieves a list of global addresses.

Base Command#

gcp-compute-list-global-addresses

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Addresses.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Addresses.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Addresses.namestringName 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.
GoogleCloudCompute.Addresses.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Addresses.addressstringThe static IP address represented by this resource.
GoogleCloudCompute.Addresses.prefixLengthnumberThe prefix length if the resource reprensents an IP range.
GoogleCloudCompute.Addresses.statusstringThe status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
GoogleCloudCompute.Addresses.regionstringURL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL. You cannot set this field in the request body.
GoogleCloudCompute.Addresses.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Addresses.usersstringThe URLs of the resources that are using this address.
GoogleCloudCompute.Addresses.networkTierstringThis signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.
GoogleCloudCompute.Addresses.ipVersionstringThe IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
GoogleCloudCompute.Addresses.addressTypestringThe type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
GoogleCloudCompute.Addresses.purposestringThe purpose of resource, only used with INTERNAL type.
GoogleCloudCompute.Addresses.subnetworkstringThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetworks IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.
GoogleCloudCompute.Addresses.networkstringThe URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.
GoogleCloudCompute.Addresses.kindstringType of the resource. Always compute#address for addresses.
Command Example#

!gcp-compute-list-global-addresses

Context Example#
{
"GoogleCloudCompute": {
"Addresses": {
"address": "8.8.8.8",
"addressType": "EXTERNAL",
"creationTimestamp": "creationTimestamp",
"description": "",
"id": "42",
"ipVersion": "IPV4",
"kind": "compute#address",
"name": "a-b-c-1",
"networkTier": "PREMIUM",
"selfLink": "selfLink",
"status": "RESERVED"
}
}
}
Human Readable Output#

Google Cloud Compute Addresses#

addressidname
8.8.8.842a-b-c-1

gcp-compute-aggregated-list-disks#


Retrieves an aggregated list of persistent disks.

Base Command#

gcp-compute-aggregated-list-disks

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Disks.idstringUnique identifier for the resource; defined by the server.
GoogleCloudCompute.Disks.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Disks.namestringName 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.
GoogleCloudCompute.Disks.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Disks.sizeGbstringSize of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
GoogleCloudCompute.Disks.zonestringURL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Disks.statusstringThe status of disk creation.
GoogleCloudCompute.Disks.sourceSnapshotstringThe source snapshot used to create this disk. You can provide this as a partial or full URL to the resource.
GoogleCloudCompute.Disks.sourceSnapshotIdstringThe unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
GoogleCloudCompute.Disks.optionsstringInternal use only.
GoogleCloudCompute.Disks.selfLinkstringServer-defined fully-qualified URL for this resource.
GoogleCloudCompute.Disks.sourceImagestringThe source image used to create this disk. If the source image is deleted, this field will not be set.
GoogleCloudCompute.Disks.sourceImageIdstringThe ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
GoogleCloudCompute.Disks.typestringURL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: project/zones/zone/diskTypes/pd-standard or pd-ssd
GoogleCloudCompute.Disks.licensesstringA list of publicly visible licenses. Reserved for Googles use.
GoogleCloudCompute.Disks.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Disks.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Disks.lastAttachTimestampstringLast attach timestamp in RFC3339 text format.
GoogleCloudCompute.Disks.lastDetachTimestampstringLast detach timestamp in RFC3339 text format.
GoogleCloudCompute.Disks.usersstringLinks to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
GoogleCloudCompute.Disks.diskEncryptionKeystringEncrypts the disk using a customer-supplied encryption key.
GoogleCloudCompute.Disks.diskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Disks.diskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Disks.diskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Disks.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Disks.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource
GoogleCloudCompute.Disks.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Disks.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKeystringThe customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Disks.labelsstringLabels to apply to this disk. These can be later modified by the setLabels method.
GoogleCloudCompute.Disks.labels.keystringThe label key
GoogleCloudCompute.Disks.labels.valuestringThe label value
GoogleCloudCompute.Disks.labelFingerprintstringA fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Disks.regionstringURL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Disks.replicaZonesstringURLs of the zones where the disk should be replicated to. Only applicable for regional resources.
GoogleCloudCompute.Disks.licenseCodesstringInteger license codes indicating which licenses are attached to this disk.
GoogleCloudCompute.Disks.physicalBlockSizeBytesstringPhysical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 42, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the callers project.
GoogleCloudCompute.Disks.kindstringType of the resource. Always compute#disk for disks.
Command Example#

!gcp-compute-aggregated-list-disks

Context Example#
{
"GoogleCloudCompute": {
"Disks": [
{
"creationTimestamp": "creationTimestamp",
"guestOsFeatures": [
{
"type": "UEFI_COMPATIBLE"
}
],
"id": "42",
"kind": "compute#disk",
"labelFingerprint": "labelFingerprint",
"lastAttachTimestamp": "2020-04-21T01:48:17.411-07:00",
"licenseCodes": [
"42"
],
"licenses": [
"https://www.googleapis.com/compute/v1/projects"
],
"name": "test01",
"physicalBlockSizeBytes": "4096",
"selfLink": "selfLink",
"sizeGb": "100",
"sourceImage": "https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-v42",
"sourceImageId": "42",
"status": "READY",
"type": "https://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standard",
"users": [
"selfLink"
],
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
]
}
}
Human Readable Output#

Google Cloud Compute Disks#

idnamesizeGbstatustypezone
42test01100READYhttps://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standardhttps://www.mockapi.com/zones/europe-west2-c

gcp-compute-create-disk-snapshot#


Creates a snapshot of a specified persistent disk.

Base Command#

gcp-compute-create-disk-snapshot

Input#
Argument NameDescriptionRequired
zoneThe name of the zone for this request.Required
nameName of the snapshot.Required
diskName of the persistent disk to snapshot.Required
descriptionAn optional description of this resource. Provide this property when you create the resource.Optional
snapshotEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
snapshotEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
sourceDiskEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
sourceDiskEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
labelsLabels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. ex key=abc,value=123;key=abc,value=123Optional
labelFingerprintA fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set 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, otherwise the request will fail with error 412 conditionNotMet.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-create-disk-snapshot disk=mock-disk zone=europe-west2-a name=testsnap1

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:13:23.716-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "createSnapshot",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:13:23.718-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/zones//disks/mock-disk",
"user": "user",
"zone": "https://www.mockapi.com/zones/"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationcreateSnapshot0RUNNING

gcp-compute-delete-disk#


Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Base Command#

gcp-compute-delete-disk

Input#
Argument NameDescriptionRequired
diskName of the persistent disk to delete.Required
zoneThe name of the zone for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-delete-disk disk=testdisk zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:16:00.654-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "delete",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:16:00.664-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/zones/europe-west2-c/disks/testdisk",
"user": "user",
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationdelete0RUNNING

gcp-compute-get-disk#


Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.

Base Command#

gcp-compute-get-disk

Input#
Argument NameDescriptionRequired
diskName of the persistent disk to return.Required
zoneThe name of the zone for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Disks.idstringUnique identifier for the resource; defined by the server.
GoogleCloudCompute.Disks.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Disks.namestringName 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.
GoogleCloudCompute.Disks.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Disks.sizeGbstringSize of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
GoogleCloudCompute.Disks.zonestringURL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Disks.statusstringThe status of disk creation.
GoogleCloudCompute.Disks.sourceSnapshotstringThe source snapshot used to create this disk. You can provide this as a partial or full URL to the resource.
GoogleCloudCompute.Disks.sourceSnapshotIdstringThe unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
GoogleCloudCompute.Disks.optionsstringInternal use only.
GoogleCloudCompute.Disks.selfLinkstringServer-defined fully-qualified URL for this resource.
GoogleCloudCompute.Disks.sourceImagestringThe source image used to create this disk. If the source image is deleted, this field will not be set.
GoogleCloudCompute.Disks.sourceImageIdstringThe ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
GoogleCloudCompute.Disks.typestringURL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: project/zones/zone/diskTypes/pd-standard or pd-ssd
GoogleCloudCompute.Disks.licensesstringA list of publicly visible licenses. Reserved for Googles use.
GoogleCloudCompute.Disks.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Disks.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Disks.lastAttachTimestampstringLast attach timestamp in RFC3339 text format.
GoogleCloudCompute.Disks.lastDetachTimestampstringLast detach timestamp in RFC3339 text format.
GoogleCloudCompute.Disks.usersstringLinks to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
GoogleCloudCompute.Disks.diskEncryptionKeystringEncrypts the disk using a customer-supplied encryption key.
GoogleCloudCompute.Disks.diskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Disks.diskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Disks.diskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Disks.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Disks.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource
GoogleCloudCompute.Disks.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Disks.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKeystringThe customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Disks.labelsstringLabels to apply to this disk. These can be later modified by the setLabels method.
GoogleCloudCompute.Disks.labels.keystringThe label key
GoogleCloudCompute.Disks.labels.valuestringThe label value
GoogleCloudCompute.Disks.labelFingerprintstringA fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Disks.regionstringURL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Disks.replicaZonesstringURLs of the zones where the disk should be replicated to. Only applicable for regional resources.
GoogleCloudCompute.Disks.licenseCodesstringInteger license codes indicating which licenses are attached to this disk.
GoogleCloudCompute.Disks.physicalBlockSizeBytesstringPhysical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 42, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the callers project.
GoogleCloudCompute.Disks.kindstringType of the resource. Always compute#disk for disks.
Command Example#

!gcp-compute-get-disk disk=testdisk zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"Disks": {
"creationTimestamp": "creationTimestamp",
"id": "42",
"kind": "compute#disk",
"labelFingerprint": "labelFingerprint",
"name": "testdisk",
"physicalBlockSizeBytes": "4096",
"selfLink": "selfLink",
"sizeGb": "1",
"status": "READY",
"type": "https://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standard",
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
}
}
Human Readable Output#

Google Cloud Compute Disks#

idnamesizeGbstatustypezone
42testdisk1READYhttps://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standardhttps://www.mockapi.com/zones/europe-west2-c

gcp-compute-insert-disk#


Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.

Base Command#

gcp-compute-insert-disk

Input#
Argument NameDescriptionRequired
nameName 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.Required
zoneThe name of the zone for this request.Required
disktypeURL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: project/zones/zone/diskTypes/pd-standard or pd-ssdRequired
descriptionAn optional description of this resource. Provide this property when you create the resource.Optional
sizeGbSize of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 42, inclusive.Required
sourceSnapshotThe source snapshot used to create this disk. You can provide this as a partial or full URL to the resource.Optional
sourceImageThe source image used to create this disk. If the source image is deleted, this field will not be set.Optional
licensesA list of publicly visible licenses. Reserved for Google's use.Optional
guestOsFeaturesA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. Separated with ,Optional
diskEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
diskEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
sourceImageEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
sourceImageEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
sourceSnapshotEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
sourceSnapshotEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
labelsLabels to apply to this disk. These can be later modified by the setLabels method. ex: key=abc,value=123;key=abc,value=123Optional
labelFingerprintA fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set 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, otherwise the request will fail with error 412 conditionNotMet.Optional
replicaZonesURLs of the zones where the disk should be replicated to. Only applicable for regional resources.Optional
licenseCodesInteger license codes indicating which licenses are attached to this disk.Optional
physicalBlockSizeBytesPhysical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 42, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-insert-disk disktype=https://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standard name=testdisk sizeGb=1 zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:13:30.426-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "insert",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:13:30.439-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/zones/europe-west2-c/disks/testdisk",
"user": "user",
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationinsert0RUNNING

gcp-compute-list-disks#


Retrieves a list of persistent disks contained within the specified zone.

Base Command#

gcp-compute-list-disks

Input#
Argument NameDescriptionRequired
zoneThe name of the zone for this request.Required
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Disks.idstringUnique identifier for the resource; defined by the server.
GoogleCloudCompute.Disks.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Disks.namestringName 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.
GoogleCloudCompute.Disks.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Disks.sizeGbstringSize of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
GoogleCloudCompute.Disks.zonestringURL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Disks.statusstringThe status of disk creation.
GoogleCloudCompute.Disks.sourceSnapshotstringThe source snapshot used to create this disk. You can provide this as a partial or full URL to the resource.
GoogleCloudCompute.Disks.sourceSnapshotIdstringThe unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
GoogleCloudCompute.Disks.optionsstringInternal use only.
GoogleCloudCompute.Disks.selfLinkstringServer-defined fully-qualified URL for this resource.
GoogleCloudCompute.Disks.sourceImagestringThe source image used to create this disk. If the source image is deleted, this field will not be set.
GoogleCloudCompute.Disks.sourceImageIdstringThe ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
GoogleCloudCompute.Disks.typestringURL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: project/zones/zone/diskTypes/pd-standard or pd-ssd
GoogleCloudCompute.Disks.licensesstringA list of publicly visible licenses. Reserved for Googles use.
GoogleCloudCompute.Disks.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Disks.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Disks.lastAttachTimestampstringLast attach timestamp in RFC3339 text format.
GoogleCloudCompute.Disks.lastDetachTimestampstringLast detach timestamp in RFC3339 text format.
GoogleCloudCompute.Disks.usersstringLinks to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
GoogleCloudCompute.Disks.diskEncryptionKeystringEncrypts the disk using a customer-supplied encryption key.
GoogleCloudCompute.Disks.diskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Disks.diskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Disks.diskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Disks.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Disks.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource
GoogleCloudCompute.Disks.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Disks.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKeystringThe customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Disks.labelsstringLabels to apply to this disk. These can be later modified by the setLabels method.
GoogleCloudCompute.Disks.labels.keystringThe label key
GoogleCloudCompute.Disks.labels.valuestringThe label value
GoogleCloudCompute.Disks.labelFingerprintstringA fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Disks.regionstringURL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Disks.replicaZonesstringURLs of the zones where the disk should be replicated to. Only applicable for regional resources.
GoogleCloudCompute.Disks.licenseCodesstringInteger license codes indicating which licenses are attached to this disk.
GoogleCloudCompute.Disks.physicalBlockSizeBytesstringPhysical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 42, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the callers project.
GoogleCloudCompute.Disks.kindstringType of the resource. Always compute#disk for disks.
Command Example#

!gcp-compute-list-disks zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"Disks": [
{
"creationTimestamp": "creationTimestamp",
"guestOsFeatures": [
{
"type": "UEFI_COMPATIBLE"
}
],
"id": "42",
"kind": "compute#disk",
"labelFingerprint": "labelFingerprint",
"lastAttachTimestamp": "2020-04-21T01:48:17.411-07:00",
"licenseCodes": [
"42"
],
"licenses": [
"https://www.googleapis.com/compute/v1/projects"
],
"name": "test01",
"physicalBlockSizeBytes": "4096",
"selfLink": "selfLink",
"sizeGb": "100",
"sourceImage": "https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-v42",
"sourceImageId": "42",
"status": "READY",
"type": "https://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standard",
"users": [
"selfLink"
],
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
]
}
}
Human Readable Output#

Google Cloud Compute Disks#

idnamesizeGbstatustypezone
42test01100READYhttps://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standardhttps://www.mockapi.com/zones/europe-west2-c
42testdisk1READYhttps://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standardhttps://www.mockapi.com/zones/europe-west2-c

gcp-compute-resize-disk#


Resizes the specified persistent disk. You can only increase the size of the disk.

Base Command#

gcp-compute-resize-disk

Input#
Argument NameDescriptionRequired
diskThe name of the persistent disk.Required
zoneThe name of the zone for this request.Required
sizeGbThe new size of the persistent disk, which is specified in GB.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-resize-disk disk=disk-1 sizeGb=501 zone=europe-west2-a

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:15:40.466-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "resizeDisk",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:15:40.479-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/zones//disks/disk-1",
"user": "user",
"zone": "https://www.mockapi.com/zones/"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationresizeDisk0RUNNING

gcp-compute-set-disk-labels#


Sets the labels on a disk.

Base Command#

gcp-compute-set-disk-labels

Input#
Argument NameDescriptionRequired
diskName or id of the resource for this request.Required
zoneThe name of the zone for this request.Required
labelsThe labels to set for this resource. An object containing a list of "key": value pairs. Example: key=abc,value=123;key=abc,value=123Required
labelFingerprintThe fingerprint of the previous set of labels for this resource, used to detect conflicts. 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. Make a get() request to the resource to get the latest fingerprint.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-aggregated-list-disk-types#


Retrieves an aggregated list of disk types.

Base Command#

gcp-compute-aggregated-list-disk-types

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.DiskTypes.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.DiskTypes.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.DiskTypes.namestringName of the resource.
GoogleCloudCompute.DiskTypes.descriptionstringAn optional description of this resource.
GoogleCloudCompute.DiskTypes.validDiskSizestringAn optional textual description of the valid disk size, such as "10GB-10TB".
GoogleCloudCompute.DiskTypes.deprecatedstringThe deprecation status associated with this disk type.
GoogleCloudCompute.DiskTypes.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.DiskTypes.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.DiskTypes.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.DiskTypes.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.DiskTypes.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.DiskTypes.zonestringURL of the zone where the disk type resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.DiskTypes.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.DiskTypes.defaultDiskSizeGbstringServer-defined default disk size in GB.
GoogleCloudCompute.DiskTypes.regionstringURL of the region where the disk type resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.DiskTypes.kindstringType of the resource. Always compute#diskType for disk types.
Command Example#

!gcp-compute-aggregated-list-disk-types

Context Example#
{
"GoogleCloudCompute": {
"DiskTypes": {
"creationTimestamp": "creationTimestamp",
"defaultDiskSizeGb": "500",
"description": "Standard Persistent Disk",
"kind": "compute#diskType",
"name": "pd-standard",
"region": "https://www.mockapi.com/regions/asia-east2",
"selfLink": "selfLink",
"validDiskSize": "10GB-42GB",
"zone": "https://www.mockapi.com/zones/us-central2-d"
}
}
}
Human Readable Output#

Google Cloud Compute DiskTypes#

namevalidDiskSize
pd-standard10GB-42GB

gcp-compute-get-disk-type#


Returns the specified disk type. Gets a list of available disk types by making a list() request.

Base Command#

gcp-compute-get-disk-type

Input#
Argument NameDescriptionRequired
disktypeName of the disk type to return.Required
zoneThe name of the zone for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.DiskTypes.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.DiskTypes.namestringName of the resource.
GoogleCloudCompute.DiskTypes.descriptionstringAn optional description of this resource.
GoogleCloudCompute.DiskTypes.validDiskSizestringAn optional textual description of the valid disk size, such as "10GB-10TB".
GoogleCloudCompute.DiskTypes.deprecatedstringThe deprecation status associated with this disk type.
GoogleCloudCompute.DiskTypes.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.DiskTypes.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.DiskTypes.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.DiskTypes.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.DiskTypes.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.DiskTypes.zonestringURL of the zone where the disk type resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.DiskTypes.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.DiskTypes.defaultDiskSizeGbstringServer-defined default disk size in GB.
GoogleCloudCompute.DiskTypes.regionstringURL of the region where the disk type resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.DiskTypes.kindstringType of the resource. Always compute#diskType for disk types.
GoogleCloudCompute.DiskTypes.idstringThe unique identifier for the resource.
Command Example#

!gcp-compute-get-disk-type disktype=pd-ssd zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"DiskTypes": {
"creationTimestamp": "creationTimestamp",
"defaultDiskSizeGb": "100",
"description": "SSD Persistent Disk",
"kind": "compute#diskType",
"name": "pd-ssd",
"selfLink": "selfLink",
"validDiskSize": "10GB-42GB",
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
}
}
Human Readable Output#

Google Cloud Compute DiskTypes#

namevalidDiskSizezone
pd-ssd10GB-42GBhttps://www.mockapi.com/zones/europe-west2-c

gcp-compute-list-disk-types#


Retrieves a list of disk types available to the specified project.

Base Command#

gcp-compute-list-disk-types

Input#
Argument NameDescriptionRequired
zoneThe name of the zone for this request.Required
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.DiskTypes.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.DiskTypes.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.DiskTypes.namestringName of the resource.
GoogleCloudCompute.DiskTypes.descriptionstringAn optional description of this resource.
GoogleCloudCompute.DiskTypes.validDiskSizestringAn optional textual description of the valid disk size, such as "10GB-10TB".
GoogleCloudCompute.DiskTypes.deprecatedstringThe deprecation status associated with this disk type.
GoogleCloudCompute.DiskTypes.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.DiskTypes.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.DiskTypes.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.DiskTypes.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.DiskTypes.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.DiskTypes.zonestringURL of the zone where the disk type resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.DiskTypes.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.DiskTypes.defaultDiskSizeGbstringServer-defined default disk size in GB.
GoogleCloudCompute.DiskTypes.regionstringURL of the region where the disk type resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.DiskTypes.kindstringType of the resource. Always compute#diskType for disk types.
Command Example#

!gcp-compute-list-disk-types zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"DiskTypes": {
"creationTimestamp": "creationTimestamp",
"defaultDiskSizeGb": "500",
"description": "Standard Persistent Disk",
"kind": "compute#diskType",
"name": "pd-standard",
"selfLink": "selfLink",
"validDiskSize": "10GB-42GB",
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
}
}
Human Readable Output#

Google Cloud Compute DiskTypes#

namevalidDiskSize
local-ssd375GB-375GB
pd-ssd10GB-42GB
pd-standard10GB-42GB

gcp-compute-get-image#


Returns the specified image. Gets a list of available images by making a list() request.

Base Command#

gcp-compute-get-image

Input#
Argument NameDescriptionRequired
projectProject ID for this request. if left empty configured project will be used.Optional
imageName of the image resource to return.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Images.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Images.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Images.namestringName 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.
GoogleCloudCompute.Images.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Images.sourceTypestringThe type of the image used to create this disk. The default and only value is RAW
GoogleCloudCompute.Images.rawDiskstringThe parameters of the raw disk image.
GoogleCloudCompute.Images.rawDisk.sourcestringThe full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
GoogleCloudCompute.Images.rawDisk.sha1ChecksumstringAn optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
GoogleCloudCompute.Images.rawDisk.containerTypestringThe format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
GoogleCloudCompute.Images.deprecatedstringThe deprecation status associated with this image.
GoogleCloudCompute.Images.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.Images.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.Images.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Images.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Images.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Images.statusstringThe status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
GoogleCloudCompute.Images.archiveSizeBytesstringSize of the image tar.gz archive stored in Google Cloud Storage (in bytes).
GoogleCloudCompute.Images.diskSizeGbstringSize of the image when restored onto a persistent disk (in GB).
GoogleCloudCompute.Images.sourceDiskstringURL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values: https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk , projects/project/zones/zone/disks/disk , zones/zone/disks/disk
GoogleCloudCompute.Images.sourceDiskIdstringThe ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
GoogleCloudCompute.Images.licensesstringAny applicable license URI.
GoogleCloudCompute.Images.familystringThe name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
GoogleCloudCompute.Images.imageEncryptionKeystringEncrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
GoogleCloudCompute.Images.imageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.imageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.imageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.sourceDiskEncryptionKeystringThe customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Images.labelsstringLabels to apply to this image. These can be later modified by the setLabels method.
GoogleCloudCompute.Images.labelFingerprintstringA fingerprint for the labels being applied to this image, which is essentially a hash of the labels 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Images.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Images.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Images.licenseCodesstringInteger license codes indicating which licenses are attached to this image.
GoogleCloudCompute.Images.sourceImagestringURL of the source image used to create this image. This can be a full or valid partial URL.
GoogleCloudCompute.Images.sourceImageIdstringThe ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
GoogleCloudCompute.Images.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.sourceSnapshotstringURL of the source snapshot used to create this image. This can be a full or valid partial URL.
GoogleCloudCompute.Images.sourceSnapshotIdstringThe ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKeystringThe customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.kindstringType of the resource. Always compute#image for images.
Command Example#

Human Readable Output#

gcp-compute-list-images#


Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.

Base Command#

gcp-compute-list-images

Input#
Argument NameDescriptionRequired
projectProject ID for this request. if left empty configured project will be used.Optional
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Images.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Images.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Images.namestringName 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.
GoogleCloudCompute.Images.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Images.sourceTypestringThe type of the image used to create this disk. The default and only value is RAW
GoogleCloudCompute.Images.rawDiskstringThe parameters of the raw disk image.
GoogleCloudCompute.Images.rawDisk.sourcestringThe full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
GoogleCloudCompute.Images.rawDisk.sha1ChecksumstringAn optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
GoogleCloudCompute.Images.rawDisk.containerTypestringThe format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
GoogleCloudCompute.Images.deprecatedstringThe deprecation status associated with this image.
GoogleCloudCompute.Images.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.Images.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.Images.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Images.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Images.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Images.statusstringThe status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
GoogleCloudCompute.Images.archiveSizeBytesstringSize of the image tar.gz archive stored in Google Cloud Storage (in bytes).
GoogleCloudCompute.Images.diskSizeGbstringSize of the image when restored onto a persistent disk (in GB).
GoogleCloudCompute.Images.sourceDiskstringURL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values: https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk , projects/project/zones/zone/disks/disk , zones/zone/disks/disk
GoogleCloudCompute.Images.sourceDiskIdstringThe ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
GoogleCloudCompute.Images.licensesstringAny applicable license URI.
GoogleCloudCompute.Images.familystringThe name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
GoogleCloudCompute.Images.imageEncryptionKeystringEncrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
GoogleCloudCompute.Images.imageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.imageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.imageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.sourceDiskEncryptionKeystringThe customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Images.labelsstringLabels to apply to this image. These can be later modified by the setLabels method.
GoogleCloudCompute.Images.labelFingerprintstringA fingerprint for the labels being applied to this image, which is essentially a hash of the labels 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Images.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Images.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Images.licenseCodesstringInteger license codes indicating which licenses are attached to this image.
GoogleCloudCompute.Images.sourceImagestringURL of the source image used to create this image. This can be a full or valid partial URL.
GoogleCloudCompute.Images.sourceImageIdstringThe ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
GoogleCloudCompute.Images.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.sourceSnapshotstringURL of the source snapshot used to create this image. This can be a full or valid partial URL.
GoogleCloudCompute.Images.sourceSnapshotIdstringThe ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKeystringThe customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.kindstringType of the resource. Always compute#image for images.
Command Example#

!gcp-compute-list-images

Context Example#
{
"GoogleCloudCompute": {
"Images": null
}
}
Human Readable Output#

Google Cloud Compute Images#

No entries.

gcp-compute-delete-image#


Deletes the specified image.

Base Command#

gcp-compute-delete-image

Input#
Argument NameDescriptionRequired
imageName of the image resource to delete.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-set-image-labels#


Sets the labels on an image.

Base Command#

gcp-compute-set-image-labels

Input#
Argument NameDescriptionRequired
imageName or id of the resource for this request.Required
labelsAn object containing a list of "key": value pairs. Example: key=abc,value=123;key=abc,value=123Required
labelFingerprintThe fingerprint of the previous set of labels for this resource, used to detect conflicts. 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 when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-insert-image#


Creates an image in the specified project using the data included in the request.

Base Command#

gcp-compute-insert-image

Input#
Argument NameDescriptionRequired
nameName 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.Required
descriptionAn optional description of this resource. Provide this property when you create the resource.Optional
rawDiskSourceThe full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.Optional
rawDiskSha1ChecksumAn optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.Optional
rawDiskContainerTypeThe format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.Optional
deprecatedStateThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.Optional
deprecatedReplacementThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.Optional
archiveSizeBytesSize of the image tar.gz archive stored in Google Cloud Storage (in bytes).Optional
diskSizeGbSize of the image when restored onto a persistent disk (in GB).Optional
sourceDiskURL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values: https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk projects/project/zones/zone/disks/disk zones/zone/disks/disk Authorization requires the following Google IAM permission on the specified resource sourceDisk: compute.disks.useReadOnlyOptional
licensesAny applicable license URI. Authorization requires the following Google IAM permission on the specified resource licenses: compute.licenseCodes.useOptional
familyThe name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.Optional
imageEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
imageEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
sourceDiskEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
sourceDiskEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
labelsLabels to apply to this image. These can be later modified by the setLabels method. An object containing a list of "key": value pairs. Example: key=abc,value=123;key=abc,value=123Optional
labelFingerprintA fingerprint for the labels being applied to this image, which is essentially a hash of the labels 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, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an image.Optional
guestOsFeaturesA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.Optional
licenseCodesInteger license codes indicating which licenses are attached to this image. Authorization requires the following Google IAM permission on the specified resource licenseCodes: compute.licenseCodes.useOptional
sourceImageURL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of: this property, or the rawDisk.source property, or the sourceDisk property in order to create an image.Optional
sourceImageEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
sourceImageEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
sourceSnapshotURL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of: this property, or the sourceImage property, or the rawDisk.source property, or the sourceDisk property in order to create an image.Optional
sourceSnapshotEncryptionKeyRawKeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.Optional
sourceSnapshotEncryptionKeyKmsKeyNameThe name of the encryption key that is stored in Google Cloud KMS.Optional
forceCreateForce image creation if true.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-instance-groups-add-instances#


Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.

Base Command#

gcp-compute-instance-groups-add-instances

Input#
Argument NameDescriptionRequired
instanceGroupThe name of the instance group where you are adding instances.Required
zoneThe name of the zone where the instance group is located.Required
instancesThe list of instances to add to the instance group. comma separated.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-aggregated-list-instance-groups#


Retrieves the list of instance groups and sorts them by zone.

Base Command#

gcp-compute-aggregated-list-instance-groups

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#

There is no context output for this command.

Command Example#

!gcp-compute-aggregated-list-instance-groups

Context Example#
{
"GoogleCloudCompute": {
"InstanceGroups": [
{
"creationTimestamp": "creationTimestamp",
"description": "This instance group is controlled by Instance Group Manager 'mock_instance-grp'. To modify instances in this group, use the Instance Group Manager API: https://cloud.google.com/compute/docs/reference/latest/instanceGroupManagers",
"fingerprint": "fingerprint",
"id": "42",
"kind": "compute#instanceGroup",
"name": "mock_instance-grp",
"namedPorts": [
{
"name": "abc",
"port": 123
}
],
"network": "network",
"selfLink": "selfLink",
"size": 6,
"subnetwork": "subnetwork",
"zone": "https://www.mockapi.com/zones/"
}
]
}
}
Human Readable Output#

Google Cloud Compute Instance Groups#

idnamenetworkzone
42mock_instance-grpnetworkhttps://www.mockapi.com/zones/
42test01https://www.mockapi.com/zones/

gcp-compute-delete-instance-group#


Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. HTTP

Base Command#

gcp-compute-delete-instance-group

Input#
Argument NameDescriptionRequired
instanceGroupThe name of the instance group to delete.Required
zoneThe name of the zone where the instance group is located.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-get-instance-group#


Returns the specified instance group. Gets a list of available instance groups by making a list() request.

Base Command#

gcp-compute-get-instance-group

Input#
Argument NameDescriptionRequired
instanceGroupThe name of the instance group.Required
zoneThe name of the zone where the instance group is located.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.InstanceGroups.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.InstanceGroups.creationTimestampstringThe creation timestamp for this instance group in RFC3339 text format.
GoogleCloudCompute.InstanceGroups.namestringThe name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.InstanceGroups.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.InstanceGroups.namedPortsstringAssigns a name to a port number.
GoogleCloudCompute.InstanceGroups.namedPorts.namestringThe name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.InstanceGroups.namedPorts.portstringThe port number, which can be a value between 1 and 42.
GoogleCloudCompute.InstanceGroups.networkstringThe URL of the network to which all instances in the instance group belong.
GoogleCloudCompute.InstanceGroups.fingerprintstringThe fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
GoogleCloudCompute.InstanceGroups.zonestringThe URL of the zone where the instance group is located (for zonal resources).
GoogleCloudCompute.InstanceGroups.selfLinkstringThe URL for this instance group. The server generates this URL.
GoogleCloudCompute.InstanceGroups.sizestringThe total number of instances in the instance group.
GoogleCloudCompute.InstanceGroups.regionstringThe URL of the region where the instance group is located (for regional resources).
GoogleCloudCompute.InstanceGroups.subnetworkstringThe URL of the subnetwork to which all instances in the instance group belong
GoogleCloudCompute.InstanceGroups.kindstringThe resource type, which is always compute#instanceGroup for instance groups.
Command Example#

!gcp-compute-get-instance-group instanceGroup=mock_instance-grp zone=europe-west2-a

Context Example#
{
"GoogleCloudCompute": {
"InstanceGroups": {
"creationTimestamp": "creationTimestamp",
"description": "This instance group is controlled by Instance Group Manager 'mock_instance-grp'. To modify instances in this group, use the Instance Group Manager API: https://cloud.google.com/compute/docs/reference/latest/instanceGroupManagers",
"fingerprint": "fingerprint",
"id": "42",
"kind": "compute#instanceGroup",
"name": "mock_instance-grp",
"namedPorts": [
{
"name": "abc",
"port": 123
}
],
"network": "network",
"selfLink": "selfLink",
"size": 6,
"subnetwork": "subnetwork",
"zone": "https://www.mockapi.com/zones/"
}
}
}
Human Readable Output#

Google Cloud Compute Instance Groups#

idnamenetworkzone
42mock_instance-grpnetworkhttps://www.mockapi.com/zones/

gcp-compute-insert-instance-group#


Creates an instance group in the specified project using the parameters that are included in the request.

Base Command#

gcp-compute-insert-instance-group

Input#
Argument NameDescriptionRequired
nameThe name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.Required
zoneThe name of the zone where you want to create the instance group.Required
namedPortsAssigns a name to a port number. For example: name=abc,port=123;name=abc,port=123Optional
networkThe URL of the network to which all instances in the instance group belong.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-list-instance-groups#


Retrieves the list of instance groups that are located in the specified project and zone.

Base Command#

gcp-compute-list-instance-groups

Input#
Argument NameDescriptionRequired
zoneThe name of the zone where the instance group is located.Required
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.InstanceGroups.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.InstanceGroups.creationTimestampstringThe creation timestamp for this instance group in RFC3339 text format.
GoogleCloudCompute.InstanceGroups.namestringThe name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.InstanceGroups.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.InstanceGroups.namedPortsstringAssigns a name to a port number.
GoogleCloudCompute.InstanceGroups.namedPorts.namestringThe name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.InstanceGroups.namedPorts.portstringThe port number, which can be a value between 1 and 42.
GoogleCloudCompute.InstanceGroups.networkstringThe URL of the network to which all instances in the instance group belong.
GoogleCloudCompute.InstanceGroups.fingerprintstringThe fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.
GoogleCloudCompute.InstanceGroups.zonestringThe URL of the zone where the instance group is located (for zonal resources).
GoogleCloudCompute.InstanceGroups.selfLinkstringThe URL for this instance group. The server generates this URL.
GoogleCloudCompute.InstanceGroups.sizestringThe total number of instances in the instance group.
GoogleCloudCompute.InstanceGroups.regionstringThe URL of the region where the instance group is located (for regional resources).
GoogleCloudCompute.InstanceGroups.subnetworkstringThe URL of the subnetwork to which all instances in the instance group belong
GoogleCloudCompute.InstanceGroups.kindstringThe resource type, which is always compute#instanceGroup for instance groups.
Command Example#

!gcp-compute-list-instance-groups zone=europe-west2-a

Context Example#
{
"GoogleCloudCompute": {
"InstanceGroups": [
{
"creationTimestamp": "creationTimestamp",
"description": "This instance group is controlled by Instance Group Manager 'mock_instance-grp'. To modify instances in this group, use the Instance Group Manager API: https://cloud.google.com/compute/docs/reference/latest/instanceGroupManagers",
"fingerprint": "fingerprint",
"id": "42",
"kind": "compute#instanceGroup",
"name": "mock_instance-grp",
"namedPorts": [
{
"name": "abc",
"port": 123
}
],
"network": "network",
"selfLink": "selfLink",
"size": 6,
"subnetwork": "subnetwork",
"zone": "https://www.mockapi.com/zones/"
},
{
"creationTimestamp": "creationTimestamp",
"description": "",
"fingerprint": "fingerprint",
"id": "42",
"kind": "compute#instanceGroup",
"name": "test01",
"selfLink": "selfLink",
"size": 0,
"zone": "https://www.mockapi.com/zones/"
}
]
}
}
Human Readable Output#

Google Cloud Compute Instance Groups#

creationTimestampdescriptionfingerprintidkindnamenamedPortsnetworkselfLinksizesubnetworkzone
2020-04-21T02:13:05.599-07:00This instance group is controlled by Instance Group Manager 'mock_instance-grp'. To modify instances in this group, use the Instance Group Manager API: https://cloud.google.com/compute/docs/reference/latest/instanceGroupManagerstH9xjDSGfNw=42compute#instanceGroupmock_instance-grp{u'name': u'abc', u'port': 123}networkhttps://www.mockapi.com/zones//instanceGroups/mock_instance-grp6subnetworkhttps://www.mockapi.com/zones/
2020-04-30T05:49:45.272-07:0042WmSpB8rSM=42compute#instanceGrouptest01https://www.mockapi.com/zones//instanceGroups/test010https://www.mockapi.com/zones/

gcp-compute-list-instance-group-instances#


Lists the instances in the specified instance group.

Base Command#

gcp-compute-list-instance-group-instances

Input#
Argument NameDescriptionRequired
zoneThe name of the zone where the instance group is located.Required
instanceGroupThe name of the instance group from which you want to generate a list of included instances.Required
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
instanceStateA filter for the state of the instances in the instance group. Valid options are ALL or RUNNING. If you do not specify this parameter the list includes all instances regardless of their state.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.InstanceGroupsInstances.Instances.instancestringThe URL of the instance.
GoogleCloudCompute.InstanceGroupsInstances.Instances.statusstringThe status of the instance
GoogleCloudCompute.InstanceGroupsInstances.Instances.namedPortsstringThe named ports that belong to this instance group.
GoogleCloudCompute.InstanceGroupsInstances.Instances.namedPorts.namestringThe name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.InstanceGroupsInstances.Instances.namedPorts.portstringThe port number, which can be a value between 1 and 42.
GoogleCloudCompute.InstanceGroupsInstances.GroupUnknownThe group listed.
Command Example#

!gcp-compute-list-instance-group-instances instanceGroup=mock_instance-grp zone=europe-west2-a

Context Example#
{
"GoogleCloudCompute": {
"InstanceGroupsInstances": {
"Group": "mock_instance-grp",
"Instances": [
{
"instance": "https://www.mockapi.com/zones/instances/mock-disk",
"namedPorts": [
{
"name": "abc",
"port": 123
}
],
"status": "RUNNING"
}
]
}
}
}
Human Readable Output#

Google Cloud Compute Instance Groups#

instancestatus
https://www.mockapi.com/zones/instances/mock-diskRUNNING

gcp-compute-instance-groups-remove-instances#


Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.

Base Command#

gcp-compute-instance-groups-remove-instances

Input#
Argument NameDescriptionRequired
instanceGroupThe name of the instance group where the specified instances will be removed.Required
zoneThe name of the zone where the instance group is located.Required
instancesThe list of instances to remove from the instance group. comma separated.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-set-group-instance-named-ports#


Sets the named ports for the specified instance group.

Base Command#

gcp-compute-set-group-instance-named-ports

Input#
Argument NameDescriptionRequired
instanceGroupThe name of the instance group where the named ports are updated.Required
zoneThe name of the zone where the instance group is located.Required
namedPortsThe list of named ports to set for this instance group. example: name=abc,port=123;name=abc,port=123Required
fingerprintThe fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. A request with an incorrect fingerprint will fail with error 412 conditionNotMet.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-set-group-instance-named-ports instanceGroup=mock_instance-grp namedPorts=name=abc,port=123 zone=europe-west2-a

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:15:46.680-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "compute.instanceGroups.setNamedPorts",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:15:46.693-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/zones//instanceGroups/mock_instance-grp",
"user": "user",
"zone": "https://www.mockapi.com/zones/"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationcompute.instanceGroups.setNamedPorts0RUNNING

gcp-compute-get-region#


Returns the specified Region resource. Gets a list of available regions by making a list() request.

Base Command#

gcp-compute-get-region

Input#
Argument NameDescriptionRequired
regionName of the region resource to return.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Regions.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Regions.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Regions.namestringName of the resource.
GoogleCloudCompute.Regions.descriptionstringTextual description of the resource.
GoogleCloudCompute.Regions.statusstringStatus of the region, either UP or DOWN.
GoogleCloudCompute.Regions.zonesstringA list of zones available in this region, in the form of resource URLs.
GoogleCloudCompute.Regions.quotasstringQuotas assigned to this region.
GoogleCloudCompute.Regions.quotas.metricstringName of the quota metric.
GoogleCloudCompute.Regions.quotas.limitstringQuota limit for this metric.
GoogleCloudCompute.Regions.quotas.usagestringCurrent usage of this metric.
GoogleCloudCompute.Regions.quotas.ownerstringOwning resource. This is the resource on which this quota is applied.
GoogleCloudCompute.Regions.deprecatedstringThe deprecation status associated with this region.
GoogleCloudCompute.Regions.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.Regions.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.Regions.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Regions.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Regions.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Regions.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Regions.kindstringType of the resource. Always compute#region for regions.
Command Example#

!gcp-compute-get-region region=europe-west2

Context Example#
{
"GoogleCloudCompute": {
"Regions": {
"creationTimestamp": "creationTimestamp",
"description": "europe-west2",
"id": "1290",
"kind": "compute#region",
"name": "europe-west2",
"quotas": [
{
"limit": 72,
"metric": "CPUS",
"usage": 12
}
],
"selfLink": "selfLink",
"status": "UP",
"zones": [
"https://www.mockapi.com/zones"
]
}
}
}
Human Readable Output#

Google Cloud Compute Regions#

idnamestatus
1290europe-west2UP

gcp-compute-list-regions#


Retrieves the list of region resources available to the specified project.

Base Command#

gcp-compute-list-regions

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Regions.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Regions.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Regions.namestringName of the resource.
GoogleCloudCompute.Regions.descriptionstringTextual description of the resource.
GoogleCloudCompute.Regions.statusstringStatus of the region, either UP or DOWN.
GoogleCloudCompute.Regions.zonesstringA list of zones available in this region, in the form of resource URLs.
GoogleCloudCompute.Regions.quotasstringQuotas assigned to this region.
GoogleCloudCompute.Regions.quotas.metricstringName of the quota metric.
GoogleCloudCompute.Regions.quotas.limitstringQuota limit for this metric.
GoogleCloudCompute.Regions.quotas.usagestringCurrent usage of this metric.
GoogleCloudCompute.Regions.quotas.ownerstringOwning resource. This is the resource on which this quota is applied.
GoogleCloudCompute.Regions.deprecatedstringThe deprecation status associated with this region.
GoogleCloudCompute.Regions.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.Regions.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.Regions.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Regions.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Regions.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Regions.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Regions.kindstringType of the resource. Always compute#region for regions.
Command Example#

!gcp-compute-list-regions

Context Example#
{
"GoogleCloudCompute": {
"Regions": [
{
"creationTimestamp": "creationTimestamp",
"description": "asia-east1",
"id": "1220",
"kind": "compute#region",
"name": "asia-east1",
"quotas": [
{
"limit": 72,
"metric": "CPUS",
"usage": 0
}
],
"selfLink": "selfLink",
"status": "UP",
"zones": [
"https://www.mockapi.com/zones/asia-east1-a",
"https://www.mockapi.com/zones/asia-east1-b",
"https://www.mockapi.com/zones/asia-east1-c"
]
}
]
}
}
Human Readable Output#

Google Cloud Compute Regions#

idnamestatus
1220asia-east1UP
1370asia-east2UP
1250asia-northeast1UP
1390asia-northeast2UP
1410asia-northeast3UP
1320asia-south1UP
1260asia-southeast1UP
1280australia-southeast1UP
1350europe-north1UP
1100europe-west1UP
1290europe-west2UP
1300europe-west3UP
1340europe-west4UP
1380europe-west6UP
1330northamerica-northeast1UP
1310southamerica-east1UP
1000us-central1UP
1230us-east1UP
1270us-east4UP
1210us-west1UP
1360us-west2UP
1420us-west3UP
1430us-west4UP

gcp-compute-get-zone#


Returns the specified Zone resource. Gets a list of available zones by making a list() request.

Base Command#

gcp-compute-get-zone

Input#
Argument NameDescriptionRequired
zoneName of the zone resource to return.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Zones.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Zones.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Zones.namestringName of the resource.
GoogleCloudCompute.Zones.descriptionstringTextual description of the resource.
GoogleCloudCompute.Zones.statusstringStatus of the zone, either UP or DOWN.
GoogleCloudCompute.Zones.deprecatedstringThe deprecation status associated with this zone.
GoogleCloudCompute.Zones.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.Zones.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.Zones.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Zones.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Zones.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Zones.regionstringFull URL reference to the region which hosts the zone.
GoogleCloudCompute.Zones.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Zones.availableCpuPlatformsstringAvailable cpu/platform selections for the zone. Do not use field = 7 or field = 11. Next available field = 14.
GoogleCloudCompute.Zones.kindstringType of the resource. Always compute#zone for zones.
Command Example#

!gcp-compute-get-zone zone=europe-west2-c

Context Example#
{
"GoogleCloudCompute": {
"Zones": {
"availableCpuPlatforms": [
"Intel Cascade Lake",
"Intel Skylake",
"Intel Broadwell",
"Intel Haswell",
"Intel Ivy Bridge",
"Intel Sandy Bridge"
],
"creationTimestamp": "creationTimestamp",
"description": "europe-west2-c",
"id": "2292",
"kind": "compute#zone",
"name": "europe-west2-c",
"region": "https://www.mockapi.com/regions/europe-west2",
"selfLink": "selfLink",
"status": "UP"
}
}
}
Human Readable Output#

Google Cloud Compute Zones#

idnamestatus
2292europe-west2-cUP

gcp-compute-list-zones#


Retrieves the list of Zone resources available to the specified project.

Base Command#

gcp-compute-list-zones

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Zones.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Zones.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Zones.namestringName of the resource.
GoogleCloudCompute.Zones.descriptionstringTextual description of the resource.
GoogleCloudCompute.Zones.statusstringStatus of the zone, either UP or DOWN.
GoogleCloudCompute.Zones.deprecatedstringThe deprecation status associated with this zone.
GoogleCloudCompute.Zones.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.Zones.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.Zones.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Zones.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Zones.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.Zones.regionstringFull URL reference to the region which hosts the zone.
GoogleCloudCompute.Zones.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Zones.availableCpuPlatformsstringAvailable cpu/platform selections for the zone. Do not use field = 7 or field = 11. Next available field = 14.
GoogleCloudCompute.Zones.kindstringType of the resource. Always compute#zone for zones.
Command Example#

!gcp-compute-list-zones

Context Example#
{
"GoogleCloudCompute": {
"Zones": [
{
"availableCpuPlatforms": [
"Intel Cascade Lake",
"Intel Skylake",
"Intel Broadwell",
"Intel Haswell",
"Intel Ivy Bridge",
"Intel Sandy Bridge"
],
"creationTimestamp": "creationTimestamp",
"description": "us-east1-b",
"id": "2231",
"kind": "compute#zone",
"name": "us-east1-b",
"region": "https://www.mockapi.com/regions/us-east1",
"selfLink": "selfLink",
"status": "UP"
}
]
}
}
Human Readable Output#

Google Cloud Compute Zones#

idnamestatus
2231us-east1-bUP
2233us-east1-cUP
2234us-east1-dUP
2272us-east4-cUP
2271us-east4-bUP
2270us-east4-aUP
2002us-central1-cUP
2000us-central1-aUP
2004us-central1-fUP
2001us-central1-bUP
2211us-west1-bUP
2212us-west1-cUP
2210us-west1-aUP
2342europe-west4-aUP
2341europe-west4-bUP
2340europe-west4-cUP
2101europe-west1-bUP
2104europe-west1-dUP
2103europe-west1-cUP
2300europe-west3-cUP
2301europe-west3-aUP
2302europe-west3-bUP
2292europe-west2-cUP
2291europe-west2-bUP
2290europe-west2-aUP
2221asia-east1-bUP
2220asia-east1-aUP
2222asia-east1-cUP
2261asia-southeast1-bUP
2260asia-southeast1-aUP
2262asia-southeast1-cUP
2251asia-northeast1-bUP
2252asia-northeast1-cUP
2250asia-northeast1-aUP
2322asia-south1-cUP
2320asia-south1-bUP
2321asia-south1-aUP
2282australia-southeast1-bUP
2280australia-southeast1-cUP
2281australia-southeast1-aUP
2311southamerica-east1-bUP
2312southamerica-east1-cUP
2310southamerica-east1-aUP
2372asia-east2-aUP
2371asia-east2-bUP
2370asia-east2-cUP
2392asia-northeast2-aUP
2390asia-northeast2-bUP
2391asia-northeast2-cUP
2410asia-northeast3-aUP
2412asia-northeast3-bUP
2411asia-northeast3-cUP
2352europe-north1-aUP
2350europe-north1-bUP
2351europe-north1-cUP
2382europe-west6-aUP
2380europe-west6-bUP
2381europe-west6-cUP
2330northamerica-northeast1-aUP
2331northamerica-northeast1-bUP
2332northamerica-northeast1-cUP
2362us-west2-aUP
2361us-west2-bUP
2360us-west2-cUP
2420us-west3-aUP
2421us-west3-bUP
2422us-west3-cUP
2431us-west4-aUP
2432us-west4-bUP
2430us-west4-cUP

gcp-compute-aggregated-list-machine-types#


Retrieves an aggregated list of machine types.

Base Command#

gcp-compute-aggregated-list-machine-types

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.MachineTypes.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.MachineTypes.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.MachineTypes.namestringName of the resource.
GoogleCloudCompute.MachineTypes.descriptionstringAn optional textual description of the resource.
GoogleCloudCompute.MachineTypes.guestCpusnumberThe number of virtual CPUs that are available to the instance.
GoogleCloudCompute.MachineTypes.memoryMbnumberThe amount of physical memory available to the instance, defined in MB.
GoogleCloudCompute.MachineTypes.imageSpaceGbnumberThis property is deprecated and will never be populated with any relevant values.
GoogleCloudCompute.MachineTypes.scratchDisksstringA list of extended scratch disks assigned to the instance.
GoogleCloudCompute.MachineTypes.scratchDisks.diskGbnumberSize of the scratch disk, defined in GB.
GoogleCloudCompute.MachineTypes.maximumPersistentDisksnumberMaximum persistent disks allowed.
GoogleCloudCompute.MachineTypes.maximumPersistentDisksSizeGbstringMaximum total persistent disks size (GB) allowed.
GoogleCloudCompute.MachineTypes.deprecatedstringThe deprecation status associated with this machine type.
GoogleCloudCompute.MachineTypes.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.MachineTypes.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.MachineTypes.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.MachineTypes.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.MachineTypes.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.MachineTypes.zonestringThe name of the zone where the machine type resides, such as us-central1-a.
GoogleCloudCompute.MachineTypes.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.MachineTypes.isSharedCpubooleanWhether this machine type has a shared CPU. See Shared-core machine types for more information.
GoogleCloudCompute.MachineTypes.kindstringThe type of the resource. Always compute#machineType for machine types.
Command Example#

Human Readable Output#

gcp-compute-get-machine-type#


Returns the specified machine type. Gets a list of available machine types by making a list() request.

Base Command#

gcp-compute-get-machine-type

Input#
Argument NameDescriptionRequired
machineTypeName of the machine type to return.Required
zoneThe name of the zone for this request.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.MachineTypes.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.MachineTypes.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.MachineTypes.namestringName of the resource.
GoogleCloudCompute.MachineTypes.descriptionstringAn optional textual description of the resource.
GoogleCloudCompute.MachineTypes.guestCpusnumberThe number of virtual CPUs that are available to the instance.
GoogleCloudCompute.MachineTypes.memoryMbnumberThe amount of physical memory available to the instance, defined in MB.
GoogleCloudCompute.MachineTypes.imageSpaceGbnumberThis property is deprecated and will never be populated with any relevant values.
GoogleCloudCompute.MachineTypes.scratchDisksstringA list of extended scratch disks assigned to the instance.
GoogleCloudCompute.MachineTypes.scratchDisks.diskGbnumberSize of the scratch disk, defined in GB.
GoogleCloudCompute.MachineTypes.maximumPersistentDisksnumberMaximum persistent disks allowed.
GoogleCloudCompute.MachineTypes.maximumPersistentDisksSizeGbstringMaximum total persistent disks size (GB) allowed.
GoogleCloudCompute.MachineTypes.deprecatedstringThe deprecation status associated with this machine type.
GoogleCloudCompute.MachineTypes.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.MachineTypes.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.MachineTypes.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.MachineTypes.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.MachineTypes.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.MachineTypes.zonestringThe name of the zone where the machine type resides, such as us-central1-a.
GoogleCloudCompute.MachineTypes.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.MachineTypes.isSharedCpubooleanWhether this machine type has a shared CPU. See Shared-core machine types for more information.
GoogleCloudCompute.MachineTypes.kindstringThe type of the resource. Always compute#machineType for machine types.
Command Example#

!gcp-compute-get-machine-type machineType=c2-standard-16 zone=europe-west2-a

Context Example#
{
"GoogleCloudCompute": {
"MachineTypes": {
"creationTimestamp": "creationTimestamp",
"description": "Compute Optimized: 16 vCPUs, 64 GB RAM",
"guestCpus": 16,
"id": "42",
"imageSpaceGb": 0,
"isSharedCpu": false,
"kind": "compute#machineType",
"maximumPersistentDisks": 128,
"maximumPersistentDisksSizeGb": "42",
"memoryMb": 42,
"name": "c2-standard-16",
"selfLink": "selfLink",
"zone": "europe-west2-a"
}
}
}
Human Readable Output#

Google Cloud Compute Machine Types#

guestCpusidmemoryMbname
164242c2-standard-16

gcp-compute-list-machine-types#


Retrieves a list of machine types available to the specified project.

Base Command#

gcp-compute-list-machine-types

Input#
Argument NameDescriptionRequired
zoneThe name of the zone for this request.Required
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.MachineTypes.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.MachineTypes.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.MachineTypes.namestringName of the resource.
GoogleCloudCompute.MachineTypes.descriptionstringAn optional textual description of the resource.
GoogleCloudCompute.MachineTypes.guestCpusnumberThe number of virtual CPUs that are available to the instance.
GoogleCloudCompute.MachineTypes.memoryMbnumberThe amount of physical memory available to the instance, defined in MB.
GoogleCloudCompute.MachineTypes.imageSpaceGbnumberThis property is deprecated and will never be populated with any relevant values.
GoogleCloudCompute.MachineTypes.scratchDisksstringA list of extended scratch disks assigned to the instance.
GoogleCloudCompute.MachineTypes.scratchDisks.diskGbnumberSize of the scratch disk, defined in GB.
GoogleCloudCompute.MachineTypes.maximumPersistentDisksnumberMaximum persistent disks allowed.
GoogleCloudCompute.MachineTypes.maximumPersistentDisksSizeGbstringMaximum total persistent disks size (GB) allowed.
GoogleCloudCompute.MachineTypes.deprecatedstringThe deprecation status associated with this machine type.
GoogleCloudCompute.MachineTypes.deprecated.statestringThe deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
GoogleCloudCompute.MachineTypes.deprecated.replacementstringThe URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
GoogleCloudCompute.MachineTypes.deprecated.deprecatedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.MachineTypes.deprecated.obsoletestringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.MachineTypes.deprecated.deletedstringAn optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
GoogleCloudCompute.MachineTypes.zonestringThe name of the zone where the machine type resides, such as us-central1-a.
GoogleCloudCompute.MachineTypes.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.MachineTypes.isSharedCpubooleanWhether this machine type has a shared CPU. See Shared-core machine types for more information.
GoogleCloudCompute.MachineTypes.kindstringThe type of the resource. Always compute#machineType for machine types.
Command Example#

!gcp-compute-list-machine-types zone=europe-west2-a

Context Example#
{
"GoogleCloudCompute": {
"MachineTypes": [
{
"creationTimestamp": "creationTimestamp",
"description": "Compute Optimized: 16 vCPUs, 64 GB RAM",
"guestCpus": 16,
"id": "42",
"imageSpaceGb": 0,
"isSharedCpu": false,
"kind": "compute#machineType",
"maximumPersistentDisks": 128,
"maximumPersistentDisksSizeGb": "42",
"memoryMb": 42,
"name": "c2-standard-16",
"selfLink": "selfLink",
"zone": "europe-west2-a"
}
]
}
}
Human Readable Output#

Google Cloud Compute Machine Types#

guestCpusidmemoryMbname
164242c2-standard-16

gcp-compute-networks-add-peering#


Adds a peering to the specified network.

Base Command#

gcp-compute-networks-add-peering

Input#
Argument NameDescriptionRequired
networkName of the network resource to add peering to.Required
nameName of the peering, which should conform to RFC1035.Optional
peerNetworkURL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.Optional
networkPeeringNameName of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.Optional
networkPeeringNetworkThe URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.Optional
networkPeeringExchangeSubnetRoutesWhether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-delete-network#


Deletes the specified network.

Base Command#

gcp-compute-delete-network

Input#
Argument NameDescriptionRequired
networkName of the network to delete.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-delete-network network=a-1-2

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:16:10.963-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "delete",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:16:10.987-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/global/networks/a-1-2",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationdelete0RUNNING

gcp-compute-insert-network#


Creates a network in the specified project using the data included in the request.

Base Command#

gcp-compute-insert-network

Input#
Argument NameDescriptionRequired
nameName 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.Required
descriptionAn optional description of this resource. Provide this property when you create the resource.Optional
autoCreateSubnetworksWhen set to true, the VPC network is created in "auto" mode. When set to false, the VPC network is created in "custom" mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges.Optional
routingConfigRoutingModeThe network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnets of this network, across regions.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-insert-network name=a-1-2

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:13:40.114-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "insert",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:13:40.128-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/global/networks/a-1-2",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationinsert0RUNNING

gcp-compute-list-networks#


Retrieves the list of networks available to the specified project.

Base Command#

gcp-compute-list-networks

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Networks.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Networks.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Networks.namestringName 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.
GoogleCloudCompute.Networks.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Networks.gatewayIPv4stringThe gateway address for default routing out of the network. This value is read only and is selected by GCP.
GoogleCloudCompute.Networks.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Networks.autoCreateSubnetworksbooleanWhen set to true, the VPC network is created in "auto" mode. When set to false, the VPC network is created in "custom" mode.
GoogleCloudCompute.Networks.subnetworksstringServer-defined fully-qualified URLs for all subnetworks in this VPC network.
GoogleCloudCompute.Networks.peeringsstringA list of network peerings for the resource.
GoogleCloudCompute.Networks.peerings.namestringName of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
GoogleCloudCompute.Networks.peerings.networkstringThe URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.
GoogleCloudCompute.Networks.peerings.statestringState for the peering.
GoogleCloudCompute.Networks.peerings.stateDetailsstringDetails about the current state of the peering.
GoogleCloudCompute.Networks.peerings.autoCreateRoutesbooleanThis field will be deprecated soon. Prefer using exchangeSubnetRoutes instead. Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.
GoogleCloudCompute.Networks.peerings.exchangeSubnetRoutesbooleanWhether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.
GoogleCloudCompute.Networks.routingConfigstringThe network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.
GoogleCloudCompute.Networks.routingConfig.routingModestringThe network-wide routing mode to use. If set to REGIONAL, this networks cloud routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this networks cloud routers will advertise routes with all subnets of this network, across regions.
GoogleCloudCompute.Networks.kindstringType of the resource. Always compute#network for networks.
Command Example#

!gcp-compute-list-networks

Context Example#
{
"GoogleCloudCompute": {
"Networks": [
{
"IPv4Range": "8.8.8.8/16",
"creationTimestamp": "creationTimestamp",
"gatewayIPv4": "8.8.8.8",
"id": "42",
"kind": "compute#network",
"name": "a-1-2",
"routingConfig": {
"routingMode": "REGIONAL"
},
"selfLink": "selfLink"
}
]
}
}
Human Readable Output#

Google Cloud Compute Networks#

idname
42a-1-2

gcp-compute-networks-remove-peering#


Removes a peering from the specified network.

Base Command#

gcp-compute-networks-remove-peering

Input#
Argument NameDescriptionRequired
networkName of the network resource to remove peering from.Required
nameName of the peering, which should conform to RFC1035.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-wait-for-zone-operation#


Wait for a zone operation to complete ,NOTE this command will occupy a system resource

Base Command#

gcp-compute-wait-for-zone-operation

Input#
Argument NameDescriptionRequired
zoneName of the zone for this request.Required
nameName of the Operations resourceRequired
Context Output#

There is no context output for this command.

Command Example#

Human Readable Output#

gcp-compute-wait-for-region-operation#


Wait for a region operation to complete ,NOTE this command will occupy a system resource

Base Command#

gcp-compute-wait-for-region-operation

Input#
Argument NameDescriptionRequired
regionName of the region for this request.Required
nameName of the Operations resourceRequired
Context Output#

There is no context output for this command.

Command Example#

Human Readable Output#

gcp-compute-wait-for-global-operation#


Wait for a global operation to complete ,NOTE this command will occupy a system resource

Base Command#

gcp-compute-wait-for-global-operation

Input#
Argument NameDescriptionRequired
nameName of the Operations resourceRequired
Context Output#

There is no context output for this command.

Command Example#

Human Readable Output#

gcp-compute-insert-firewall#


Creates a firewall rule in the specified project using the data included in the request.

Base Command#

gcp-compute-insert-firewall

Input#
Argument NameDescriptionRequired
nameName 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.Required
descriptionAn optional description of this resource. Provide this property when you create the resource.Optional
networkURL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is usedOptional
priorityPriority for this rule. This is an integer between 0 and 42, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.Optional
sourceRangesIf source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported. comma separated.Optional
destinationRangesIf destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported. comma separated.Optional
sourceTagsIf source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. comma separated.Optional
targetTagsA list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. comma separated.Optional
sourceServiceAccountsIf source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. comma separated.Optional
targetServiceAccountsA list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. comma separated.Optional
allowedThe list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. Ex: ipprotocol=tcp,ports=22,443;ipprotocol=tcp,ports=8080,80Optional
deniedThe list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. Ex: ipprotocol=tcp,ports=22,443;ipprotocol=tcp,ports=8080,80Optional
directionDirection of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.Optional
logConfigEnableThis field denotes whether to enable logging for a particular firewall rule.Optional
disabledDenotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.Optional
project_idProject ID that you want to run this command on.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-insert-firewall name=a-1-2-3 allowed=ipprotocol=tcp,ports=22,443

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:13:33.512-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "insert",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:13:33.567-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/global/firewalls/a-1-2-3",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationinsert0RUNNING

gcp-compute-patch-firewall#


Updates the specified firewall rule with the data included in the request.

Base Command#

gcp-compute-patch-firewall

Input#
Argument NameDescriptionRequired
nameName 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.Required
descriptionAn optional description of this resource. Provide this property when you create the resource.Optional
networkURL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is usedOptional
priorityPriority for this rule. This is an integer between 0 and 42, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.Optional
sourceRangesIf source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported. comma separated.Optional
destinationRangesIf destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported. comma separated.Optional
sourceTagsIf source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. comma separated.Optional
targetTagsA list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. comma separated.Optional
sourceServiceAccountsIf source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. comma separated.Optional
targetServiceAccountsA list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. comma separated.Optional
allowedThe list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. Ex: ipprotocol=tcp,ports=22,443;ipprotocol=tcp,ports=8080,80Optional
deniedThe list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. Ex: ipprotocol=tcp,ports=22,443;ipprotocol=tcp,ports=8080,80Optional
directionDirection of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.Optional
logConfigEnableThis field denotes whether to enable logging for a particular firewall rule.Optional
disabledDenotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-patch-firewall name=default-allow-https

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:15:50.115-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "patch",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:15:50.133-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/global/firewalls/default-allow-https",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationpatch0RUNNING

gcp-compute-list-firewall#


Retrieves the list of firewall rules available to the specified project.

Base Command#

gcp-compute-list-firewall

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
project_idProject ID that you want to run this command on.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Firewalls.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Firewalls.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Firewalls.namestringName 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.
GoogleCloudCompute.Firewalls.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Firewalls.networkstringURL of the network resource for this firewall rule
GoogleCloudCompute.Firewalls.prioritynumberPriority for this rule. This is an integer between 0 and 42, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.
GoogleCloudCompute.Firewalls.sourceRangesstringIf source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
GoogleCloudCompute.Firewalls.destinationRangesstringIf destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
GoogleCloudCompute.Firewalls.sourceTagsstringIf source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
GoogleCloudCompute.Firewalls.targetTagsstringA list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
GoogleCloudCompute.Firewalls.sourceServiceAccountsstringIf source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
GoogleCloudCompute.Firewalls.targetServiceAccountsstringA list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
GoogleCloudCompute.Firewalls.allowedUnknownThe list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
GoogleCloudCompute.Firewalls.allowed.IPProtocolstringThe IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
GoogleCloudCompute.Firewalls.allowed.portsstringAn optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
GoogleCloudCompute.Firewalls.deniedUnknownThe list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
GoogleCloudCompute.Firewalls.denied.IPProtocolstringThe IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
GoogleCloudCompute.Firewalls.denied.portsstringAn optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
GoogleCloudCompute.Firewalls.directionstringDirection of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.
GoogleCloudCompute.Firewalls.logConfigUnknownThis field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
GoogleCloudCompute.Firewalls.logConfig.enablebooleanThis field denotes whether to enable logging for a particular firewall rule.
GoogleCloudCompute.Firewalls.disabledbooleanDenotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
GoogleCloudCompute.Firewalls.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Firewalls.kindstringType of the resource. Always compute#firewall for firewall rules.
Command Example#

!gcp-compute-list-firewall

Context Example#
{
"GoogleCloudCompute": {
"Firewalls": [
{
"allowed": [
{
"IPProtocol": "tcp",
"ports": [
"22",
"443"
]
}
],
"creationTimestamp": "creationTimestamp",
"description": "",
"direction": "INGRESS",
"disabled": false,
"id": "42",
"kind": "compute#firewall",
"logConfig": {
"enable": false
},
"name": "a-1-2-3",
"network": "network",
"priority": 1000,
"selfLink": "selfLink",
"sourceRanges": [
"0.0.0.0/0"
]
}
]
}
}
Human Readable Output#

Google Cloud Compute Firewalls#

namenetworkpriority
a-1-2-3network1000

gcp-compute-get-firewall#


Returns the specified firewall.

Base Command#

gcp-compute-get-firewall

Input#
Argument NameDescriptionRequired
nameName of the firewall rule to return.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Firewalls.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Firewalls.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Firewalls.namestringName 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.
GoogleCloudCompute.Firewalls.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Firewalls.networkstringURL of the network resource for this firewall rule
GoogleCloudCompute.Firewalls.prioritynumberPriority for this rule. This is an integer between 0 and 42, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.
GoogleCloudCompute.Firewalls.sourceRangesstringIf source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
GoogleCloudCompute.Firewalls.destinationRangesstringIf destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
GoogleCloudCompute.Firewalls.sourceTagsstringIf source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
GoogleCloudCompute.Firewalls.targetTagsstringA list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
GoogleCloudCompute.Firewalls.sourceServiceAccountsstringIf source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
GoogleCloudCompute.Firewalls.targetServiceAccountsstringA list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
GoogleCloudCompute.Firewalls.allowedUnknownThe list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
GoogleCloudCompute.Firewalls.allowed.IPProtocolstringThe IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
GoogleCloudCompute.Firewalls.allowed.portsstringAn optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
GoogleCloudCompute.Firewalls.deniedUnknownThe list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
GoogleCloudCompute.Firewalls.denied.IPProtocolstringThe IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
GoogleCloudCompute.Firewalls.denied.portsstringAn optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
GoogleCloudCompute.Firewalls.directionstringDirection of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.
GoogleCloudCompute.Firewalls.logConfigUnknownThis field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
GoogleCloudCompute.Firewalls.logConfig.enablebooleanThis field denotes whether to enable logging for a particular firewall rule.
GoogleCloudCompute.Firewalls.disabledbooleanDenotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
GoogleCloudCompute.Firewalls.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Firewalls.kindstringType of the resource. Always compute#firewall for firewall rules.
Command Example#

!gcp-compute-get-firewall name=default-allow-https

Context Example#
{
"GoogleCloudCompute": {
"Firewalls": {
"allowed": [
{
"IPProtocol": "tcp",
"ports": [
"443"
]
}
],
"creationTimestamp": "creationTimestamp",
"description": "",
"direction": "INGRESS",
"disabled": false,
"id": "42",
"kind": "compute#firewall",
"logConfig": {
"enable": false
},
"name": "default-allow-https",
"network": "network",
"priority": 1000,
"selfLink": "selfLink",
"sourceRanges": [
"0.0.0.0/0"
],
"targetTags": [
"https-server"
]
}
}
}
Human Readable Output#

Google Cloud Compute Firewalls#

namenetworkpriority
default-allow-httpsnetwork1000

gcp-compute-delete-firewall#


Deletes the specified firewall.

Base Command#

gcp-compute-delete-firewall

Input#
Argument NameDescriptionRequired
nameName of the firewall rule to delete.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-set-snapshot-labels#


Sets the labels on a snapshot.

Base Command#

gcp-compute-set-snapshot-labels

Input#
Argument NameDescriptionRequired
nameName or id of the resource for this request.Required
labelsA list of labels to apply for this resource. Each label key & value must 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. For example, key=abc,value=123;key=abc,value=123Required
labelFingerprintThe fingerprint of the previous set of labels for this resource, used to detect conflicts. 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 when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

Human Readable Output#

gcp-compute-list-snapshots#


Retrieves the list of Snapshot resources contained within the specified project.

Base Command#

gcp-compute-list-snapshots

Input#
Argument NameDescriptionRequired
maxResultsThe maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)Optional
filtersA filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.Optional
orderBySorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.Optional
pageTokenSpecifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Snapshots.idstringThe unique identifier for the resource. This identifier is defined by the server
GoogleCloudCompute.Snapshots.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Snapshots.namestringName 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.
GoogleCloudCompute.Snapshots.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Snapshots.statusstringThe status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
GoogleCloudCompute.Snapshots.sourceDiskstringThe source disk used to create this snapshot.
GoogleCloudCompute.Snapshots.sourceDiskIdstringThe ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.
GoogleCloudCompute.Snapshots.diskSizeGbstringSize of the snapshot, specified in GB.
GoogleCloudCompute.Snapshots.storageBytesstringA size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion
GoogleCloudCompute.Snapshots.storageBytesStatusstringAn indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.
GoogleCloudCompute.Snapshots.licensesstringA list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).
GoogleCloudCompute.Snapshots.snapshotEncryptionKeyunknownEncrypts the snapshot using a customer-supplied encryption key. After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the image later For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request. Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later.
GoogleCloudCompute.Snapshots.snapshotEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Snapshots.snapshotEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Snapshots.snapshotEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Snapshots.sourceDiskEncryptionKeyUnknownThe customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Snapshots.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Snapshots.labelsUnknownLabels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
GoogleCloudCompute.Snapshots.labels.keystringThe label key.
GoogleCloudCompute.Snapshots.labels.valuestringThe label value.
GoogleCloudCompute.Snapshots.labelFingerprintstringA fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Snapshots.licenseCodesstringInteger license codes indicating which licenses are attached to this snapshot.
GoogleCloudCompute.Snapshots.kindstringType of the resource. Always compute#snapshot for Snapshot resources.
Command Example#

!gcp-compute-list-snapshots

Context Example#
{
"GoogleCloudCompute": {
"Snapshots": {
"creationTimestamp": "creationTimestamp",
"diskSizeGb": "100",
"downloadBytes": "0",
"id": "42",
"kind": "compute#snapshot",
"labelFingerprint": "labelFingerprint",
"licenseCodes": [
"42"
],
"licenses": [
"https://www.mockapi.com/global/licenses/gke-node",
"https://www.mockapi.com/global/licenses/cos",
"https://www.mockapi.com-shielded/global/licenses/shielded-cos",
"https://www.mockapi.com/global/licenses/cos-pcid"
],
"name": "testsnap1",
"selfLink": "selfLink",
"sourceDisk": "https://www.mockapi.com/zones//disks/mock-disk",
"sourceDiskId": "42",
"status": "UPLOADING",
"storageLocations": [
"eu"
]
}
}
}
Human Readable Output#

Google Cloud Compute Snapshots#

creationTimestampnamestatus
2020-05-03T01:13:24.244-07:00testsnap1READY

gcp-compute-get-snapshot#


Returns the specified Snapshot resource.

Base Command#

gcp-compute-get-snapshot

Input#
Argument NameDescriptionRequired
nameName of the Snapshot resource to return.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Snapshots.idstringThe unique identifier for the resource. This identifier is defined by the server
GoogleCloudCompute.Snapshots.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Snapshots.namestringName 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.
GoogleCloudCompute.Snapshots.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Snapshots.statusstringThe status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
GoogleCloudCompute.Snapshots.sourceDiskstringThe source disk used to create this snapshot.
GoogleCloudCompute.Snapshots.sourceDiskIdstringThe ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.
GoogleCloudCompute.Snapshots.diskSizeGbstringSize of the snapshot, specified in GB.
GoogleCloudCompute.Snapshots.storageBytesstringA size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion
GoogleCloudCompute.Snapshots.storageBytesStatusstringAn indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.
GoogleCloudCompute.Snapshots.licensesstringA list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).
GoogleCloudCompute.Snapshots.snapshotEncryptionKeyunknownEncrypts the snapshot using a customer-supplied encryption key. After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the image later For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request. Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later.
GoogleCloudCompute.Snapshots.snapshotEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Snapshots.snapshotEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Snapshots.snapshotEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Snapshots.sourceDiskEncryptionKeyUnknownThe customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Snapshots.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Snapshots.labelsUnknownLabels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
GoogleCloudCompute.Snapshots.labels.keystringThe label key.
GoogleCloudCompute.Snapshots.labels.valuestringThe label value.
GoogleCloudCompute.Snapshots.labelFingerprintstringA fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Snapshots.licenseCodesstringInteger license codes indicating which licenses are attached to this snapshot.
GoogleCloudCompute.Snapshots.kindstringType of the resource. Always compute#snapshot for Snapshot resources.
Command Example#

!gcp-compute-get-snapshot name=testsnap1

Context Example#
{
"GoogleCloudCompute": {
"Snapshots": {
"creationTimestamp": "creationTimestamp",
"diskSizeGb": "100",
"downloadBytes": "42",
"id": "42",
"kind": "compute#snapshot",
"labelFingerprint": "labelFingerprint",
"licenseCodes": [
"42",
"42",
"42",
"42"
],
"licenses": [
"https://www.mockapi.com/global/licenses/gke-node",
"https://www.mockapi.com/global/licenses/cos",
"https://www.mockapi.com-shielded/global/licenses/shielded-cos",
"https://www.mockapi.com/global/licenses/cos-pcid"
],
"name": "testsnap1",
"selfLink": "selfLink",
"sourceDisk": "https://www.mockapi.com/zones//disks/mock-disk",
"sourceDiskId": "42",
"status": "READY",
"storageBytes": "42",
"storageBytesStatus": "UP_TO_DATE",
"storageLocations": [
"eu"
]
}
}
}
Human Readable Output#

Google Cloud Compute Snapshots#

creationTimestampnamestatus
2020-05-03T01:13:24.244-07:00testsnap1READY

gcp-compute-delete-snapshot#


Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.

Base Command#

gcp-compute-delete-snapshot

Input#
Argument NameDescriptionRequired
nameName of the Snapshot resource to delete.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-delete-snapshot name=testsnap1

Context Example#
{
"GoogleCloudCompute": {
"Operations": {
"id": "42",
"insertTime": "2020-05-03T01:16:07.556-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "delete",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:16:07.560-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com/global/snapshots/testsnap1",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationdelete0RUNNING

gcp-compute-project-info-add-metadata#


Add or update project wide metadata.

Base Command#

gcp-compute-project-info-add-metadata

Input#
Argument NameDescriptionRequired
metadataMetadata to be made available to the guest operating system running on the instances. Each entry is a key/value pair separated by ';' like so: key=abc,value=123;key=abc,value=123Required
Context Output#

There is no context output for this command.

Command Example#

!gcp-compute-project-info-add-metadata metadata=key=abc,value=123

Context Output#
PathTypeDescription
GoogleCloudCompute.ProjectMetadata.operationTypestringThe type of operation, such as insert, update, or delete.
GoogleCloudCompute.ProjectMetadata.insertTimedateThe time that this operation was started by the server.
GoogleCloudCompute.ProjectMetadata.selfLinkstringServer-defined URL for the project.
GoogleCloudCompute.ProjectMetadata.targetLinkstringThe URL of the resource that the operation modifies.
GoogleCloudCompute.ProjectMetadata.namestringName of the operation.
GoogleCloudCompute.ProjectMetada.progressnumberProgress indicator that ranges from 0 to 100.
GoogleCloudCompute.ProjectMetadata.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource.
GoogleCloudCompute.ProjectMetadata.startTimedateThe time that this operation was started by the server.
GoogleCloudCompute.ProjectMetadata.statusstringThe status of the operation, which can be one of the following PENDING, RUNNING, or DONE.
GoogleCloudCompute.ProjectMetadata.kindstringType of the resource. Always compute#operation.
Context Example#
{
"GoogleCloudCompute": {
"ProjectMetadata": {
"id": "42",
"insertTime": "2020-05-03T01:15:54.395-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "compute.projects.setCommonInstanceMetadata",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:15:54.401-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Project Metadata Update Operation Started Successfully#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationcompute.projects.setCommonInstanceMetadata0RUNNING

gcp-compute-aggregated-list-instances-by-ip#


Retrieves instance information based on public IP in your project across all regions and zones.

Base Command#

gcp-compute-aggregated-list-instances-by-ip

Input#
Argument NameDescriptionRequired
ipIP Address to search on.Required
Context Output#
PathTypeDescription
GoogleCloudCompute.Instances.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Instances.creationTimestampstringCreation timestamp in RFC3339 text format.
GoogleCloudCompute.Instances.namestringThe 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.
GoogleCloudCompute.Instances.descriptionstringAn optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Instances.tagsstringTags 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.
GoogleCloudCompute.Instances.tags.itemsstringAn array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.Instances.tags.fingerprintstringSpecifies a fingerprint for this request, which is essentially a hash of the tags contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
GoogleCloudCompute.Instances.machineTypestringFull 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.
GoogleCloudCompute.Instances.statusstringThe status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
GoogleCloudCompute.Instances.statusMessagestringAn optional, human-readable explanation of the status.
GoogleCloudCompute.Instances.zonestringURL 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.
GoogleCloudCompute.Instances.canIpForwardbooleanAllows 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.
GoogleCloudCompute.Instances.networkInterfacesstringAn 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.
GoogleCloudCompute.Instances.networkInterfaces.networkstringURL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
GoogleCloudCompute.Instances.networkInterfaces.subnetworkstringThe URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL
GoogleCloudCompute.Instances.networkInterfaces.networkIPstringAn IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
GoogleCloudCompute.Instances.networkInterfaces.namestringThe name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigsstringAn array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.typestringThe type of configuration. The default and only option is ONE_TO_ONE_NAT.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.namestringThe name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.natIPstringAn 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.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.setPublicPtrbooleanSpecifies whether a public DNS ‘PTR’ record should be created to map the external IP address of the instance to a DNS domain name.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.publicPtrDomainNamestringThe DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.networkTierstringThis signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.kindstringType of the resource. Always compute#accessConfig for access configs.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRangesstringAn array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.ipCidrRangestringThe IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 0.0.0.0), a netmask (e.g. /24) or a CIDR format string (e.g. 0.0.0.0/24).
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.subnetworkRangeNamestringOptional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
GoogleCloudCompute.Instances.networkInterfaces.fingerprintstringFingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Instances.networkInterfaces.kindstringType of the resource. Always compute#networkInterface for network interfaces.
GoogleCloudCompute.Instances.disksstringArray of disks associated with this instance. Persistent disks must be created before you can assign them.
GoogleCloudCompute.Instances.disks.typestringSpecifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
GoogleCloudCompute.Instances.disks.modestringThe 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.
GoogleCloudCompute.Instances.disks.sourcestringSpecifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
GoogleCloudCompute.Instances.disks.deviceNamestringSpecifies 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.
GoogleCloudCompute.Instances.disks.indexnumberA zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
GoogleCloudCompute.Instances.disks.bootbooleanIndicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
GoogleCloudCompute.Instances.disks.initializeParamsstringSpecifies 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.
GoogleCloudCompute.Instances.disks.initializeParams.diskNamestringSpecifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImagestringThe source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
GoogleCloudCompute.Instances.disks.initializeParams.diskSizeGbstringSpecifies the size of the disk in base-2 GB.
GoogleCloudCompute.Instances.disks.initializeParams.diskTypestringSpecifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKeystringThe customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.initializeParams.labelsstringLabels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
GoogleCloudCompute.Instances.disks.initializeParams.labels.keystringThe disk label key.
GoogleCloudCompute.Instances.disks.initializeParams.labels.valuestringThe disk label value.
GoogleCloudCompute.Instances.disks.initializeParams.descriptionstringAn optional description. Provide this property when creating the disk.
GoogleCloudCompute.Instances.disks.autoDeletebooleanSpecifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
GoogleCloudCompute.Instances.disks.licensesstringAny valid publicly visible licenses.
GoogleCloudCompute.Instances.disks.interfacestringSpecifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
GoogleCloudCompute.Instances.disks.guestOsFeaturesstringA list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.guestOsFeatures.typestringThe ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.diskEncryptionKeystringEncrypts or decrypts a disk using a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.rawKeystringSpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.kmsKeyNamestringThe name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.sha256stringThe RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.kindstringType of the resource. Always compute#attachedDisk for attached disks.
GoogleCloudCompute.Instances.metadatastringThe metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
GoogleCloudCompute.Instances.metadata.fingerprintstringSpecifies a fingerprint for this request, which is essentially a hash of the metadatas 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, otherwise the request will fail with error 412 conditionNotMet.
GoogleCloudCompute.Instances.metadata.itemsstringArray of key/value pairs. The total size of all keys and values must be less than 512 KB.
GoogleCloudCompute.Instances.metadata.items.keystringKey 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.
GoogleCloudCompute.Instances.metadata.items.valuestringValue 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 42 bytes (256 KiB).
GoogleCloudCompute.Instances.metadata.kindstringType of the resource. Always compute#metadata for metadata.
GoogleCloudCompute.Instances.serviceAccountsstringA list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
GoogleCloudCompute.Instances.serviceAccounts.emailstringEmail address of the service account.
GoogleCloudCompute.Instances.serviceAccounts.scopesstringThe list of scopes to be made available for this service account
GoogleCloudCompute.Instances.selfLinkstringServer-defined URL for this resource.
GoogleCloudCompute.Instances.schedulingstringSets the scheduling options for this instance.
GoogleCloudCompute.Instances.scheduling.onHostMaintenancestringDefines 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 Instance Scheduling Options.
GoogleCloudCompute.Instances.scheduling.automaticRestartbooleanSpecifies 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.
GoogleCloudCompute.Instances.scheduling.preemptiblebooleanDefines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
GoogleCloudCompute.Instances.scheduling.nodeAffinitiesstringA set of node affinity and anti-affinity.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.keystringCorresponds to the label key of Node resource.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.operatorstringDefines the operation of node selection.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.valuesstringCorresponds to the label values of Node resource.
GoogleCloudCompute.Instances.cpuPlatformstringThe CPU platform used by this instance.
GoogleCloudCompute.Instances.labelsstringLabels to apply to this instance. These can be later modified by the setLabels method.
GoogleCloudCompute.Instances.labels.keystringThe label key.
GoogleCloudCompute.Instances.labels.valuestringThe label value.
GoogleCloudCompute.Instances.labelFingerprintstringA fingerprint for this request, which is essentially a hash of the labels 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.
GoogleCloudCompute.Instances.minCpuPlatformstringSpecifies 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".
GoogleCloudCompute.Instances.guestAcceleratorsstringA list of the type and count of accelerator cards attached to the instance.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorTypestringFull or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorCountstringThe number of the guest accelerator cards exposed to this instance.
GoogleCloudCompute.Instances.startRestrictedbooleanWhether a VM has been restricted for start because Compute Engine has detected suspicious activity.
GoogleCloudCompute.Instances.deletionProtectionbooleanWhether the resource should be protected against deletion.
GoogleCloudCompute.Instances.hostnamestringHostname
GoogleCloudCompute.Instances.kindstring] Type of the resource. Always compute#instance for instances.
Command Example#

!gcp-compute-aggregated-list-instances-by-ip ip=8.8.8.8

Context Example#
{
"GoogleCloudCompute": {
"Instances": [
{
"canIpForward": false,
"cpuPlatform": "Unknown CPU Platform",
"creationTimestamp": "creationTimestamp",
"deletionProtection": false,
"description": "",
"disks": [
{
"autoDelete": true,
"boot": true,
"deviceName": "test01",
"diskSizeGb": "100",
"guestOsFeatures": [
{
"type": "UEFI_COMPATIBLE"
}
],
"index": 0,
"interface": "SCSI",
"kind": "compute#attachedDisk",
"licenses": [
"license"
],
"mode": "READ_WRITE",
"source": "source",
"type": "PERSISTENT"
}
],
"displayDevice": {
"enableDisplay": false
},
"fingerprint": "fingerprint",
"id": "42",
"kind": "compute#instance",
"labelFingerprint": "labelFingerprint",
"labels": {
"a123": "abc",
"a231": "cba"
},
"machineType": "machineType",
"metadata": {
"fingerprint": "fingerprint",
"kind": "compute#metadata"
},
"name": "test01",
"networkInterfaces": [
{
"accessConfigs": [
{
"kind": "compute#accessConfig",
"name": "External NAT",
"networkTier": "PREMIUM",
"natIP": "8.8.8.8"
"type": "ONE_TO_ONE_NAT"
}
],
"fingerprint": "fingerprint",
"kind": "compute#networkInterface",
"name": "nic0",
"network": "network",
"networkIP": "10.0.0.1",
"subnetwork": "subnetwork"
}
],
"reservationAffinity": {
"consumeReservationType": "ANY_RESERVATION"
},
"scheduling": {
"automaticRestart": true,
"onHostMaintenance": "MIGRATE",
"preemptible": false
},
"selfLink": "selfLink",
"serviceAccounts": [
{
"email": "email",
"scopes": [
"https://www.googleapis.com/auth/devstorage.read_only"
]
}
],
"shieldedInstanceConfig": {
"enableIntegrityMonitoring": true,
"enableSecureBoot": false,
"enableVtpm": true
},
"shieldedInstanceIntegrityPolicy": {
"updateAutoLearnPolicy": true
},
"startRestricted": false,
"status": "TERMINATED",
"tags": {
"fingerprint": "fingerprint",
"items": [
"https-server"
]
},
"zone": "https://www.mockapi.com/zones/europe-west2-c"
}
]
}
}
Human Readable Output#

Google Cloud Compute Instances#

idmachineTypenamezone
42machineTypetest01https://www.mockapi.com/zones/europe-west2-c

gcp-compute-add-network-tag#


Add network tag for the specified instance.

Base Command#

gcp-compute-add-network-tag

Input#
Argument NameDescriptionRequired
instanceName of the instance scoping this request.Required
zoneThe name of the zone for this request.Required
tagNetwork tag to add. Tag must be unique, 1-63 characters long, and comply with RFC1035.Required
project_idProject ID that you want to run this command on.Optional
Context Output#
PathTypeDescription
GoogleCloudCompute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.namestringName of the resource.
GoogleCloudCompute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
GoogleCloudCompute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.userstringUser who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progressnumberAn 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 when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errorsstringThe array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.codestringThe error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.locationstringIndicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.messagestringAn optional, human-readable error message.
GoogleCloudCompute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.codestringA warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.messagestringA human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.datastringMetadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.keystringA key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
GoogleCloudCompute.Operations.warnings.data.valuestringA warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GoogleCloudCompute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLinkstringServer-defined URL for the resource.
GoogleCloudCompute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.
Command Example#

!gcp-compute-add-network-tag tag="example-tag" zone="europe-west2-c" instance="test01"

Context Example#
{
"GoogleCloudCompute": {
"ProjectMetadata": {
"id": "42",
"insertTime": "2020-05-03T01:15:54.395-07:00",
"kind": "compute#operation",
"name": "mock-operation",
"operationType": "setTags",
"progress": 0,
"selfLink": "selfLink",
"startTime": "2020-05-03T01:15:54.401-07:00",
"status": "RUNNING",
"targetId": "42",
"targetLink": "https://www.mockapi.com",
"user": "user"
}
}
}
Human Readable Output#

Google Cloud Compute Operations#

idkindnameoperationTypeprogressstatus
42compute#operationmock-operationsetTags0RUNNING