Google Cloud Compute

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.

IT Services · Google Cloud Compute

Details

IDGoogle Cloud Compute
ProviderGoogle
CategoryIT Services
From Version5.0.0
Docker Imagedemisto/googleapi-python3:1.0.0.4114363
Supported ModulesAgentix XSIAM EDR Cortex Cloud Cloud Runtime Security

README

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.
Parameter Description Required
service Service Account Private Key file contents (JSON) True
proxy Use system proxy settings False
default_search_scope What 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 Name Description Required
name The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Required
description An optional description of this resource. Provide this property when you create the resource. Optional
zone The name of the zone for this request. Required
tags Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the 'tags.items' field. Optional
tagsFingerprint Specifies 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
canIpForward Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding. Optional
machine_type The machine type EX: n1-standard-1 or custom-4-5120 Optional
network URL 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
subnetwork The 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
networkIP An 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
networkInterfacesfingerprint Fingerprint 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
externalInternetAccess This will set accessConfigs to type ONE_TO_ONE_NAT and name to External NAT Optional
externalNatIP An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. Optional
setPublicPtr Specifies whether a public DNS ‘PTR’ record should be created to map the external IP address of the instance to a DNS domain name. Optional
publicPtrDomainName The DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled. Optional
networkTier This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. Optional
ipCidrRange The 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
subnetworkRangeName Optional 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
diskType Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Optional
diskMode The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Optional
diskSource Specifies 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
diskDeviceName Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. Optional
diskBoot Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. Optional
initializeParamsDiskName Specifies 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
initializeParamsSourceImage The 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-vYYYYMMDD Optional
initializeParamsdiskSizeGb Specifies the size of the disk in base-2 GB. Optional
initializeParamsDiskType Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example: 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
initializeParamsSourceImageEncryptionKeyRawKey Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Optional
initializeParamsSourceImageEncryptionKeykmsKeyName The name of the encryption key that is stored in Google Cloud KMS. Optional
initializeParamsDiskLabels Labels 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=123 Optional
initializeParamsDiskDescription An optional description. Provide this property when creating the disk. Optional
diskAutodelete Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). Optional
diskInterface Specifies 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
diskGuestOsFeatures A 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
diskEncryptionKeyRawKey Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Optional
diskEncryptionKeyKmsKeyName The name of the encryption key that is stored in Google Cloud KMS. Optional
metadataItems The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. EX: key=abc,value=123;key=abc,value=123 Optional
serviceAccountEmail Email address of the service account. Optional
serviceAccountscopes The list of scopes to be made available for this service account. Optional
schedulingOnHostMaintenance Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. Optional
schedulingAutomaticRestart Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine. Optional
schedulingPreemptible Defines 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
labels Labels to apply to this instance. These can be later modified by the setLabels method. key=abc,value=123;key=abc,value=123 Optional
labelFingerprint A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Optional
minCpuPlatform Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". Optional
guestAcceleratorsAcceleratorType Full 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
guestAcceleratorsAcceleratorCount The number of the guest accelerator cards exposed to this instance. Optional
deletionProtection Whether the resource should be protected against deletion. Optional
Context Output
Path Type Description
GoogleCloudCompute.Operations.id string The unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Operations.name string Name of the resource.
GoogleCloudCompute.Operations.zone string The 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.clientOperationId string The value of requestId if you provided it in the request. Not present otherwise.
GoogleCloudCompute.Operations.operationType string The type of operation, such as insert, update, or delete, and so on.
GoogleCloudCompute.Operations.targetLink string The 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.targetId string The unique target ID, which identifies a specific incarnation of the target resource
GoogleCloudCompute.Operations.status string The status of the operation, which can be one of the following: PENDING RUNNING or DONE
GoogleCloudCompute.Operations.statusMessage string An optional textual description of the current status of the operation.
GoogleCloudCompute.Operations.user string User who requested the operation for example EMAILADDRESS.
GoogleCloudCompute.Operations.progress number An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
GoogleCloudCompute.Operations.insertTime string The time that this operation was requested. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.startTime string The time that this operation was started by the server. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.endTime string The time that this operation was completed. This value is in RFC3339 text format.
GoogleCloudCompute.Operations.error string If errors are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.error.errors string The array of errors encountered while processing this operation.
GoogleCloudCompute.Operations.error.errors.code string The error type identifier for this error.
GoogleCloudCompute.Operations.error.errors.location string Indicates the field in the request that caused the error. This property is optional.
GoogleCloudCompute.Operations.error.errors.message string An optional, human-readable error message.
GoogleCloudCompute.Operations.warnings string If warning messages are generated during processing of the operation, this field will be populated.
GoogleCloudCompute.Operations.warnings.code string A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
GoogleCloudCompute.Operations.warnings.message string A human-readable description of the warning code.
GoogleCloudCompute.Operations.warnings.data string Metadata about this warning in key: value format.
GoogleCloudCompute.Operations.warnings.data.key string A 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.value string A warning data value corresponding to the key.
GoogleCloudCompute.Operations.httpErrorStatusCode number If 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.httpErrorMessage string If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GoogleCloudCompute.Operations.selfLink string Server-defined URL for the resource.
GoogleCloudCompute.Operations.region string The 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.description string A textual description of the operation, which is set when the operation is created.
GoogleCloudCompute.Operations.kind string Type of the resource. Always compute#operation for Operation resources.

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 Name Description Required
project Project ID for this request. Required
family Name of the image family to search for. Required
Context Output
Path Type Description
GoogleCloudCompute.Images.id string The unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Images.creationTimestamp string Creation timestamp in RFC3339 text format.
GoogleCloudCompute.Images.name string Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
GoogleCloudCompute.Images.description string An optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Images.sourceType string The type of the image used to create this disk. The default and only value is RAW
GoogleCloudCompute.Images.rawDisk string The parameters of the raw disk image.
GoogleCloudCompute.Images.rawDisk.source string The 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.sha1Checksum string An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
GoogleCloudCompute.Images.rawDisk.containerType string The 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.deprecated string The deprecation status associated with this image.
GoogleCloudCompute.Images.deprecated.state string The 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.replacement string The 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.deprecated string An 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.obsolete string An 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.deleted string An 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.status string The 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.archiveSizeBytes string Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
GoogleCloudCompute.Images.diskSizeGb string Size of the image when restored onto a persistent disk (in GB).
GoogleCloudCompute.Images.sourceDisk string URL 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.sourceDiskId string The 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.licenses string Any applicable license URI.
GoogleCloudCompute.Images.family string The 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.imageEncryptionKey string Encrypts 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.rawKey string Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.imageEncryptionKey.kmsKeyName string The name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.imageEncryptionKey.sha256 string The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.sourceDiskEncryptionKey string The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.rawKey string Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.kmsKeyName string The name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceDiskEncryptionKey.sha256 string The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.selfLink string Server-defined URL for the resource.
GoogleCloudCompute.Images.labels string Labels to apply to this image. These can be later modified by the setLabels method.
GoogleCloudCompute.Images.labelFingerprint string A 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.guestOsFeatures string A 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.type string The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Images.licenseCodes string Integer license codes indicating which licenses are attached to this image.
GoogleCloudCompute.Images.sourceImage string URL of the source image used to create this image. This can be a full or valid partial URL.
GoogleCloudCompute.Images.sourceImageId string The 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.sourceImageEncryptionKey string The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceImageEncryptionKey.rawKey string Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceImageEncryptionKey.kmsKeyName string The name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceImageEncryptionKey.sha256 string The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.sourceSnapshot string URL of the source snapshot used to create this image. This can be a full or valid partial URL.
GoogleCloudCompute.Images.sourceSnapshotId string The 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.sourceSnapshotEncryptionKey string The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.rawKey string Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.kmsKeyName string The name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.sha256 string The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Images.kind string Type of the resource. Always compute#image for images.

gcp-compute-get-network


Returns the specified network.

Base Command

gcp-compute-get-network

Input
Argument Name Description Required
network Name of the network to return. Required
Context Output
Path Type Description
GoogleCloudCompute.Networks.id string The unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Networks.creationTimestamp string Creation timestamp in RFC3339 text format.
GoogleCloudCompute.Networks.name string Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
GoogleCloudCompute.Networks.description string An optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Networks.gatewayIPv4 string The gateway address for default routing out of the network. This value is read only and is selected by GCP.
GoogleCloudCompute.Networks.selfLink string Server-defined URL for the resource.
GoogleCloudCompute.Networks.autoCreateSubnetworks boolean When 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.subnetworks string Server-defined fully-qualified URLs for all subnetworks in this VPC network.
GoogleCloudCompute.Networks.peerings string A list of network peerings for the resource.
GoogleCloudCompute.Networks.peerings.name string Name 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.network string The 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.state string State for the peering.
GoogleCloudCompute.Networks.peerings.stateDetails string Details about the current state of the peering.
GoogleCloudCompute.Networks.peerings.autoCreateRoutes boolean This 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.exchangeSubnetRoutes boolean 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 peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.
GoogleCloudCompute.Networks.routingConfig string The 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.routingMode string The 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.kind string Type 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

id name
42 default

gcp-compute-list-instances


Retrieves the list of instances contained within the specified zone.

Base Command

gcp-compute-list-instances

Input
Argument Name Description Required
zone The name of the zone for this request. Required
filters A 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
maxResults The 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
orderBy Sorts 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
pageToken Specifies 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
Path Type Description
GoogleCloudCompute.Instances.id string The unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Instances.creationTimestamp string Creation timestamp in RFC3339 text format.
GoogleCloudCompute.Instances.name string The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
GoogleCloudCompute.Instances.description string An optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Instances.tags string Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the tags.items field.
GoogleCloudCompute.Instances.tags.items string An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.Instances.tags.fingerprint string Specifies 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.machineType string Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created.
GoogleCloudCompute.Instances.status string The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
GoogleCloudCompute.Instances.statusMessage string An optional, human-readable explanation of the status.
GoogleCloudCompute.Instances.zone string URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Instances.canIpForward boolean Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
GoogleCloudCompute.Instances.networkInterfaces string An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.
GoogleCloudCompute.Instances.networkInterfaces.network string URL 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.subnetwork string The 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.networkIP string An 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.name string The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs string An 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.type string The type of configuration. The default and only option is ONE_TO_ONE_NAT.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.name string The 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.natIP string An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.setPublicPtr boolean Specifies 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.publicPtrDomainName string The DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.networkTier string This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.kind string Type of the resource. Always compute#accessConfig for access configs.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges string An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.ipCidrRange string The 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.subnetworkRangeName string Optional 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.fingerprint string Fingerprint 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.kind string Type of the resource. Always compute#networkInterface for network interfaces.
GoogleCloudCompute.Instances.disks string Array of disks associated with this instance. Persistent disks must be created before you can assign them.
GoogleCloudCompute.Instances.disks.type string Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
GoogleCloudCompute.Instances.disks.mode string The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
GoogleCloudCompute.Instances.disks.source string Specifies 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.deviceName string Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
GoogleCloudCompute.Instances.disks.index number A 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.boot boolean Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
GoogleCloudCompute.Instances.disks.initializeParams string Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
GoogleCloudCompute.Instances.disks.initializeParams.diskName string Specifies 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.sourceImage string The 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.diskSizeGb string Specifies the size of the disk in base-2 GB.
GoogleCloudCompute.Instances.disks.initializeParams.diskType string Specifies 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.sourceImageEncryptionKey string The 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.sha256 string The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.rawKey string Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.kmsKeyName string The name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.initializeParams.labels string Labels 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.key string The disk label key.
GoogleCloudCompute.Instances.disks.initializeParams.labels.value string The disk label value.
GoogleCloudCompute.Instances.disks.initializeParams.description string An optional description. Provide this property when creating the disk.
GoogleCloudCompute.Instances.disks.autoDelete boolean Specifies 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.licenses string Any valid publicly visible licenses.
GoogleCloudCompute.Instances.disks.interface string Specifies 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.guestOsFeatures string A 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.type string The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.diskEncryptionKey string Encrypts or decrypts a disk using a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.rawKey string Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.kmsKeyName string The name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.sha256 string The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.kind string Type of the resource. Always compute#attachedDisk for attached disks.
GoogleCloudCompute.Instances.metadata string The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
GoogleCloudCompute.Instances.metadata.fingerprint string Specifies 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.items string Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
GoogleCloudCompute.Instances.metadata.items.key string Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
GoogleCloudCompute.Instances.metadata.items.value string Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 42 bytes (256 KiB).
GoogleCloudCompute.Instances.metadata.kind string Type of the resource. Always compute#metadata for metadata.
GoogleCloudCompute.Instances.serviceAccounts string A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
GoogleCloudCompute.Instances.serviceAccounts.email string Email address of the service account.
GoogleCloudCompute.Instances.serviceAccounts.scopes string The list of scopes to be made available for this service account
GoogleCloudCompute.Instances.selfLink string Server-defined URL for this resource.
GoogleCloudCompute.Instances.scheduling string Sets the scheduling options for this instance.
GoogleCloudCompute.Instances.scheduling.onHostMaintenance string Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
GoogleCloudCompute.Instances.scheduling.automaticRestart boolean Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
GoogleCloudCompute.Instances.scheduling.preemptible boolean Defines 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.nodeAffinities string A set of node affinity and anti-affinity.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.key string Corresponds to the label key of Node resource.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.operator string Defines the operation of node selection.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.values string Corresponds to the label values of Node resource.
GoogleCloudCompute.Instances.cpuPlatform string The CPU platform used by this instance.
GoogleCloudCompute.Instances.labels string Labels to apply to this instance. These can be later modified by the setLabels method.
GoogleCloudCompute.Instances.labels.key string The label key.
GoogleCloudCompute.Instances.labels.value string The label value.
GoogleCloudCompute.Instances.labelFingerprint string A 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.minCpuPlatform string Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
GoogleCloudCompute.Instances.guestAccelerators string A list of the type and count of accelerator cards attached to the instance.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorType string Full 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.acceleratorCount string The number of the guest accelerator cards exposed to this instance.
GoogleCloudCompute.Instances.startRestricted boolean Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
GoogleCloudCompute.Instances.deletionProtection boolean Whether the resource should be protected against deletion.
GoogleCloudCompute.Instances.hostname string Hostname
GoogleCloudCompute.Instances.kind string ] 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

id machineType name zone
42 https://www.mockapi.com/zones//machineTypes/mock-machine mock-disk https://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 Name Description Required
maxResults The 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
filters A 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
orderBy Sorts 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
pageToken Specifies 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
Path Type Description
GoogleCloudCompute.Instances.id string The unique identifier for the resource. This identifier is defined by the server.
GoogleCloudCompute.Instances.creationTimestamp string Creation timestamp in RFC3339 text format.
GoogleCloudCompute.Instances.name string The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
GoogleCloudCompute.Instances.description string An optional description of this resource. Provide this property when you create the resource.
GoogleCloudCompute.Instances.tags string Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the tags.items field.
GoogleCloudCompute.Instances.tags.items string An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
GoogleCloudCompute.Instances.tags.fingerprint string Specifies 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.machineType string Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created.
GoogleCloudCompute.Instances.status string The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
GoogleCloudCompute.Instances.statusMessage string An optional, human-readable explanation of the status.
GoogleCloudCompute.Instances.zone string URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
GoogleCloudCompute.Instances.canIpForward boolean Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
GoogleCloudCompute.Instances.networkInterfaces string An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.
GoogleCloudCompute.Instances.networkInterfaces.network string URL 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.subnetwork string The 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.networkIP string An 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.name string The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs string An 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.type string The type of configuration. The default and only option is ONE_TO_ONE_NAT.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.name string The 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.natIP string An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.setPublicPtr boolean Specifies 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.publicPtrDomainName string The DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.networkTier string This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.kind string Type of the resource. Always compute#accessConfig for access configs.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges string An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.ipCidrRange string The 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.subnetworkRangeName string Optional 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.fingerprint string Fingerprint 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.kind string Type of the resource. Always compute#networkInterface for network interfaces.
GoogleCloudCompute.Instances.disks string Array of disks associated with this instance. Persistent disks must be created before you can assign them.
GoogleCloudCompute.Instances.disks.type string Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
GoogleCloudCompute.Instances.disks.mode string The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
GoogleCloudCompute.Instances.disks.source string Specifies 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.deviceName string Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
GoogleCloudCompute.Instances.disks.index number A 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.boot boolean Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
GoogleCloudCompute.Instances.disks.initializeParams string Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
GoogleCloudCompute.Instances.disks.initializeParams.diskName string Specifies 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.sourceImage string The 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.diskSizeGb string Specifies the size of the disk in base-2 GB.
GoogleCloudCompute.Instances.disks.initializeParams.diskType string Specifies 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.sourceImageEncryptionKey string The 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.sha256 string The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.rawKey string Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.kmsKeyName string The name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.initializeParams.labels string Labels 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.key string The disk label key.
GoogleCloudCompute.Instances.disks.initializeParams.labels.value string The disk label value.
GoogleCloudCompute.Instances.disks.initializeParams.description string An optional description. Provide this property when creating the disk.
GoogleCloudCompute.Instances.disks.autoDelete boolean Specifies 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.licenses string Any valid publicly visible licenses.
GoogleCloudCompute.Instances.disks.interface string Specifies 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.guestOsFeatures string A 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.type string The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
GoogleCloudCompute.Instances.disks.diskEncryptionKey string Encrypts or decrypts a disk using a customer-supplied encryption key.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.rawKey string Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.kmsKeyName string The name of the encryption key that is stored in Google Cloud KMS.
GoogleCloudCompute.Instances.disks.diskEncryptionKey.sha256 string The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GoogleCloudCompute.Instances.disks.kind string Type of the resource. Always compute#attachedDisk for attached disks.
GoogleCloudCompute.Instances.metadata string The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
GoogleCloudCompute.Instances.metadata.fingerprint string Specifies 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.items string Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
GoogleCloudCompute.Instances.metadata.items.key string Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
GoogleCloudCompute.Instances.metadata.items.value string Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 42 bytes (256 KiB).
GoogleCloudCompute.Instances.metadata.kind string Type of the resource. Always compute#metadata for metadata.
GoogleCloudCompute.Instances.serviceAccounts string A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
GoogleCloudCompute.Instances.serviceAccounts.email string Email address of the service account.
GoogleCloudCompute.Instances.serviceAccounts.scopes string The list of scopes to be made available for this service account
GoogleCloudCompute.Instances.selfLink string Server-defined URL for this resource.
GoogleCloudCompute.Instances.scheduling string Sets the scheduling options for this instance.
GoogleCloudCompute.Instances.scheduling.onHostMaintenance string Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
GoogleCloudCompute.Instances.scheduling.automaticRestart boolean Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
GoogleCloudCompute.Instances.scheduling.preemptible boolean Defines 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.nodeAffinities string A set of node affinity and anti-affinity.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.key string Corresponds to the label key of Node resource.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.operator string Defines the operation of node selection.
GoogleCloudCompute.Instances.scheduling.nodeAffinities.values string Corresponds to the label values of Node resource.
GoogleCloudCompute.Instances.cpuPlatform string The CPU platform used by this instance.
GoogleCloudCompute.Instances.labels string Labels to apply to this instance. These can be later modified by the setLabels method.
GoogleCloudCompute.Instances.labels.key string The label key.
GoogleCloudCompute.Instances.labels.value string The label value.
GoogleCloudCompute.Instances.labelFingerprint string A 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.minCpuPlatform string Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
GoogleCloudCompute.Instances.guestAccelerators string A list of the type and count of accelerator cards attached to the instance.
GoogleCloudCompute.Instances.guestAccelerators.acceleratorType string Full 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.acceleratorCount string The number of the guest accelerator cards exposed to this instance.
GoogleCloudCompute.Instances.startRestricted boolean Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
GoogleCloudCompute.Instances.deletionProtection boolean Whether the resource should be protected against deletion.
GoogleCloudCompute.Instances.hostname string Hostname
GoogleCloudCompute.Instances.kind string ] Type of the resource. Always compute#instance for instances.
Command Example

##### 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

|id|machineType|name|zone|
|---|---|---|---|
| 42 | machineType | test01 | https://www.mockapi.com/zones/europe-west2-c |
| 42 | https://www.mockapi.com/zones//machineTypes/mock-machine | mock-disk | https://www.mockapi.com/zones/ |
| 42 | https://www.mockapi.com/zones//machineTypes/mock-machine | mock_instance-8vkj | https://www.mockapi.com/zones/ |
| 42 | https://www.mockapi.com/zones//machineTypes/mock-machine | mock_instance-g4pt | https://www.mockapi.com/zones/ |
| 42 | https://www.mockapi.com/zones//machineTypes/mock-machine | mock_instance-j381 | https://www.mockapi.com/zones/ |
| 42 | https://www.mockapi.com/zones//machineTypes/mock-machine | mock_instance-j48z | https://www.mockapi.com/zones/ |
| 42 | https://www.mockapi.com/zones//machineTypes/mock-machine | mock_instance-wb7s | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the Operations resource to return. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | compute.projects.setCommonInstanceMetadata | 100 | DONE |

### gcp-compute-get-zone-operation

***
Retrieves the specified zone-specific Operations resource.

##### Base Command

`gcp-compute-get-zone-operation`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the Operations resource to return. | Required |
| zone | Name of the zone for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| zone | Name of the zone for request. | Required |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|startTime|status|
|---|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | compute.instanceGroupManagers.insert | 100 | 2020-04-21T02:13:05.694-07:00 | DONE |
| 42 | compute#operation | mock-operation | compute.zoneInstanceTemplates.insert | 100 | 2020-04-21T02:13:08.017-07:00 | DONE |
| 42 | compute#operation | mock-operation | insert | 100 | 2020-04-21T02:13:16.811-07:00 | DONE |
| 42 | compute#operation | mock-operation | insert | 100 | 2020-04-21T02:13:17.780-07:00 | DONE |
| 42 | compute#operation | mock-operation | insert | 100 | 2020-04-21T02:13:17.622-07:00 | DONE |
| 42 | compute#operation | mock-operation | setLabels | 100 | 2020-04-21T03:00:05.489-07:00 | DONE |
| 42 | compute#operation | mock-operation | setLabels | 100 | 2020-04-21T03:00:06.782-07:00 | DONE |
| 42 | compute#operation | mock-operation | setLabels | 100 | 2020-04-21T03:00:08.158-07:00 | DONE |
| 42 | compute#operation | mock-operation | compute.instanceGroupManagers.resize | 100 | 2020-04-27T05:09:08.086-07:00 | DONE |
| 42 | compute#operation | mock-operation | insert | 100 | 2020-04-27T05:09:12.270-07:00 | DONE |
| 42 | compute#operation | mock-operation | insert | 100 | 2020-04-27T05:09:11.594-07:00 | DONE |
| 42 | compute#operation | mock-operation | insert | 100 | 2020-04-27T05:09:12.297-07:00 | DONE |
| 42 | compute#operation | mock-operation | setLabels | 100 | 2020-04-27T05:46:15.288-07:00 | DONE |
| 42 | compute#operation | mock-operation | setLabels | 100 | 2020-04-27T05:46:17.483-07:00 | DONE |
| 42 | compute#operation | mock-operation | setLabels | 100 | 2020-04-27T05:46:19.758-07:00 | DONE |
| 42 | compute#operation | mock-operation | createSnapshot | 100 | 2020-04-29T23:28:38.907-07:00 | DONE |
| 42 | compute#operation | mock-operation | createSnapshot | 100 | 2020-04-30T02:52:21.937-07:00 | DONE |
| 42 | compute#operation | mock-operation | insert | 100 | 2020-04-30T03:28:27.942-07:00 | DONE |
| 42 | compute#operation | mock-operation | setLabels | 100 | 2020-04-30T05:38:37.097-07:00 | DONE |
| 42 | compute#operation | mock-operation | compute.instanceGroups.insert | 100 | 2020-04-30T05:49:45.300-07:00 | DONE |
| 42 | compute#operation | mock-operation | compute.instanceGroups.setNamedPorts | 100 | 2020-05-03T00:30:43.933-07:00 | DONE |
| 42 | compute#operation | mock-operation | compute.instanceGroupManagers.setNamedPorts | 100 | 2020-05-03T00:30:44.992-07:00 | DONE |
| 42 | compute#operation | mock-operation | compute.instanceGroups.setNamedPorts | 100 | 2020-05-03T00:31:01.092-07:00 | DONE |
| 42 | compute#operation | mock-operation | compute.instanceGroupManagers.setNamedPorts | 100 | 2020-05-03T00:31:01.999-07:00 | DONE |
| 42 | compute#operation | mock-operation | createSnapshot | 100 | 2020-05-03T00:40:58.861-07:00 | DONE |
| 42 | compute#operation | mock-operation | createSnapshot | 0 | 2020-05-03T01:13:23.718-07:00 | RUNNING |
| 42 | compute#operation | systemevent-42-5a3d42c0-a1515ace-f42 | compute.instances.migrateOnHostMaintenance | 100 | 2020-04-21T17:27:39.000-07:00 | DONE |

### gcp-compute-delete-zone-operation

***
Deletes the specified zone-specific Operations resource.

##### Base Command

`gcp-compute-delete-zone-operation`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the Operations resource to delete. | Required |
| zone | Name of the zone for this request. | Required |

##### Context Output

There is no context output for this command.

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instance | Name of the instance resource to return. | Required |
| zone | The name of the zone for this request. | Required |
| project_id | Project ID that you want to run this command on. | Optional |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Instances.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Instances.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Instances.name | string | The name of the resource, provided by the client when initially creating the resource. The resource name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Instances.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Instances.tags | string | Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the tags.items field. |
| GoogleCloudCompute.Instances.tags.items | string | An array of tags. Each tag must be 1\-63 characters long, and comply with RFC1035. |
| GoogleCloudCompute.Instances.tags.fingerprint | string | Specifies 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.machineType | string | Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine\-type. This is provided by the client when the instance is created. |
| GoogleCloudCompute.Instances.status | string | The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED. |
| GoogleCloudCompute.Instances.statusMessage | string | An optional, human\-readable explanation of the status. |
| GoogleCloudCompute.Instances.zone | string | URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. |
| GoogleCloudCompute.Instances.canIpForward | boolean | Allows this instance to send and receive packets with non\-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding. |
| GoogleCloudCompute.Instances.networkInterfaces | string | An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance. |
| GoogleCloudCompute.Instances.networkInterfaces.network | string | URL 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.subnetwork | string | The 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.networkIP | string | An 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.name | string |  The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs | string | An 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.type | string | The type of configuration. The default and only option is ONE\_TO\_ONE\_NAT. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.name | string | The 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.natIP | string | An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.setPublicPtr | boolean | Specifies 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.publicPtrDomainName | string | The DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.networkTier | string | This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.kind | string | Type of the resource. Always compute\#accessConfig for access configs. |
| GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges | string | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet\-mode networks. |
| GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.ipCidrRange | string | The 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.subnetworkRangeName | string | Optional 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.fingerprint | string | Fingerprint 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.kind | string | Type of the resource. Always compute\#networkInterface for network interfaces. |
| GoogleCloudCompute.Instances.disks | string | Array of disks associated with this instance. Persistent disks must be created before you can assign them. |
| GoogleCloudCompute.Instances.disks.type | string | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. |
| GoogleCloudCompute.Instances.disks.mode | string | The mode in which to attach this disk, either READ\_WRITE or READ\_ONLY. If not specified, the default is to attach the disk in READ\_WRITE mode. |
| GoogleCloudCompute.Instances.disks.source | string | Specifies 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.deviceName | string | Specifies a unique device name of your choice that is reflected into the /dev/disk/by\-id/google\-\* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
| GoogleCloudCompute.Instances.disks.index | number | A 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.boot | boolean | Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| GoogleCloudCompute.Instances.disks.initializeParams | string | Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| GoogleCloudCompute.Instances.disks.initializeParams.diskName | string | Specifies 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.sourceImage | string | The 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.diskSizeGb | string | Specifies the size of the disk in base\-2 GB. |
| GoogleCloudCompute.Instances.disks.initializeParams.diskType | string | Specifies 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.sourceImageEncryptionKey | string | The 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.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS.  |
| GoogleCloudCompute.Instances.disks.initializeParams.labels | string | Labels 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.key | string | The disk label key. |
| GoogleCloudCompute.Instances.disks.initializeParams.labels.value | string | The disk label value. |
| GoogleCloudCompute.Instances.disks.initializeParams.description | string | An optional description. Provide this property when creating the disk. |
| GoogleCloudCompute.Instances.disks.autoDelete | boolean | Specifies 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.licenses | string |  Any valid publicly visible licenses. |
| GoogleCloudCompute.Instances.disks.interface | string | Specifies 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.guestOsFeatures | string | A 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.type | string | The ID of a supported feature. Read Enabling guest operating system features to see a list of available options. |
| GoogleCloudCompute.Instances.disks.diskEncryptionKey | string | Encrypts or decrypts a disk using a customer\-supplied encryption key. |
| GoogleCloudCompute.Instances.disks.diskEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Instances.disks.diskEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Instances.disks.diskEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Instances.disks.kind | string | Type of the resource. Always compute\#attachedDisk for attached disks. |
| GoogleCloudCompute.Instances.metadata | string | The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. |
| GoogleCloudCompute.Instances.metadata.fingerprint | string | Specifies 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.items | string | Array of key/value pairs. The total size of all keys and values must be less than 512 KB. |
| GoogleCloudCompute.Instances.metadata.items.key | string | Key for the metadata entry. Keys must conform to the following regexp: \[a\-zA\-Z0\-9\-\_\]\+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. |
| GoogleCloudCompute.Instances.metadata.items.value | string | Value for the metadata entry. These are free\-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 42 bytes \(256 KiB\). |
| GoogleCloudCompute.Instances.metadata.kind | string | Type of the resource. Always compute\#metadata for metadata. |
| GoogleCloudCompute.Instances.serviceAccounts | string | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. |
| GoogleCloudCompute.Instances.serviceAccounts.email | string | Email address of the service account. |
| GoogleCloudCompute.Instances.serviceAccounts.scopes | string | The list of scopes to be made available for this service account |
| GoogleCloudCompute.Instances.selfLink | string | Server\-defined URL for this resource. |
| GoogleCloudCompute.Instances.scheduling | string | Sets the scheduling options for this instance. |
| GoogleCloudCompute.Instances.scheduling.onHostMaintenance | string | Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. |
| GoogleCloudCompute.Instances.scheduling.automaticRestart | boolean | Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine \(not terminated by a user\). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| GoogleCloudCompute.Instances.scheduling.preemptible | boolean | Defines 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.nodeAffinities | string | A set of node affinity and anti\-affinity. |
| GoogleCloudCompute.Instances.scheduling.nodeAffinities.key | string | Corresponds to the label key of Node resource. |
| GoogleCloudCompute.Instances.scheduling.nodeAffinities.operator | string | Defines the operation of node selection. |
| GoogleCloudCompute.Instances.scheduling.nodeAffinities.values | string | Corresponds to the label values of Node resource. |
| GoogleCloudCompute.Instances.cpuPlatform | string | The CPU platform used by this instance. |
| GoogleCloudCompute.Instances.labels | string | Labels to apply to this instance. These can be later modified by the setLabels method. |
| GoogleCloudCompute.Instances.labels.key | string | The label key. |
| GoogleCloudCompute.Instances.labels.value | string | The label value. |
| GoogleCloudCompute.Instances.labelFingerprint | string | A 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.minCpuPlatform | string | Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;. |
| GoogleCloudCompute.Instances.guestAccelerators | string | A list of the type and count of accelerator cards attached to the instance. |
| GoogleCloudCompute.Instances.guestAccelerators.acceleratorType | string | Full 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.acceleratorCount | string | The number of the guest accelerator cards exposed to this instance. |
| GoogleCloudCompute.Instances.startRestricted | boolean | Whether a VM has been restricted for start because Compute Engine has detected suspicious activity. |
| GoogleCloudCompute.Instances.deletionProtection | boolean | Whether the resource should be protected against deletion. |
| GoogleCloudCompute.Instances.hostname | string | Hostname |
| GoogleCloudCompute.Instances.kind | string | \] 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

|id|machineType|name|zone|
|---|---|---|---|
| 42 | machineType | test01 | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instance | Name of the instance resource to delete. | Required |
| zone | The name of the zone for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instance | Name of the instance resource to start. | Required |
| zone | The name of the zone for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | start | 0 | RUNNING |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instance | Name of the instance resource to stop. | Required |
| zone | The name of the zone for this request. | Optional |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | stop | 0 | PENDING |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instance | Name of the instance scoping this request. | Required |
| zone | The name of the zone for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instance | Name of the instance scoping this request. | Required |
| zone | The name of the zone for this request. | Required |
| labels | An object containing a list of &quot;key&quot;: value pairs. Example: key=abc,value=123;key=ABC,value=321 | Required |
| labelFingerprint | Fingerprint 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instance | Name of the instance scoping this request. | Required |
| zone | The name of the zone for this request. | Required |
| metadataFingerprint | Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;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 |
| metadataItems | key/value pairs. EX: key=abc,value=123;key=ABC,value=321 | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instance | Name of the instance scoping this request. | Required |
| zone | The name of the zone for this request. | Required |
| machineType | Full 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-1 | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | setMachineType | 0 | RUNNING |

### gcp-compute-get-region-operation

***
Retrieves the specified region-specific Operations resource.

##### Base Command

`gcp-compute-get-region-operation`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the Operations resource to return. | Required |
| region | Name of the region for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| region | Name of the region for this request. | Required |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|startTime|status|
|---|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | compute.subnetworks.patch | 100 | 2020-04-21T02:12:37.901-07:00 | DONE |

### gcp-compute-delete-region-operation

***
Deletes the specified region-specific Operations resource.

##### Base Command

`gcp-compute-delete-region-operation`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the Operations resource to delete. | Required |
| region | Name of the region for this request. | Required |

##### Context Output

There is no context output for this command.

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|startTime|status|
|---|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | insert | 100 | 2020-04-21T01:48:24.798-07:00 | DONE |

### gcp-compute-delete-global-operation

***
Deletes the specified Operations resource.

##### Base Command

`gcp-compute-delete-global-operation`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the Operations resource to delete. | Required |

##### Context Output

There is no context output for this command.

### gcp-compute-delete-address

***
Deletes the specified address resource.

##### Base Command

`gcp-compute-delete-address`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| address | Name of the address resource to delete. | Required |
| region | Name of the region for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | delete | 0 | RUNNING |

### gcp-compute-get-address

***
Returns the specified address resource.

##### Base Command

`gcp-compute-get-address`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| address | Name of the address resource to return. | Required |
| region | Name of the region for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Addresses.id | string |  The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Addresses.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Addresses.name | string | Name of the resource. Provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Addresses.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Addresses.address | string | The static IP address represented by this resource. |
| GoogleCloudCompute.Addresses.prefixLength | number | The prefix length if the resource reprensents an IP range. |
| GoogleCloudCompute.Addresses.status | string | The 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.region | string | URL 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Addresses.users | string | The URLs of the resources that are using this address. |
| GoogleCloudCompute.Addresses.networkTier | string | This 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.ipVersion | string | The 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.addressType | string | The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL. |
| GoogleCloudCompute.Addresses.purpose | string | The purpose of resource, only used with INTERNAL type. |
| GoogleCloudCompute.Addresses.subnetwork | string | The 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.network | string | The 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.kind | string | Type 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

|address|id|name|
|---|---|---|
| 8.8.8.8 | 42 | testaddress |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. | Required |
| region | Name of the region for this request. | Required |
| description | An optional description of this resource. Provide this property when you create the resource. | Optional |
| address | The static IP address represented by this resource. | Optional |
| prefixLength | The prefix length if the resource reprensents an IP range. | Optional |
| networkTier | This 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 |
| addressType | The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL. | Optional |
| purpose | The purpose of resource, only used with INTERNAL type. | Optional |
| subnetwork | The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork&#x27;s IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes. | Optional |
| network | The 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | insert | 0 | RUNNING |

### gcp-compute-list-addresses

***
Retrieves a list of addresses contained within the specified region.

##### Base Command

`gcp-compute-list-addresses`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| region | Name of the region for this request. | Required |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Addresses.id | string |  The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Addresses.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Addresses.name | string | Name of the resource. Provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Addresses.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Addresses.address | string | The static IP address represented by this resource. |
| GoogleCloudCompute.Addresses.prefixLength | number | The prefix length if the resource reprensents an IP range. |
| GoogleCloudCompute.Addresses.status | string | The 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.region | string | URL 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Addresses.users | string | The URLs of the resources that are using this address. |
| GoogleCloudCompute.Addresses.networkTier | string | This 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.ipVersion | string | The 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.addressType | string | The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL. |
| GoogleCloudCompute.Addresses.purpose | string | The purpose of resource, only used with INTERNAL type. |
| GoogleCloudCompute.Addresses.subnetwork | string | The 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.network | string | The 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.kind | string | Type 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

|address|id|name|
|---|---|---|
| 8.8.8.8 | 42 | testaddress |

### gcp-compute-aggregated-list-addresses

***
Retrieves an aggregated list of addresses.

##### Base Command

`gcp-compute-aggregated-list-addresses`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Addresses.id | string |  The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Addresses.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Addresses.name | string | Name of the resource. Provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Addresses.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Addresses.address | string | The static IP address represented by this resource. |
| GoogleCloudCompute.Addresses.prefixLength | number | The prefix length if the resource reprensents an IP range. |
| GoogleCloudCompute.Addresses.status | string | The 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.region | string | URL 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Addresses.users | string | The URLs of the resources that are using this address. |
| GoogleCloudCompute.Addresses.networkTier | string | This 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.ipVersion | string | The 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.addressType | string | The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL. |
| GoogleCloudCompute.Addresses.purpose | string | The purpose of resource, only used with INTERNAL type. |
| GoogleCloudCompute.Addresses.subnetwork | string | The 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.network | string | The 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.kind | string | Type 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

|address|id|name|
|---|---|---|
| 8.8.8.8 | 42 | a-b-c-1 |
| 8.8.8.8 | 42 | testaddress |

### gcp-compute-delete-global-address

***
Deletes the specified address resource.

##### Base Command

`gcp-compute-delete-global-address`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| address | Name of the address resource to delete. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | delete | 0 | RUNNING |

### gcp-compute-get-global-address

***
Deletes the specified address resource.

##### Base Command

`gcp-compute-get-global-address`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| address | Name of the address resource to delete. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Addresses.id | string |  The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Addresses.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Addresses.name | string | Name of the resource. Provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Addresses.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Addresses.address | string | The static IP address represented by this resource. |
| GoogleCloudCompute.Addresses.prefixLength | number | The prefix length if the resource reprensents an IP range. |
| GoogleCloudCompute.Addresses.status | string | The 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.region | string | URL 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Addresses.users | string | The URLs of the resources that are using this address. |
| GoogleCloudCompute.Addresses.networkTier | string | This 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.ipVersion | string | The 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.addressType | string | The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL. |
| GoogleCloudCompute.Addresses.purpose | string | The purpose of resource, only used with INTERNAL type. |
| GoogleCloudCompute.Addresses.subnetwork | string | The 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.network | string | The 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.kind | string | Type 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

|address|id|name|
|---|---|---|
| 8.8.8.8 | 42 | a-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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. | Required |
| description | An optional description of this resource. Provide this property when you create the resource. | Optional |
| address | The static IP address represented by this resource. | Optional |
| prefixLength | The prefix length if the resource reprensents an IP range. | Optional |
| networkTier | This 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 |
| ipVersion | The 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 |
| addressType | The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL. | Optional |
| purpose | The purpose of resource, only used with INTERNAL type. | Optional |
| subnetwork | The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork&#x27;s IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes. | Optional |
| network | The 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | insert | 0 | RUNNING |

### gcp-compute-list-global-addresses

***
Retrieves a list of global addresses.

##### Base Command

`gcp-compute-list-global-addresses`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Addresses.id | string |  The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Addresses.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Addresses.name | string | Name of the resource. Provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Addresses.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Addresses.address | string | The static IP address represented by this resource. |
| GoogleCloudCompute.Addresses.prefixLength | number | The prefix length if the resource reprensents an IP range. |
| GoogleCloudCompute.Addresses.status | string | The 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.region | string | URL 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Addresses.users | string | The URLs of the resources that are using this address. |
| GoogleCloudCompute.Addresses.networkTier | string | This 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.ipVersion | string | The 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.addressType | string | The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL. |
| GoogleCloudCompute.Addresses.purpose | string | The purpose of resource, only used with INTERNAL type. |
| GoogleCloudCompute.Addresses.subnetwork | string | The 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.network | string | The 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.kind | string | Type 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

|address|id|name|
|---|---|---|
| 8.8.8.8 | 42 | a-b-c-1 |

### gcp-compute-aggregated-list-disks

***
Retrieves an aggregated list of persistent disks.

##### Base Command

`gcp-compute-aggregated-list-disks`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Disks.id | string | Unique identifier for the resource; defined by the server. |
| GoogleCloudCompute.Disks.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Disks.name | string | Name of the resource. Provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Disks.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Disks.sizeGb | string | Size 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.zone | string | URL 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.status | string | The status of disk creation. |
| GoogleCloudCompute.Disks.sourceSnapshot | string | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. |
| GoogleCloudCompute.Disks.sourceSnapshotId | string | The 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.options | string | Internal use only. |
| GoogleCloudCompute.Disks.selfLink | string | Server\-defined fully\-qualified URL for this resource. |
| GoogleCloudCompute.Disks.sourceImage | string | The source image used to create this disk. If the source image is deleted, this field will not be set. |
| GoogleCloudCompute.Disks.sourceImageId | string | The 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.type | string | URL 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.licenses | string | A list of publicly visible licenses. Reserved for Googles use. |
| GoogleCloudCompute.Disks.guestOsFeatures | string | A 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.type | string | The ID of a supported feature. Read Enabling guest operating system features to see a list of available options. |
| GoogleCloudCompute.Disks.lastAttachTimestamp | string | Last attach timestamp in RFC3339 text format. |
| GoogleCloudCompute.Disks.lastDetachTimestamp | string | Last detach timestamp in RFC3339 text format. |
| GoogleCloudCompute.Disks.users | string | Links to the users of the disk \(attached instances\) in form: project/zones/zone/instances/instance |
| GoogleCloudCompute.Disks.diskEncryptionKey | string | Encrypts the disk using a customer\-supplied encryption key. |
| GoogleCloudCompute.Disks.diskEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Disks.diskEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Disks.diskEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey | string | The customer\-supplied encryption key of the source image. Required if the source image is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey.sha256 | string |  The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey | string | The customer\-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Disks.labels | string | Labels to apply to this disk. These can be later modified by the setLabels method. |
| GoogleCloudCompute.Disks.labels.key | string | The label key |
| GoogleCloudCompute.Disks.labels.value | string | The label value |
| GoogleCloudCompute.Disks.labelFingerprint | string | A 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.region | string | URL 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.replicaZones | string | URLs of the zones where the disk should be replicated to. Only applicable for regional resources. |
| GoogleCloudCompute.Disks.licenseCodes | string | Integer license codes indicating which licenses are attached to this disk. |
| GoogleCloudCompute.Disks.physicalBlockSizeBytes | string | Physical 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.kind | string | Type 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

|id|name|sizeGb|status|type|zone|
|---|---|---|---|---|---|
| 42 | test01 | 100 | READY | https://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standard | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| zone | The name of the zone for this request. | Required |
| name | Name of the snapshot. | Required |
| disk | Name of the persistent disk to snapshot. | Required |
| description | An optional description of this resource. Provide this property when you create the resource. | Optional |
| snapshotEncryptionKeyRawKey | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. | Optional |
| snapshotEncryptionKeyKmsKeyName | The name of the encryption key that is stored in Google Cloud KMS. | Optional |
| sourceDiskEncryptionKeyRawKey | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. | Optional |
| sourceDiskEncryptionKeyKmsKeyName | The name of the encryption key that is stored in Google Cloud KMS. | Optional |
| labels | Labels 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=123 | Optional |
| labelFingerprint | A 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | createSnapshot | 0 | RUNNING |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| disk | Name of the persistent disk to delete. | Required |
| zone | The name of the zone for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | delete | 0 | RUNNING |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| disk | Name of the persistent disk to return. | Required |
| zone | The name of the zone for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Disks.id | string | Unique identifier for the resource; defined by the server. |
| GoogleCloudCompute.Disks.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Disks.name | string | Name of the resource. Provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Disks.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Disks.sizeGb | string | Size 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.zone | string | URL 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.status | string | The status of disk creation. |
| GoogleCloudCompute.Disks.sourceSnapshot | string | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. |
| GoogleCloudCompute.Disks.sourceSnapshotId | string | The 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.options | string | Internal use only. |
| GoogleCloudCompute.Disks.selfLink | string | Server\-defined fully\-qualified URL for this resource. |
| GoogleCloudCompute.Disks.sourceImage | string | The source image used to create this disk. If the source image is deleted, this field will not be set. |
| GoogleCloudCompute.Disks.sourceImageId | string | The 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.type | string | URL 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.licenses | string | A list of publicly visible licenses. Reserved for Googles use. |
| GoogleCloudCompute.Disks.guestOsFeatures | string | A 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.type | string | The ID of a supported feature. Read Enabling guest operating system features to see a list of available options. |
| GoogleCloudCompute.Disks.lastAttachTimestamp | string | Last attach timestamp in RFC3339 text format. |
| GoogleCloudCompute.Disks.lastDetachTimestamp | string | Last detach timestamp in RFC3339 text format. |
| GoogleCloudCompute.Disks.users | string | Links to the users of the disk \(attached instances\) in form: project/zones/zone/instances/instance |
| GoogleCloudCompute.Disks.diskEncryptionKey | string | Encrypts the disk using a customer\-supplied encryption key. |
| GoogleCloudCompute.Disks.diskEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Disks.diskEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Disks.diskEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey | string | The customer\-supplied encryption key of the source image. Required if the source image is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey.sha256 | string |  The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey | string | The customer\-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Disks.labels | string | Labels to apply to this disk. These can be later modified by the setLabels method. |
| GoogleCloudCompute.Disks.labels.key | string | The label key |
| GoogleCloudCompute.Disks.labels.value | string | The label value |
| GoogleCloudCompute.Disks.labelFingerprint | string | A 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.region | string | URL 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.replicaZones | string | URLs of the zones where the disk should be replicated to. Only applicable for regional resources. |
| GoogleCloudCompute.Disks.licenseCodes | string | Integer license codes indicating which licenses are attached to this disk. |
| GoogleCloudCompute.Disks.physicalBlockSizeBytes | string | Physical 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.kind | string | Type 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

|id|name|sizeGb|status|type|zone|
|---|---|---|---|---|---|
| 42 | testdisk | 1 | READY | https://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standard | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. | Required |
| zone | The name of the zone for this request. | Required |
| disktype | URL 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 | Required |
| description | An optional description of this resource. Provide this property when you create the resource. | Optional |
| sizeGb | Size 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 |
| sourceSnapshot | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. | Optional |
| sourceImage | The source image used to create this disk. If the source image is deleted, this field will not be set. | Optional |
| licenses | A list of publicly visible licenses. Reserved for Google&#x27;s use. | Optional |
| guestOsFeatures | A 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 |
| diskEncryptionKeyRawKey | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. | Optional |
| diskEncryptionKeyKmsKeyName | The name of the encryption key that is stored in Google Cloud KMS. | Optional |
| sourceImageEncryptionKeyRawKey | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. | Optional |
| sourceImageEncryptionKeyKmsKeyName | The name of the encryption key that is stored in Google Cloud KMS. | Optional |
| sourceSnapshotEncryptionKeyRawKey | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. | Optional |
| sourceSnapshotEncryptionKeyKmsKeyName | The name of the encryption key that is stored in Google Cloud KMS. | Optional |
| labels | Labels to apply to this disk. These can be later modified by the setLabels method. ex: key=abc,value=123;key=abc,value=123 | Optional |
| labelFingerprint | A 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 |
| replicaZones | URLs of the zones where the disk should be replicated to. Only applicable for regional resources. | Optional |
| licenseCodes | Integer license codes indicating which licenses are attached to this disk. | Optional |
| physicalBlockSizeBytes | Physical 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&#x27;s project. | Optional |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | insert | 0 | RUNNING |

### gcp-compute-list-disks

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

##### Base Command

`gcp-compute-list-disks`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| zone | The name of the zone for this request. | Required |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Disks.id | string | Unique identifier for the resource; defined by the server. |
| GoogleCloudCompute.Disks.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Disks.name | string | Name of the resource. Provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Disks.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Disks.sizeGb | string | Size 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.zone | string | URL 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.status | string | The status of disk creation. |
| GoogleCloudCompute.Disks.sourceSnapshot | string | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. |
| GoogleCloudCompute.Disks.sourceSnapshotId | string | The 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.options | string | Internal use only. |
| GoogleCloudCompute.Disks.selfLink | string | Server\-defined fully\-qualified URL for this resource. |
| GoogleCloudCompute.Disks.sourceImage | string | The source image used to create this disk. If the source image is deleted, this field will not be set. |
| GoogleCloudCompute.Disks.sourceImageId | string | The 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.type | string | URL 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.licenses | string | A list of publicly visible licenses. Reserved for Googles use. |
| GoogleCloudCompute.Disks.guestOsFeatures | string | A 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.type | string | The ID of a supported feature. Read Enabling guest operating system features to see a list of available options. |
| GoogleCloudCompute.Disks.lastAttachTimestamp | string | Last attach timestamp in RFC3339 text format. |
| GoogleCloudCompute.Disks.lastDetachTimestamp | string | Last detach timestamp in RFC3339 text format. |
| GoogleCloudCompute.Disks.users | string | Links to the users of the disk \(attached instances\) in form: project/zones/zone/instances/instance |
| GoogleCloudCompute.Disks.diskEncryptionKey | string | Encrypts the disk using a customer\-supplied encryption key. |
| GoogleCloudCompute.Disks.diskEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Disks.diskEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Disks.diskEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey | string | The customer\-supplied encryption key of the source image. Required if the source image is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey.sha256 | string |  The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Disks.sourceImageEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey | string | The customer\-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Disks.sourceSnapshotEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Disks.labels | string | Labels to apply to this disk. These can be later modified by the setLabels method. |
| GoogleCloudCompute.Disks.labels.key | string | The label key |
| GoogleCloudCompute.Disks.labels.value | string | The label value |
| GoogleCloudCompute.Disks.labelFingerprint | string | A 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.region | string | URL 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.replicaZones | string | URLs of the zones where the disk should be replicated to. Only applicable for regional resources. |
| GoogleCloudCompute.Disks.licenseCodes | string | Integer license codes indicating which licenses are attached to this disk. |
| GoogleCloudCompute.Disks.physicalBlockSizeBytes | string | Physical 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.kind | string | Type 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

|id|name|sizeGb|status|type|zone|
|---|---|---|---|---|---|
| 42 | test01 | 100 | READY | https://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standard | https://www.mockapi.com/zones/europe-west2-c |
| 42 | testdisk | 1 | READY | https://www.mockapi.com/zones/europe-west2-c/diskTypes/pd-standard | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| disk | The name of the persistent disk. | Required |
| zone | The name of the zone for this request. | Required |
| sizeGb | The new size of the persistent disk, which is specified in GB. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | resizeDisk | 0 | RUNNING |

### gcp-compute-set-disk-labels

***
Sets the labels on a disk.

##### Base Command

`gcp-compute-set-disk-labels`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| disk | Name or id of the resource for this request. | Required |
| zone | The name of the zone for this request. | Required |
| labels | The labels to set for this resource.  An object containing a list of &quot;key&quot;: value pairs. Example: key=abc,value=123;key=abc,value=123 | Required |
| labelFingerprint | The 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

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

***
Retrieves an aggregated list of disk types.

##### Base Command

`gcp-compute-aggregated-list-disk-types`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.DiskTypes.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.DiskTypes.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.DiskTypes.name | string | Name of the resource. |
| GoogleCloudCompute.DiskTypes.description | string |  An optional description of this resource. |
| GoogleCloudCompute.DiskTypes.validDiskSize | string | An optional textual description of the valid disk size, such as &quot;10GB\-10TB&quot;. |
| GoogleCloudCompute.DiskTypes.deprecated | string | The deprecation status associated with this disk type. |
| GoogleCloudCompute.DiskTypes.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.zone | string | URL 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.DiskTypes.defaultDiskSizeGb | string | Server\-defined default disk size in GB. |
| GoogleCloudCompute.DiskTypes.region | string | URL 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.kind | string | Type 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

|name|validDiskSize|
|---|---|
| pd-standard | 10GB-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 Name** | **Description** | **Required** |
| --- | --- | --- |
| disktype | Name of the disk type to return. | Required |
| zone | The name of the zone for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.DiskTypes.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.DiskTypes.name | string | Name of the resource. |
| GoogleCloudCompute.DiskTypes.description | string |  An optional description of this resource. |
| GoogleCloudCompute.DiskTypes.validDiskSize | string | An optional textual description of the valid disk size, such as &quot;10GB\-10TB&quot;. |
| GoogleCloudCompute.DiskTypes.deprecated | string | The deprecation status associated with this disk type. |
| GoogleCloudCompute.DiskTypes.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.zone | string | URL 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.DiskTypes.defaultDiskSizeGb | string | Server\-defined default disk size in GB. |
| GoogleCloudCompute.DiskTypes.region | string | URL 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.kind | string | Type of the resource. Always compute\#diskType for disk types. |
| GoogleCloudCompute.DiskTypes.id | string | The 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

|name|validDiskSize|zone|
|---|---|---|
| pd-ssd | 10GB-42GB | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| zone | The name of the zone for this request. | Required |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.DiskTypes.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.DiskTypes.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.DiskTypes.name | string | Name of the resource. |
| GoogleCloudCompute.DiskTypes.description | string |  An optional description of this resource. |
| GoogleCloudCompute.DiskTypes.validDiskSize | string | An optional textual description of the valid disk size, such as &quot;10GB\-10TB&quot;. |
| GoogleCloudCompute.DiskTypes.deprecated | string | The deprecation status associated with this disk type. |
| GoogleCloudCompute.DiskTypes.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.zone | string | URL 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.DiskTypes.defaultDiskSizeGb | string | Server\-defined default disk size in GB. |
| GoogleCloudCompute.DiskTypes.region | string | URL 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.kind | string | Type 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

|name|validDiskSize|
|---|---|
| local-ssd | 375GB-375GB |
| pd-ssd | 10GB-42GB |
| pd-standard | 10GB-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 Name** | **Description** | **Required** |
| --- | --- | --- |
| project | Project ID for this request. if left empty configured project will be used. | Optional |
| image | Name of the image resource to return. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Images.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Images.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Images.name | string | Name of the resource; provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Images.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Images.sourceType | string | The type of the image used to create this disk. The default and only value is RAW |
| GoogleCloudCompute.Images.rawDisk | string | The parameters of the raw disk image. |
| GoogleCloudCompute.Images.rawDisk.source | string | The 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.sha1Checksum | string | An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created. |
| GoogleCloudCompute.Images.rawDisk.containerType | string | The 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.deprecated | string | The deprecation status associated with this image. |
| GoogleCloudCompute.Images.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.status | string | The 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.archiveSizeBytes | string | Size of the image tar.gz archive stored in Google Cloud Storage \(in bytes\). |
| GoogleCloudCompute.Images.diskSizeGb | string | Size of the image when restored onto a persistent disk \(in GB\). |
| GoogleCloudCompute.Images.sourceDisk | string | URL 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.sourceDiskId | string | The 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.licenses | string | Any applicable license URI. |
| GoogleCloudCompute.Images.family | string | The 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.imageEncryptionKey | string | Encrypts 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.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Images.imageEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Images.imageEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Images.sourceDiskEncryptionKey | string | The customer\-supplied encryption key of the source disk. Required if the source disk is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Images.sourceDiskEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Images.sourceDiskEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Images.sourceDiskEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Images.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Images.labels | string | Labels to apply to this image. These can be later modified by the setLabels method. |
| GoogleCloudCompute.Images.labelFingerprint | string | A 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.guestOsFeatures | string | A 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.type | string | The ID of a supported feature. Read Enabling guest operating system features to see a list of available options. |
| GoogleCloudCompute.Images.licenseCodes | string | Integer license codes indicating which licenses are attached to this image. |
| GoogleCloudCompute.Images.sourceImage | string | URL of the source image used to create this image. This can be a full or valid partial URL. |
| GoogleCloudCompute.Images.sourceImageId | string | The 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.sourceImageEncryptionKey | string | The customer\-supplied encryption key of the source image. Required if the source image is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Images.sourceImageEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Images.sourceImageEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Images.sourceImageEncryptionKey.sha256 | string |  The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Images.sourceSnapshot | string | URL of the source snapshot used to create this image. This can be a full or valid partial URL. |
| GoogleCloudCompute.Images.sourceSnapshotId | string |  The 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.sourceSnapshotEncryptionKey | string | The customer\-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Images.kind | string | Type of the resource. Always compute\#image for images. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| project | Project ID for this request. if left empty configured project will be used. | Optional |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Images.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Images.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Images.name | string | Name of the resource; provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Images.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Images.sourceType | string | The type of the image used to create this disk. The default and only value is RAW |
| GoogleCloudCompute.Images.rawDisk | string | The parameters of the raw disk image. |
| GoogleCloudCompute.Images.rawDisk.source | string | The 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.sha1Checksum | string | An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created. |
| GoogleCloudCompute.Images.rawDisk.containerType | string | The 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.deprecated | string | The deprecation status associated with this image. |
| GoogleCloudCompute.Images.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.status | string | The 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.archiveSizeBytes | string | Size of the image tar.gz archive stored in Google Cloud Storage \(in bytes\). |
| GoogleCloudCompute.Images.diskSizeGb | string | Size of the image when restored onto a persistent disk \(in GB\). |
| GoogleCloudCompute.Images.sourceDisk | string | URL 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.sourceDiskId | string | The 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.licenses | string | Any applicable license URI. |
| GoogleCloudCompute.Images.family | string | The 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.imageEncryptionKey | string | Encrypts 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.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Images.imageEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Images.imageEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Images.sourceDiskEncryptionKey | string | The customer\-supplied encryption key of the source disk. Required if the source disk is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Images.sourceDiskEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Images.sourceDiskEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Images.sourceDiskEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Images.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Images.labels | string | Labels to apply to this image. These can be later modified by the setLabels method. |
| GoogleCloudCompute.Images.labelFingerprint | string | A 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.guestOsFeatures | string | A 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.type | string | The ID of a supported feature. Read Enabling guest operating system features to see a list of available options. |
| GoogleCloudCompute.Images.licenseCodes | string | Integer license codes indicating which licenses are attached to this image. |
| GoogleCloudCompute.Images.sourceImage | string | URL of the source image used to create this image. This can be a full or valid partial URL. |
| GoogleCloudCompute.Images.sourceImageId | string | The 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.sourceImageEncryptionKey | string | The customer\-supplied encryption key of the source image. Required if the source image is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Images.sourceImageEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Images.sourceImageEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Images.sourceImageEncryptionKey.sha256 | string |  The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Images.sourceSnapshot | string | URL of the source snapshot used to create this image. This can be a full or valid partial URL. |
| GoogleCloudCompute.Images.sourceSnapshotId | string |  The 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.sourceSnapshotEncryptionKey | string | The customer\-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Images.sourceSnapshotEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Images.kind | string | Type 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| image | Name of the image resource to delete. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### gcp-compute-set-image-labels

***
Sets the labels on an image.

##### Base Command

`gcp-compute-set-image-labels`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| image | Name or id of the resource for this request. | Required |
| labels | An object containing a list of &quot;key&quot;: value pairs. Example: key=abc,value=123;key=abc,value=123 | Required |
| labelFingerprint | The 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. | Required |
| description | An optional description of this resource. Provide this property when you create the resource. | Optional |
| rawDiskSource | The 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 |
| rawDiskSha1Checksum | An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created. | Optional |
| rawDiskContainerType | The 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 |
| deprecatedState | The 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 |
| deprecatedReplacement | The 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 |
| archiveSizeBytes | Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). | Optional |
| diskSizeGb | Size of the image when restored onto a persistent disk (in GB). | Optional |
| sourceDisk | URL 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.useReadOnly | Optional |
| licenses | Any applicable license URI.  Authorization requires the following Google IAM permission on the specified resource licenses:  compute.licenseCodes.use | Optional |
| family | The 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 |
| imageEncryptionKeyRawKey | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. | Optional |
| imageEncryptionKeyKmsKeyName | The name of the encryption key that is stored in Google Cloud KMS. | Optional |
| sourceDiskEncryptionKeyRawKey | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. | Optional |
| sourceDiskEncryptionKeyKmsKeyName | The name of the encryption key that is stored in Google Cloud KMS. | Optional |
| labels | Labels to apply to this image. These can be later modified by the setLabels method.  An object containing a list of &quot;key&quot;: value pairs. Example: key=abc,value=123;key=abc,value=123 | Optional |
| labelFingerprint | A 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 |
| guestOsFeatures | A 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 |
| licenseCodes | Integer license codes indicating which licenses are attached to this image.  Authorization requires the following Google IAM permission on the specified resource licenseCodes:  compute.licenseCodes.use | Optional |
| sourceImage | URL 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 |
| sourceImageEncryptionKeyRawKey | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. | Optional |
| sourceImageEncryptionKeyKmsKeyName | The name of the encryption key that is stored in Google Cloud KMS. | Optional |
| sourceSnapshot | URL 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 |
| sourceSnapshotEncryptionKeyRawKey | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. | Optional |
| sourceSnapshotEncryptionKeyKmsKeyName | The name of the encryption key that is stored in Google Cloud KMS. | Optional |
| forceCreate | Force image creation if true. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instanceGroup | The name of the instance group where you are adding instances. | Required |
| zone | The name of the zone where the instance group is located. | Required |
| instances | The list of instances to add to the instance group. comma separated. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

|id|name|network|zone|
|---|---|---|---|
| 42 | mock_instance-grp | network | https://www.mockapi.com/zones/ |
| 42 | test01 |  | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instanceGroup | The name of the instance group to delete. | Required |
| zone | The name of the zone where the instance group is located. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instanceGroup | The name of the instance group. | Required |
| zone | The name of the zone where the instance group is located. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.InstanceGroups.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.InstanceGroups.creationTimestamp | string | The creation timestamp for this instance group in RFC3339 text format. |
| GoogleCloudCompute.InstanceGroups.name | string | The name of the instance group. The name must be 1\-63 characters long, and comply with RFC1035. |
| GoogleCloudCompute.InstanceGroups.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.InstanceGroups.namedPorts | string | Assigns a name to a port number. |
| GoogleCloudCompute.InstanceGroups.namedPorts.name | string | The name for this named port. The name must be 1\-63 characters long, and comply with RFC1035. |
| GoogleCloudCompute.InstanceGroups.namedPorts.port | string | The port number, which can be a value between 1 and 42. |
| GoogleCloudCompute.InstanceGroups.network | string | The URL of the network to which all instances in the instance group belong. |
| GoogleCloudCompute.InstanceGroups.fingerprint | string | The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. |
| GoogleCloudCompute.InstanceGroups.zone | string | The URL of the zone where the instance group is located \(for zonal resources\). |
| GoogleCloudCompute.InstanceGroups.selfLink | string | The URL for this instance group. The server generates this URL. |
| GoogleCloudCompute.InstanceGroups.size | string | The total number of instances in the instance group. |
| GoogleCloudCompute.InstanceGroups.region | string | The URL of the region where the instance group is located \(for regional resources\). |
| GoogleCloudCompute.InstanceGroups.subnetwork | string | The URL of the subnetwork to which all instances in the instance group belong |
| GoogleCloudCompute.InstanceGroups.kind | string |  The 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

|id|name|network|zone|
|---|---|---|---|
| 42 | mock_instance-grp | network | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. | Required |
| zone | The name of the zone where you want to create the instance group. | Required |
| namedPorts | Assigns a name to a port number. For example: name=abc,port=123;name=abc,port=123 | Optional |
| network | The URL of the network to which all instances in the instance group belong. | Optional |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| zone | The name of the zone where the instance group is located. | Required |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.InstanceGroups.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.InstanceGroups.creationTimestamp | string | The creation timestamp for this instance group in RFC3339 text format. |
| GoogleCloudCompute.InstanceGroups.name | string | The name of the instance group. The name must be 1\-63 characters long, and comply with RFC1035. |
| GoogleCloudCompute.InstanceGroups.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.InstanceGroups.namedPorts | string | Assigns a name to a port number. |
| GoogleCloudCompute.InstanceGroups.namedPorts.name | string | The name for this named port. The name must be 1\-63 characters long, and comply with RFC1035. |
| GoogleCloudCompute.InstanceGroups.namedPorts.port | string | The port number, which can be a value between 1 and 42. |
| GoogleCloudCompute.InstanceGroups.network | string | The URL of the network to which all instances in the instance group belong. |
| GoogleCloudCompute.InstanceGroups.fingerprint | string | The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. |
| GoogleCloudCompute.InstanceGroups.zone | string | The URL of the zone where the instance group is located \(for zonal resources\). |
| GoogleCloudCompute.InstanceGroups.selfLink | string | The URL for this instance group. The server generates this URL. |
| GoogleCloudCompute.InstanceGroups.size | string | The total number of instances in the instance group. |
| GoogleCloudCompute.InstanceGroups.region | string | The URL of the region where the instance group is located \(for regional resources\). |
| GoogleCloudCompute.InstanceGroups.subnetwork | string | The URL of the subnetwork to which all instances in the instance group belong |
| GoogleCloudCompute.InstanceGroups.kind | string |  The 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

|creationTimestamp|description|fingerprint|id|kind|name|namedPorts|network|selfLink|size|subnetwork|zone|
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2020-04-21T02:13:05.599-07:00 | 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 | tH9xjDSGfNw= | 42 | compute#instanceGroup | mock_instance-grp | {u'name': u'abc', u'port': 123} | network | https://www.mockapi.com/zones//instanceGroups/mock_instance-grp | 6 | subnetwork | https://www.mockapi.com/zones/ |
| 2020-04-30T05:49:45.272-07:00 |  | 42WmSpB8rSM= | 42 | compute#instanceGroup | test01 |  |  | https://www.mockapi.com/zones//instanceGroups/test01 | 0 |  | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| zone | The name of the zone where the instance group is located. | Required |
| instanceGroup | The name of the instance group from which you want to generate a list of included instances. | Required |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. | Optional |
| instanceState | A 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.InstanceGroupsInstances.Instances.instance | string | The URL of the instance. |
| GoogleCloudCompute.InstanceGroupsInstances.Instances.status | string | The status of the instance |
| GoogleCloudCompute.InstanceGroupsInstances.Instances.namedPorts | string |  The named ports that belong to this instance group. |
| GoogleCloudCompute.InstanceGroupsInstances.Instances.namedPorts.name | string | The name for this named port. The name must be 1\-63 characters long, and comply with RFC1035. |
| GoogleCloudCompute.InstanceGroupsInstances.Instances.namedPorts.port | string | The port number, which can be a value between 1 and 42. |
| GoogleCloudCompute.InstanceGroupsInstances.Group | Unknown | The 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

|instance|status|
|---|---|
| https://www.mockapi.com/zones/instances/mock-disk | RUNNING |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instanceGroup | The name of the instance group where the specified instances will be removed. | Required |
| zone | The name of the zone where the instance group is located. | Required |
| instances | The list of instances to remove from the instance group. comma separated. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instanceGroup | The name of the instance group where the named ports are updated. | Required |
| zone | The name of the zone where the instance group is located. | Required |
| namedPorts | The list of named ports to set for this instance group. example: name=abc,port=123;name=abc,port=123 | Required |
| fingerprint | The 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | compute.instanceGroups.setNamedPorts | 0 | RUNNING |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| region | Name of the region resource to return. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Regions.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Regions.creationTimestamp | string |  Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Regions.name | string | Name of the resource. |
| GoogleCloudCompute.Regions.description | string | Textual description of the resource. |
| GoogleCloudCompute.Regions.status | string | Status of the region, either UP or DOWN. |
| GoogleCloudCompute.Regions.zones | string | A list of zones available in this region, in the form of resource URLs. |
| GoogleCloudCompute.Regions.quotas | string | Quotas assigned to this region. |
| GoogleCloudCompute.Regions.quotas.metric | string | Name of the quota metric. |
| GoogleCloudCompute.Regions.quotas.limit | string | Quota limit for this metric. |
| GoogleCloudCompute.Regions.quotas.usage | string |  Current usage of this metric. |
| GoogleCloudCompute.Regions.quotas.owner | string | Owning resource. This is the resource on which this quota is applied. |
| GoogleCloudCompute.Regions.deprecated | string | The deprecation status associated with this region. |
| GoogleCloudCompute.Regions.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Regions.kind | string | Type 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

|id|name|status|
|---|---|---|
| 1290 | europe-west2 | UP |

### gcp-compute-list-regions

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

##### Base Command

`gcp-compute-list-regions`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Regions.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Regions.creationTimestamp | string |  Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Regions.name | string | Name of the resource. |
| GoogleCloudCompute.Regions.description | string | Textual description of the resource. |
| GoogleCloudCompute.Regions.status | string | Status of the region, either UP or DOWN. |
| GoogleCloudCompute.Regions.zones | string | A list of zones available in this region, in the form of resource URLs. |
| GoogleCloudCompute.Regions.quotas | string | Quotas assigned to this region. |
| GoogleCloudCompute.Regions.quotas.metric | string | Name of the quota metric. |
| GoogleCloudCompute.Regions.quotas.limit | string | Quota limit for this metric. |
| GoogleCloudCompute.Regions.quotas.usage | string |  Current usage of this metric. |
| GoogleCloudCompute.Regions.quotas.owner | string | Owning resource. This is the resource on which this quota is applied. |
| GoogleCloudCompute.Regions.deprecated | string | The deprecation status associated with this region. |
| GoogleCloudCompute.Regions.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Regions.kind | string | Type 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

|id|name|status|
|---|---|---|
| 1220 | asia-east1 | UP |
| 1370 | asia-east2 | UP |
| 1250 | asia-northeast1 | UP |
| 1390 | asia-northeast2 | UP |
| 1410 | asia-northeast3 | UP |
| 1320 | asia-south1 | UP |
| 1260 | asia-southeast1 | UP |
| 1280 | australia-southeast1 | UP |
| 1350 | europe-north1 | UP |
| 1100 | europe-west1 | UP |
| 1290 | europe-west2 | UP |
| 1300 | europe-west3 | UP |
| 1340 | europe-west4 | UP |
| 1380 | europe-west6 | UP |
| 1330 | northamerica-northeast1 | UP |
| 1310 | southamerica-east1 | UP |
| 1000 | us-central1 | UP |
| 1230 | us-east1 | UP |
| 1270 | us-east4 | UP |
| 1210 | us-west1 | UP |
| 1360 | us-west2 | UP |
| 1420 | us-west3 | UP |
| 1430 | us-west4 | UP |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| zone | Name of the zone resource to return. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Zones.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Zones.creationTimestamp | string |  Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Zones.name | string | Name of the resource. |
| GoogleCloudCompute.Zones.description | string | Textual description of the resource. |
| GoogleCloudCompute.Zones.status | string | Status of the zone, either UP or DOWN. |
| GoogleCloudCompute.Zones.deprecated | string | The deprecation status associated with this zone. |
| GoogleCloudCompute.Zones.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.region | string | Full URL reference to the region which hosts the zone. |
| GoogleCloudCompute.Zones.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Zones.availableCpuPlatforms | string | Available cpu/platform selections for the zone. Do not use field = 7 or field = 11. Next available field = 14. |
| GoogleCloudCompute.Zones.kind | string | Type 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

|id|name|status|
|---|---|---|
| 2292 | europe-west2-c | UP |

### gcp-compute-list-zones

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

##### Base Command

`gcp-compute-list-zones`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Zones.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Zones.creationTimestamp | string |  Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Zones.name | string | Name of the resource. |
| GoogleCloudCompute.Zones.description | string | Textual description of the resource. |
| GoogleCloudCompute.Zones.status | string | Status of the zone, either UP or DOWN. |
| GoogleCloudCompute.Zones.deprecated | string | The deprecation status associated with this zone. |
| GoogleCloudCompute.Zones.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.region | string | Full URL reference to the region which hosts the zone. |
| GoogleCloudCompute.Zones.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Zones.availableCpuPlatforms | string | Available cpu/platform selections for the zone. Do not use field = 7 or field = 11. Next available field = 14. |
| GoogleCloudCompute.Zones.kind | string | Type 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

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

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

***
Retrieves an aggregated list of machine types.

##### Base Command

`gcp-compute-aggregated-list-machine-types`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.MachineTypes.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.MachineTypes.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.MachineTypes.name | string | Name of the resource. |
| GoogleCloudCompute.MachineTypes.description | string | An optional textual description of the resource. |
| GoogleCloudCompute.MachineTypes.guestCpus | number | The number of virtual CPUs that are available to the instance. |
| GoogleCloudCompute.MachineTypes.memoryMb | number | The amount of physical memory available to the instance, defined in MB. |
| GoogleCloudCompute.MachineTypes.imageSpaceGb | number | This property is deprecated and will never be populated with any relevant values. |
| GoogleCloudCompute.MachineTypes.scratchDisks | string | A list of extended scratch disks assigned to the instance. |
| GoogleCloudCompute.MachineTypes.scratchDisks.diskGb | number | Size of the scratch disk, defined in GB. |
| GoogleCloudCompute.MachineTypes.maximumPersistentDisks | number | Maximum persistent disks allowed. |
| GoogleCloudCompute.MachineTypes.maximumPersistentDisksSizeGb | string |  Maximum total persistent disks size \(GB\) allowed. |
| GoogleCloudCompute.MachineTypes.deprecated | string | The deprecation status associated with this machine type. |
| GoogleCloudCompute.MachineTypes.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.zone | string | The name of the zone where the machine type resides, such as us\-central1\-a. |
| GoogleCloudCompute.MachineTypes.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.MachineTypes.isSharedCpu | boolean | Whether this machine type has a shared CPU. See Shared\-core machine types for more information. |
| GoogleCloudCompute.MachineTypes.kind | string | The type of the resource. Always compute\#machineType for machine types. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| machineType | Name of the machine type to return. | Required |
| zone | The name of the zone for this request. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.MachineTypes.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.MachineTypes.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.MachineTypes.name | string | Name of the resource. |
| GoogleCloudCompute.MachineTypes.description | string | An optional textual description of the resource. |
| GoogleCloudCompute.MachineTypes.guestCpus | number | The number of virtual CPUs that are available to the instance. |
| GoogleCloudCompute.MachineTypes.memoryMb | number | The amount of physical memory available to the instance, defined in MB. |
| GoogleCloudCompute.MachineTypes.imageSpaceGb | number | This property is deprecated and will never be populated with any relevant values. |
| GoogleCloudCompute.MachineTypes.scratchDisks | string | A list of extended scratch disks assigned to the instance. |
| GoogleCloudCompute.MachineTypes.scratchDisks.diskGb | number | Size of the scratch disk, defined in GB. |
| GoogleCloudCompute.MachineTypes.maximumPersistentDisks | number | Maximum persistent disks allowed. |
| GoogleCloudCompute.MachineTypes.maximumPersistentDisksSizeGb | string |  Maximum total persistent disks size \(GB\) allowed. |
| GoogleCloudCompute.MachineTypes.deprecated | string | The deprecation status associated with this machine type. |
| GoogleCloudCompute.MachineTypes.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.zone | string | The name of the zone where the machine type resides, such as us\-central1\-a. |
| GoogleCloudCompute.MachineTypes.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.MachineTypes.isSharedCpu | boolean | Whether this machine type has a shared CPU. See Shared\-core machine types for more information. |
| GoogleCloudCompute.MachineTypes.kind | string | The 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

|guestCpus|id|memoryMb|name|
|---|---|---|---|
| 16 | 42 | 42 | c2-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 Name** | **Description** | **Required** |
| --- | --- | --- |
| zone | The name of the zone for this request. | Required |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.MachineTypes.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.MachineTypes.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.MachineTypes.name | string | Name of the resource. |
| GoogleCloudCompute.MachineTypes.description | string | An optional textual description of the resource. |
| GoogleCloudCompute.MachineTypes.guestCpus | number | The number of virtual CPUs that are available to the instance. |
| GoogleCloudCompute.MachineTypes.memoryMb | number | The amount of physical memory available to the instance, defined in MB. |
| GoogleCloudCompute.MachineTypes.imageSpaceGb | number | This property is deprecated and will never be populated with any relevant values. |
| GoogleCloudCompute.MachineTypes.scratchDisks | string | A list of extended scratch disks assigned to the instance. |
| GoogleCloudCompute.MachineTypes.scratchDisks.diskGb | number | Size of the scratch disk, defined in GB. |
| GoogleCloudCompute.MachineTypes.maximumPersistentDisks | number | Maximum persistent disks allowed. |
| GoogleCloudCompute.MachineTypes.maximumPersistentDisksSizeGb | string |  Maximum total persistent disks size \(GB\) allowed. |
| GoogleCloudCompute.MachineTypes.deprecated | string | The deprecation status associated with this machine type. |
| GoogleCloudCompute.MachineTypes.deprecated.state | string | The 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.replacement | string | The 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.deprecated | string | An 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.obsolete | string | An 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.deleted | string | An 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.zone | string | The name of the zone where the machine type resides, such as us\-central1\-a. |
| GoogleCloudCompute.MachineTypes.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.MachineTypes.isSharedCpu | boolean | Whether this machine type has a shared CPU. See Shared\-core machine types for more information. |
| GoogleCloudCompute.MachineTypes.kind | string | The 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

|guestCpus|id|memoryMb|name|
|---|---|---|---|
| 16 | 42 | 42 | c2-standard-16 |

### gcp-compute-networks-add-peering

***
Adds a peering to the specified network.

##### Base Command

`gcp-compute-networks-add-peering`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| network | Name of the network resource to add peering to. | Required |
| name |  Name of the peering, which should conform to RFC1035. | Optional |
| peerNetwork | 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 |
| networkPeeringName | Name 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 |
| networkPeeringNetwork | The 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 |
| networkPeeringExchangeSubnetRoutes | 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 peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### gcp-compute-delete-network

***
Deletes the specified network.

##### Base Command

`gcp-compute-delete-network`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| network | Name of the network to delete. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | delete | 0 | RUNNING |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. | Required |
| description | An optional description of this resource. Provide this property when you create the resource. | Optional |
| autoCreateSubnetworks | When set to true, the VPC network is created in &quot;auto&quot; mode. When set to false, the VPC network is created in &quot;custom&quot; 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 |
| routingConfigRoutingMode | The network-wide routing mode to use. If set to REGIONAL, this network&#x27;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&#x27;s cloud routers will advertise routes with all subnets of this network, across regions. | Optional |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | insert | 0 | RUNNING |

### gcp-compute-list-networks

***
Retrieves the list of networks available to the specified project.

##### Base Command

`gcp-compute-list-networks`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Networks.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Networks.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Networks.name | string | Name of the resource. Provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Networks.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Networks.gatewayIPv4 | string | The gateway address for default routing out of the network. This value is read only and is selected by GCP. |
| GoogleCloudCompute.Networks.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Networks.autoCreateSubnetworks | boolean | When set to true, the VPC network is created in &quot;auto&quot; mode. When set to false, the VPC network is created in &quot;custom&quot; mode. |
| GoogleCloudCompute.Networks.subnetworks | string | Server\-defined fully\-qualified URLs for all subnetworks in this VPC network. |
| GoogleCloudCompute.Networks.peerings | string |  A list of network peerings for the resource. |
| GoogleCloudCompute.Networks.peerings.name | string | Name 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.network | string | The 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.state | string | State for the peering. |
| GoogleCloudCompute.Networks.peerings.stateDetails | string | Details about the current state of the peering. |
| GoogleCloudCompute.Networks.peerings.autoCreateRoutes | boolean | This 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.exchangeSubnetRoutes | boolean | 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 peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network. |
| GoogleCloudCompute.Networks.routingConfig | string | The 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.routingMode | string | The 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.kind | string | Type 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

|id|name|
|---|---|
| 42 | a-1-2 |

### gcp-compute-networks-remove-peering

***
Removes a peering from the specified network.

##### Base Command

`gcp-compute-networks-remove-peering`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| network | Name of the network resource to remove peering from. | Required |
| name | Name of the peering, which should conform to RFC1035. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| zone | Name of the zone for this request. | Required |
| name | Name of the Operations resource | Required |

##### Context Output

There is no context output for this command.

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| region | Name of the region for this request. | Required |
| name | Name of the Operations resource | Required |

##### Context Output

There is no context output for this command.

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the Operations resource | Required |

##### Context Output

There is no context output for this command.

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. | Required |
| description | An optional description of this resource. Provide this property when you create the resource. | Optional |
| network | URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used | Optional |
| priority | Priority 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 |
| sourceRanges | If 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 |
| destinationRanges | If 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 |
| sourceTags | If 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. comma separated. | Optional |
| targetTags | A 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 |
| sourceServiceAccounts | If 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. comma separated. | Optional |
| targetServiceAccounts | A 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 |
| allowed | The 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,80 | Optional |
| denied | The 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,80 | Optional |
| direction | Direction 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 |
| logConfigEnable | This field denotes whether to enable logging for a particular firewall rule. | Optional |
| disabled | Denotes 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_id | Project ID that you want to run this command on. | Optional |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | insert | 0 | RUNNING |

### gcp-compute-patch-firewall

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

##### Base Command

`gcp-compute-patch-firewall`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. | Required |
| description | An optional description of this resource. Provide this property when you create the resource. | Optional |
| network | URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used | Optional |
| priority | Priority 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 |
| sourceRanges | If 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 |
| destinationRanges | If 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 |
| sourceTags | If 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. comma separated. | Optional |
| targetTags | A 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 |
| sourceServiceAccounts | If 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. comma separated. | Optional |
| targetServiceAccounts | A 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 |
| allowed | The 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,80 | Optional |
| denied | The 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,80 | Optional |
| direction | Direction 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 |
| logConfigEnable | This field denotes whether to enable logging for a particular firewall rule. | Optional |
| disabled | Denotes 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | patch | 0 | RUNNING |

### gcp-compute-list-firewall

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

##### Base Command

`gcp-compute-list-firewall`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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_id | Project ID that you want to run this command on. | Optional |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Firewalls.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Firewalls.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Firewalls.name | string | Name of the resource; provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Firewalls.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Firewalls.network | string | URL of the network resource for this firewall rule |
| GoogleCloudCompute.Firewalls.priority | number | Priority 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.sourceRanges | string | If 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.destinationRanges | string | If 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.sourceTags | string | If 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.targetTags | string | A 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.sourceServiceAccounts | string | If 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.targetServiceAccounts | string | A 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.allowed | Unknown | The 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.IPProtocol | string | The 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.ports | string | An 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.denied | Unknown | The 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.IPProtocol | string | The 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.ports | string | An 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.direction | string | Direction 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.logConfig | Unknown | This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. |
| GoogleCloudCompute.Firewalls.logConfig.enable | boolean | This field denotes whether to enable logging for a particular firewall rule. |
| GoogleCloudCompute.Firewalls.disabled | boolean | Denotes 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Firewalls.kind | string |  Type 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

|name|network|priority|
|---|---|---|
| a-1-2-3 | network | 1000 |

### gcp-compute-get-firewall

***
Returns the specified firewall.

##### Base Command

`gcp-compute-get-firewall`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the firewall rule to return. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Firewalls.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Firewalls.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Firewalls.name | string | Name of the resource; provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Firewalls.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Firewalls.network | string | URL of the network resource for this firewall rule |
| GoogleCloudCompute.Firewalls.priority | number | Priority 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.sourceRanges | string | If 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.destinationRanges | string | If 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.sourceTags | string | If 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.targetTags | string | A 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.sourceServiceAccounts | string | If 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.targetServiceAccounts | string | A 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.allowed | Unknown | The 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.IPProtocol | string | The 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.ports | string | An 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.denied | Unknown | The 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.IPProtocol | string | The 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.ports | string | An 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.direction | string | Direction 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.logConfig | Unknown | This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. |
| GoogleCloudCompute.Firewalls.logConfig.enable | boolean | This field denotes whether to enable logging for a particular firewall rule. |
| GoogleCloudCompute.Firewalls.disabled | boolean | Denotes 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.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Firewalls.kind | string |  Type 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

|name|network|priority|
|---|---|---|
| default-allow-https | network | 1000 |

### gcp-compute-delete-firewall

***
Deletes the specified firewall.

##### Base Command

`gcp-compute-delete-firewall`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the firewall rule to delete. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### gcp-compute-set-snapshot-labels

***
Sets the labels on a snapshot.

##### Base Command

`gcp-compute-set-snapshot-labels`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name or id of the resource for this request. | Required |
| labels | A list of labels to apply for this resource. Each label key &amp; 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=123 | Required |
| labelFingerprint | The 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type of the resource. Always compute\#operation for Operation resources. |

### gcp-compute-list-snapshots

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

##### Base Command

`gcp-compute-list-snapshots`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| maxResults | The 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 |
| filters | A 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 =, !=, &gt;, or &lt;.  For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. | Optional |
| orderBy | Sorts 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=&quot;creationTimestamp desc&quot;. 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 |
| pageToken | Specifies 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Snapshots.id | string | The unique identifier for the resource. This identifier is defined by the server |
| GoogleCloudCompute.Snapshots.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Snapshots.name | string | Name of the resource; provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Snapshots.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Snapshots.status | string | The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. |
| GoogleCloudCompute.Snapshots.sourceDisk | string | The source disk used to create this snapshot. |
| GoogleCloudCompute.Snapshots.sourceDiskId | string | The 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.diskSizeGb | string | Size of the snapshot, specified in GB. |
| GoogleCloudCompute.Snapshots.storageBytes | string | A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion |
| GoogleCloudCompute.Snapshots.storageBytesStatus | string | An 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.licenses | string | A 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.snapshotEncryptionKey | unknown | Encrypts 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.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Snapshots.snapshotEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Snapshots.snapshotEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey | Unknown | The customer\-supplied encryption key of the source disk. Required if the source disk is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Snapshots.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Snapshots.labels | Unknown | Labels 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 &quot;key&quot;: value pairs. Example: \{ &quot;name&quot;: &quot;wrench&quot;, &quot;mass&quot;: &quot;1.3kg&quot;, &quot;count&quot;: &quot;3&quot; \}. |
| GoogleCloudCompute.Snapshots.labels.key | string | The label key. |
| GoogleCloudCompute.Snapshots.labels.value | string | The label value. |
| GoogleCloudCompute.Snapshots.labelFingerprint | string | A 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.licenseCodes | string |  Integer license codes indicating which licenses are attached to this snapshot. |
| GoogleCloudCompute.Snapshots.kind | string | Type 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

|creationTimestamp|name|status|
|---|---|---|
| 2020-05-03T01:13:24.244-07:00 | testsnap1 | READY |

### gcp-compute-get-snapshot

***
Returns the specified Snapshot resource.

##### Base Command

`gcp-compute-get-snapshot`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the Snapshot resource to return. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Snapshots.id | string | The unique identifier for the resource. This identifier is defined by the server |
| GoogleCloudCompute.Snapshots.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Snapshots.name | string | Name of the resource; provided by the client when the resource is created. The name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Snapshots.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Snapshots.status | string | The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. |
| GoogleCloudCompute.Snapshots.sourceDisk | string | The source disk used to create this snapshot. |
| GoogleCloudCompute.Snapshots.sourceDiskId | string | The 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.diskSizeGb | string | Size of the snapshot, specified in GB. |
| GoogleCloudCompute.Snapshots.storageBytes | string | A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion |
| GoogleCloudCompute.Snapshots.storageBytesStatus | string | An 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.licenses | string | A 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.snapshotEncryptionKey | unknown | Encrypts 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.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Snapshots.snapshotEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Snapshots.snapshotEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey | Unknown | The customer\-supplied encryption key of the source disk. Required if the source disk is protected by a customer\-supplied encryption key. |
| GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Snapshots.sourceDiskEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Snapshots.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Snapshots.labels | Unknown | Labels 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 &quot;key&quot;: value pairs. Example: \{ &quot;name&quot;: &quot;wrench&quot;, &quot;mass&quot;: &quot;1.3kg&quot;, &quot;count&quot;: &quot;3&quot; \}. |
| GoogleCloudCompute.Snapshots.labels.key | string | The label key. |
| GoogleCloudCompute.Snapshots.labels.value | string | The label value. |
| GoogleCloudCompute.Snapshots.labelFingerprint | string | A 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.licenseCodes | string |  Integer license codes indicating which licenses are attached to this snapshot. |
| GoogleCloudCompute.Snapshots.kind | string | Type 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

|creationTimestamp|name|status|
|---|---|---|
| 2020-05-03T01:13:24.244-07:00 | testsnap1 | READY |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| name | Name of the Snapshot resource to delete. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | delete | 0 | RUNNING |

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

***
Add or update project wide metadata.

##### Base Command

`gcp-compute-project-info-add-metadata`

##### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| metadata | Metadata to be made available to the guest operating system running on the instances. Each entry is a key/value pair separated by &#x27;;&#x27; like so: key=abc,value=123;key=abc,value=123 | Required |

##### 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

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.ProjectMetadata.operationType | string | The type of operation, such as insert, update, or delete. |
| GoogleCloudCompute.ProjectMetadata.insertTime | date | The time that this operation was started by the server. |
| GoogleCloudCompute.ProjectMetadata.selfLink | string | Server-defined URL for the project. |
| GoogleCloudCompute.ProjectMetadata.targetLink | string | The URL of the resource that the operation modifies. |
| GoogleCloudCompute.ProjectMetadata.name | string | Name of the operation. |
| GoogleCloudCompute.ProjectMetada.progress | number | Progress indicator that ranges from 0 to 100. |
| GoogleCloudCompute.ProjectMetadata.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource. |
| GoogleCloudCompute.ProjectMetadata.startTime | date | The time that this operation was started by the server. |
| GoogleCloudCompute.ProjectMetadata.status | string | The status of the operation, which can be one of the following PENDING, RUNNING, or DONE. |
| GoogleCloudCompute.ProjectMetadata.kind | string | Type 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

|id|kind|name|operationType|progress|status|
|---|---|---|---|---|---|
| 42 | compute#operation | mock-operation | compute.projects.setCommonInstanceMetadata | 0 | RUNNING |

### 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 Name** | **Description** | **Required** |
| --- | --- | --- |
| ip | IP Address to search on. | Required |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Instances.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Instances.creationTimestamp | string | Creation timestamp in RFC3339 text format. |
| GoogleCloudCompute.Instances.name | string | The name of the resource, provided by the client when initially creating the resource. The resource name must be 1\-63 characters long, and comply with RFC1035. Specifically, the name must be 1\-63 characters long and match the regular expression \[a\-z\]\(\[\-a\-z0\-9\]\*\[a\-z0\-9\]\)? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| GoogleCloudCompute.Instances.description | string | An optional description of this resource. Provide this property when you create the resource. |
| GoogleCloudCompute.Instances.tags | string | Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the tags.items field. |
| GoogleCloudCompute.Instances.tags.items | string | An array of tags. Each tag must be 1\-63 characters long, and comply with RFC1035. |
| GoogleCloudCompute.Instances.tags.fingerprint | string | Specifies 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.machineType | string | Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine\-type. This is provided by the client when the instance is created. |
| GoogleCloudCompute.Instances.status | string | The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED. |
| GoogleCloudCompute.Instances.statusMessage | string | An optional, human\-readable explanation of the status. |
| GoogleCloudCompute.Instances.zone | string | URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. |
| GoogleCloudCompute.Instances.canIpForward | boolean | Allows this instance to send and receive packets with non\-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding. |
| GoogleCloudCompute.Instances.networkInterfaces | string | An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance. |
| GoogleCloudCompute.Instances.networkInterfaces.network | string | URL 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.subnetwork | string | The 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.networkIP | string | An 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.name | string |  The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs | string | An 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.type | string | The type of configuration. The default and only option is ONE\_TO\_ONE\_NAT. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.name | string | The 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.natIP | string | An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.setPublicPtr | boolean | Specifies 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.publicPtrDomainName | string | The DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.networkTier | string | This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. |
| GoogleCloudCompute.Instances.networkInterfaces.accessConfigs.kind | string | Type of the resource. Always compute\#accessConfig for access configs. |
| GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges | string | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet\-mode networks. |
| GoogleCloudCompute.Instances.networkInterfaces.aliasIpRanges.ipCidrRange | string | The 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.subnetworkRangeName | string | Optional 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.fingerprint | string | Fingerprint 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.kind | string | Type of the resource. Always compute\#networkInterface for network interfaces. |
| GoogleCloudCompute.Instances.disks | string | Array of disks associated with this instance. Persistent disks must be created before you can assign them. |
| GoogleCloudCompute.Instances.disks.type | string | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. |
| GoogleCloudCompute.Instances.disks.mode | string | The mode in which to attach this disk, either READ\_WRITE or READ\_ONLY. If not specified, the default is to attach the disk in READ\_WRITE mode. |
| GoogleCloudCompute.Instances.disks.source | string | Specifies 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.deviceName | string | Specifies a unique device name of your choice that is reflected into the /dev/disk/by\-id/google\-\* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
| GoogleCloudCompute.Instances.disks.index | number | A 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.boot | boolean | Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| GoogleCloudCompute.Instances.disks.initializeParams | string | Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| GoogleCloudCompute.Instances.disks.initializeParams.diskName | string | Specifies 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.sourceImage | string | The 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.diskSizeGb | string | Specifies the size of the disk in base\-2 GB. |
| GoogleCloudCompute.Instances.disks.initializeParams.diskType | string | Specifies 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.sourceImageEncryptionKey | string | The 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.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Instances.disks.initializeParams.sourceImageEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS.  |
| GoogleCloudCompute.Instances.disks.initializeParams.labels | string | Labels 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.key | string | The disk label key. |
| GoogleCloudCompute.Instances.disks.initializeParams.labels.value | string | The disk label value. |
| GoogleCloudCompute.Instances.disks.initializeParams.description | string | An optional description. Provide this property when creating the disk. |
| GoogleCloudCompute.Instances.disks.autoDelete | boolean | Specifies 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.licenses | string |  Any valid publicly visible licenses. |
| GoogleCloudCompute.Instances.disks.interface | string | Specifies 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.guestOsFeatures | string | A 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.type | string | The ID of a supported feature. Read Enabling guest operating system features to see a list of available options. |
| GoogleCloudCompute.Instances.disks.diskEncryptionKey | string | Encrypts or decrypts a disk using a customer\-supplied encryption key. |
| GoogleCloudCompute.Instances.disks.diskEncryptionKey.rawKey | string | Specifies a 256\-bit customer\-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| GoogleCloudCompute.Instances.disks.diskEncryptionKey.kmsKeyName | string | The name of the encryption key that is stored in Google Cloud KMS. |
| GoogleCloudCompute.Instances.disks.diskEncryptionKey.sha256 | string | The RFC 4648 base64 encoded SHA\-256 hash of the customer\-supplied encryption key that protects this resource. |
| GoogleCloudCompute.Instances.disks.kind | string | Type of the resource. Always compute\#attachedDisk for attached disks. |
| GoogleCloudCompute.Instances.metadata | string | The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. |
| GoogleCloudCompute.Instances.metadata.fingerprint | string | Specifies 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.items | string | Array of key/value pairs. The total size of all keys and values must be less than 512 KB. |
| GoogleCloudCompute.Instances.metadata.items.key | string | Key for the metadata entry. Keys must conform to the following regexp: \[a\-zA\-Z0\-9\-\_\]\+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. |
| GoogleCloudCompute.Instances.metadata.items.value | string | Value for the metadata entry. These are free\-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 42 bytes \(256 KiB\). |
| GoogleCloudCompute.Instances.metadata.kind | string | Type of the resource. Always compute\#metadata for metadata. |
| GoogleCloudCompute.Instances.serviceAccounts | string | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. |
| GoogleCloudCompute.Instances.serviceAccounts.email | string | Email address of the service account. |
| GoogleCloudCompute.Instances.serviceAccounts.scopes | string | The list of scopes to be made available for this service account |
| GoogleCloudCompute.Instances.selfLink | string | Server\-defined URL for this resource. |
| GoogleCloudCompute.Instances.scheduling | string | Sets the scheduling options for this instance. |
| GoogleCloudCompute.Instances.scheduling.onHostMaintenance | string | Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. |
| GoogleCloudCompute.Instances.scheduling.automaticRestart | boolean | Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine \(not terminated by a user\). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| GoogleCloudCompute.Instances.scheduling.preemptible | boolean | Defines 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.nodeAffinities | string | A set of node affinity and anti\-affinity. |
| GoogleCloudCompute.Instances.scheduling.nodeAffinities.key | string | Corresponds to the label key of Node resource. |
| GoogleCloudCompute.Instances.scheduling.nodeAffinities.operator | string | Defines the operation of node selection. |
| GoogleCloudCompute.Instances.scheduling.nodeAffinities.values | string | Corresponds to the label values of Node resource. |
| GoogleCloudCompute.Instances.cpuPlatform | string | The CPU platform used by this instance. |
| GoogleCloudCompute.Instances.labels | string | Labels to apply to this instance. These can be later modified by the setLabels method. |
| GoogleCloudCompute.Instances.labels.key | string | The label key. |
| GoogleCloudCompute.Instances.labels.value | string | The label value. |
| GoogleCloudCompute.Instances.labelFingerprint | string | A 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.minCpuPlatform | string | Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;. |
| GoogleCloudCompute.Instances.guestAccelerators | string | A list of the type and count of accelerator cards attached to the instance. |
| GoogleCloudCompute.Instances.guestAccelerators.acceleratorType | string | Full 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.acceleratorCount | string | The number of the guest accelerator cards exposed to this instance. |
| GoogleCloudCompute.Instances.startRestricted | boolean | Whether a VM has been restricted for start because Compute Engine has detected suspicious activity. |
| GoogleCloudCompute.Instances.deletionProtection | boolean | Whether the resource should be protected against deletion. |
| GoogleCloudCompute.Instances.hostname | string | Hostname |
| GoogleCloudCompute.Instances.kind | string | \] 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

|id|machineType|name|zone|
|---|---|---|---|
| 42 | machineType | test01 | https://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 Name** | **Description** | **Required** |
| --- | --- | --- |
| instance | Name of the instance scoping this request. | Required |
| zone | The name of the zone for this request. | Required |
| tag | Network tag to add.  Tag must be unique, 1-63 characters long, and comply with RFC1035. | Required |
| project_id | Project ID that you want to run this command on. | Optional |

##### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GoogleCloudCompute.Operations.id | string | The unique identifier for the resource. This identifier is defined by the server. |
| GoogleCloudCompute.Operations.name | string | Name of the resource. |
| GoogleCloudCompute.Operations.zone | string | The 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.clientOperationId | string | The value of requestId if you provided it in the request. Not present otherwise. |
| GoogleCloudCompute.Operations.operationType | string | The type of operation, such as insert, update, or delete, and so on. |
| GoogleCloudCompute.Operations.targetLink | string | The 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.targetId | string | The unique target ID, which identifies a specific incarnation of the target resource |
| GoogleCloudCompute.Operations.status | string | The status of the operation, which can be one of the following: PENDING RUNNING or DONE |
| GoogleCloudCompute.Operations.statusMessage | string | An optional textual description of the current status of the operation. |
| GoogleCloudCompute.Operations.user | string | User who requested the operation for example EMAILADDRESS. |
| GoogleCloudCompute.Operations.progress | number | An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. |
| GoogleCloudCompute.Operations.insertTime | string | The time that this operation was requested. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.startTime | string | The time that this operation was started by the server. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.endTime | string | The time that this operation was completed. This value is in RFC3339 text format. |
| GoogleCloudCompute.Operations.error | string | If errors are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.error.errors | string | The array of errors encountered while processing this operation. |
| GoogleCloudCompute.Operations.error.errors.code | string | The error type identifier for this error. |
| GoogleCloudCompute.Operations.error.errors.location | string | Indicates the field in the request that caused the error. This property is optional. |
| GoogleCloudCompute.Operations.error.errors.message | string | An optional, human\-readable error message. |
| GoogleCloudCompute.Operations.warnings | string | If warning messages are generated during processing of the operation, this field will be populated. |
| GoogleCloudCompute.Operations.warnings.code | string | A warning code, if applicable. For example, Compute Engine returns NO\_RESULTS\_ON\_PAGE if there are no results in the response. |
| GoogleCloudCompute.Operations.warnings.message | string | A human\-readable description of the warning code. |
| GoogleCloudCompute.Operations.warnings.data | string | Metadata about this warning in key: value format. |
| GoogleCloudCompute.Operations.warnings.data.key | string | A 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.value | string | A warning data value corresponding to the key. |
| GoogleCloudCompute.Operations.httpErrorStatusCode | number | If 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.httpErrorMessage | string | If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
| GoogleCloudCompute.Operations.selfLink | string | Server\-defined URL for the resource. |
| GoogleCloudCompute.Operations.region | string | The 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.description | string | A textual description of the operation, which is set when the operation is created. |
| GoogleCloudCompute.Operations.kind | string | Type 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

id kind name operationType progress status
42 compute#operation mock-operation setTags 0 RUNNING

Configuration parameters

  • service — Service Account Private Key file contents (JSON)
  • credentials_service_account_json
  • proxy — Use system proxy settings
  • default_search_scope — Default Search Scope

Commands (83)

  • gcp-compute-add-network-tag

    Add network tag for the specified instance.

  • gcp-compute-aggregated-list-addresses

    Retrieves an aggregated list of addresses.

  • gcp-compute-aggregated-list-disk-types

    Retrieves an aggregated list of disk types.

  • gcp-compute-aggregated-list-disks

    Retrieves an aggregated list of persistent disks.

  • gcp-compute-aggregated-list-instance-groups

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

  • gcp-compute-aggregated-list-instances

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

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

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

  • gcp-compute-aggregated-list-machine-types

    Retrieves an aggregated list of machine types.

  • gcp-compute-create-disk-snapshot

    Creates a snapshot of a specified persistent disk.

  • gcp-compute-delete-address

    Deletes the specified address resource.

  • 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.

  • gcp-compute-delete-firewall

    Deletes the specified firewall.

  • gcp-compute-delete-global-address

    Deletes the specified address resource.

  • gcp-compute-delete-global-operation

    Deletes the specified Operations resource.

  • gcp-compute-delete-image

    Deletes the specified image.

  • gcp-compute-delete-instance

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

  • 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.

  • gcp-compute-delete-network

    Deletes the specified network.

  • gcp-compute-delete-region-operation

    Deletes the specified region-specific Operations resource.

  • 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.

  • gcp-compute-delete-zone-operation

    Deletes the specified zone-specific Operations resource.

  • gcp-compute-get-address

    Returns the specified address resource.

  • gcp-compute-get-disk

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

  • gcp-compute-get-disk-type

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

  • gcp-compute-get-firewall

    Returns the specified firewall.

  • gcp-compute-get-global-address

    Deletes the specified address resource.

  • gcp-compute-get-global-operation

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

  • gcp-compute-get-image

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

  • gcp-compute-get-image-from-family

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

  • gcp-compute-get-instance

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

  • gcp-compute-get-instance-group

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

  • gcp-compute-get-machine-type

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

  • gcp-compute-get-network

    Returns the specified network.

  • gcp-compute-get-region

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

  • gcp-compute-get-region-operation

    Retrieves the specified region-specific Operations resource.

  • gcp-compute-get-snapshot

    Returns the specified Snapshot resource.

  • gcp-compute-get-zone

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

  • gcp-compute-get-zone-operation

    Retrieves the specified zone-specific Operations resource.

  • gcp-compute-insert-address

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

  • 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.

  • gcp-compute-insert-firewall

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

  • gcp-compute-insert-global-address

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

  • gcp-compute-insert-image

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

  • gcp-compute-insert-instance

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

  • gcp-compute-insert-instance-group

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

  • gcp-compute-insert-network

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

  • 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.

  • 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.

  • gcp-compute-list-addresses

    Retrieves a list of addresses contained within the specified region.

  • gcp-compute-list-disk-types

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

  • gcp-compute-list-disks

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

  • gcp-compute-list-firewall

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

  • gcp-compute-list-global-addresses

    Retrieves a list of global addresses.

  • gcp-compute-list-global-operation

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

  • 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.

  • gcp-compute-list-instance-group-instances

    Lists the instances in the specified instance group.

  • gcp-compute-list-instance-groups

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

  • gcp-compute-list-instances

    Retrieves the list of instances contained within the specified zone.

  • gcp-compute-list-machine-types

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

  • gcp-compute-list-networks

    Retrieves the list of networks available to the specified project.

  • gcp-compute-list-region-operation

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

  • gcp-compute-list-regions

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

  • gcp-compute-list-snapshots

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

  • gcp-compute-list-zone-operation

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

  • gcp-compute-list-zones

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

  • gcp-compute-networks-add-peering

    Adds a peering to the specified network.

  • gcp-compute-networks-remove-peering

    Removes a peering from the specified network.

  • gcp-compute-patch-firewall

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

  • gcp-compute-project-info-add-metadata

    Add or update project wide metadata.

  • 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.

  • gcp-compute-resize-disk

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

  • gcp-compute-set-disk-labels

    Sets the labels on a disk.

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

    Sets the named ports for the specified instance group.

  • gcp-compute-set-image-labels

    Sets the labels on an image.

  • gcp-compute-set-instance-labels

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

  • gcp-compute-set-instance-machine-type

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

  • gcp-compute-set-instance-metadata

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

  • gcp-compute-set-snapshot-labels

    Sets the labels on a snapshot.

  • gcp-compute-start-instance

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

  • 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.

  • gcp-compute-wait-for-global-operation

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

  • gcp-compute-wait-for-region-operation

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

  • gcp-compute-wait-for-zone-operation

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

import demistomock as demisto  # noqa: F401
from CommonServerPython import *  # noqa: F401

""" IMPORTS """

import json
import time

from google.oauth2 import service_account
from googleapiclient import discovery

# disable weak-typing warnings by pylint.
# See: https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/iam/api-client/quickstart.py#L36
# pylint: disable=no-member

""" GLOBALS/PARAMS """

# Params for assembling object of the Service Account Credentials File Contents
SERVICE_ACCOUNT_FILE = demisto.params().get("credentials_service_account_json", {}).get("password") or demisto.params().get(
    "service"
)
SERVICE_ACT_PROJECT_ID = None

# Params for constructing googleapiclient service object
API_VERSION = "v1"
GSERVICE = "compute"
ASSET_SERVICE = "cloudasset"
SCOPE = ["https://www.googleapis.com/auth/cloud-platform"]
COMPUTE = None  # variable set by build_and_authenticate() function
ASSET = None  # variable set by build_and_authenticate() function

"""
HELPER FUNCTIONS
"""


def get_compute():
    """
    Gets an initialized instance of COMPUTE
    """
    if not COMPUTE:
        return build_and_authenticate(GSERVICE)
    return COMPUTE


def get_asset():
    """
    Gets an initialized instance of ASSET
    """
    if not ASSET:
        return build_and_authenticate(ASSET_SERVICE)
    return ASSET


def parse_resource_ids(resource_id):
    """
    Split the resource ids to a list
    parameter: (string) resource_id
    Return the resource_ids as a list
    """
    id_list = resource_id.replace(" ", "")
    resource_ids = id_list.split(",")
    return resource_ids


def parse_firewall_rule(rule_str):
    """
    Transforms a string of multiple inputes to a dictionary list
    parameter: (string) rules
        A firewall rule in the specified project
    Return firewall rules as dictionary list
    """
    rules = []
    regex = re.compile(r"ipprotocol=([\w\d_:.-]+),ports=([ /\w\d@_,.\*-]+)", flags=re.I)
    for f in rule_str.split(";"):
        match = regex.match(f)
        if match is None:
            raise ValueError(
                f"Could not parse field: {f}. Please make sure you provided like so: "
                "ipprotocol=abc,ports=123;ipprotocol=fed,ports=456"
            )

        rules.append({"IPProtocol": match.group(1), "ports": match.group(2).split(",")})

    return rules


def parse_metadata_items(tags_str):
    """
    Transforms a string of multiple inputes to a dictionary list
    parameter: (string) metadata_items

    Return metadata items as a dictionary list
    """
    tags = []
    regex = re.compile(r"key=([\w\d_:.-]+),value=([ /\w\d@_,.\*-]+)", flags=re.I)
    for f in tags_str.split(";"):
        match = regex.match(f)
        if match is None:
            raise ValueError(
                f"Could not parse field: {f}. Please make sure you provided like so: key=abc,value=123;key=fed,value=456"
            )

        tags.append({"key": match.group(1), "value": match.group(2)})

    return tags


def parse_named_ports(tags_str):
    """
    Transforms a string of multiple inputes to a dictionary list
    parameter: (string) namedPorts

    Return named ports as a dictionary list
    """
    tags = []
    regex = re.compile(r"name=([\w\d_:.-]+),port=([ /\w\d@_,.\*-]+)", flags=re.I)
    for f in tags_str.split(";"):
        match = regex.match(f)
        if match is None:
            raise ValueError(
                f"Could not parse field: {f}. Please make sure you provided like so: name=abc,port=123;name=fed,port=456"
            )

        tags.append({"name": match.group(1).lower(), "port": match.group(2)})

    return tags


def parse_labels(tags_str):
    """
    Transforms a string of multiple inputes to a dictionary list
    parameter: (string) labels

    Return labels as a dictionary list
    """
    tags = {}
    regex = re.compile(r"key=([\w\d_:.-]+),value=([ /\w\d@_,.\*-]+)", flags=re.I)
    for f in tags_str.split(";"):
        match = regex.match(f)
        if match is None:
            raise ValueError(
                f"Could not parse field: {f}. Please make sure you provided like so: key=abc,value=123;key=def,value=456"
            )

        tags.update({match.group(1).lower(): match.group(2).lower()})

    return tags


def build_and_authenticate(googleservice):
    """
    Return a service object via which can call GRM API.

    Use the service_account credential file generated in the Google Cloud
    Platform to build the Google Resource Manager API Service object.

    returns: service
        Google Resource Manager API Service object via which commands in the
        integration will make API calls
    """

    global SERVICE_ACT_PROJECT_ID, COMPUTE, ASSET
    auth_json_string = str(SERVICE_ACCOUNT_FILE).replace("'", '"').replace("\\\\", "\\")
    service_account_info = json.loads(auth_json_string)
    SERVICE_ACT_PROJECT_ID = service_account_info.get("project_id")
    service_credentials = service_account.Credentials.from_service_account_info(service_account_info, scopes=SCOPE)
    if googleservice == "compute":
        COMPUTE = discovery.build(googleservice, API_VERSION, credentials=service_credentials)
        return COMPUTE
    elif googleservice == "cloudasset":
        ASSET = discovery.build(googleservice, API_VERSION, credentials=service_credentials)
        return ASSET
    return None


def wait_for_zone_operation(args):
    """
    This command will block until an operation has been marked as complete.

    parameter: (string) zone
        Name of the zone for this request.
    parameter: (string) name
        Name of the operations resource.
    """
    project = SERVICE_ACT_PROJECT_ID
    zone = args.get("zone")
    name = args.get("name")
    while True:
        result = get_compute().zoneOperations().get(project=project, zone=zone, operation=name).execute()
        if result.get("status") == "DONE":
            if "error" in result:
                raise Exception(result["error"])
            operation = result
            data_res = {
                "status": operation.get("status"),
                "kind": operation.get("kind"),
                "name": operation.get("name"),
                "id": operation.get("id"),
                "progress": operation.get("progress"),
                "startTime": operation.get("startTime"),
                "operationType": operation.get("operationType"),
            }
            ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": operation}
            return_outputs(
                tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True)
                if data_res
                else "No results were found",
                ec,
            )
            break

        time.sleep(2)


def wait_for_region_operation(args):
    """
    This command will block until an operation has been marked as complete.

    parameter: (string) region
        Name of the region for this request.
    parameter: (string) name
        Name of the operations resource.
    """
    project = SERVICE_ACT_PROJECT_ID
    region = args.get("region")
    name = args.get("name")
    while True:
        result = get_compute().regionOperations().get(project=project, region=region, operation=name).execute()
        if result.get("status") == "DONE":
            if "error" in result:
                raise Exception(result["error"])
            operation = result
            data_res = {
                "status": operation.get("status"),
                "kind": operation.get("kind"),
                "name": operation.get("name"),
                "id": operation.get("id"),
                "progress": operation.get("progress"),
                "startTime": operation.get("startTime"),
                "operationType": operation.get("operationType"),
            }
            ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": operation}
            return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec)
            break

        time.sleep(2)


def wait_for_global_operation(args):
    """
    This command will block until an operation has been marked as complete.

    parameter: (string) name
        Name of the operations resource.
    """
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")
    while True:
        result = get_compute().globalOperations().get(project=project, operation=name).execute()
        if result.get("status") == "DONE":
            if "error" in result:
                raise Exception(result["error"])

            operation = result
            data_res = {
                "status": operation.get("status"),
                "kind": operation.get("kind"),
                "name": operation.get("name"),
                "id": operation.get("id"),
                "progress": operation.get("progress"),
                "startTime": operation.get("startTime"),
                "operationType": operation.get("operationType"),
            }
            ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": operation}

            return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec)
            break

        time.sleep(2)


def test_module():
    build_and_authenticate(GSERVICE)
    demisto.results("ok")


# instances()
def create_instance(args):
    """
    Creates an instance resource in the specified project using the data included in the request.
    parameter: (string) name
    parameter: (string) description
    parameter: (boolean) canIpForward (true/false)
    parameter: (list) tags
    parameter: (string) tagsFingerprint
    parameter: (string) zone
    parameter: (string) machine_type
    parameter: (string) network
    parameter: (string) sub_network
    parameter: (string) networkIP
    parameter: (string) networkInterfacesfingerprint
    parameter: (boolean) externalInternetAccess (true/false)
    parameter: (string) externalNatIP
    parameter: (boolean) setPublicPtr (true/false)
    parameter: (string) publicPtrDomainName
    parameter: (string) networkTier (PREMIUM,STANDARD)
    parameter: (string) ipCidrRange
    parameter: (string) subnetworkRangeName
    parameter: (string) diskType (PERSISTENT,SCRATCH)
    parameter: (string) diskMode (READ_WRITE,READ_ONLY)
    parameter: (string) diskSource
    parameter: (string) diskDeviceName
    parameter: (boolean) diskBoot (true/false)
    parameter: (string) initializeParamsDiskName
    parameter: (string) initializeParamsSourceImage
    parameter: (int) initializeParamsdiskSizeGb
    parameter: (string) initializeParamsDiskType
    parameter: (string) initializeParamsSourceImageEncryptionKeyRawKey
    parameter: (string) initializeParamsSourceImageEncryptionKeykmsKeyName
    parameter: (string) initializeParamsDiskLabels
    parameter: (string) initializeParamsDiskDescription
    parameter: (boolean) diskAutodelete (true/false)
    parameter: (string) diskInterface (SCSI,NVME)
    parameter: (list) diskGuestOsFeatures
    parameter: (string) diskEncryptionKeyRawKey
    parameter: (string) diskEncryptionKeyKmsKeyName
    parameter: (dict) metadataItems
    parameter: (string) serviceAccountEmail
    parameter: (list) serviceAccountscopes
    parameter: (string) schedulingOnHostMaintenance (MIGRATE,TERMINATE)
    parameter: (boolean) schedulingAutomaticRestart (true/false)
    parameter: (boolean) schedulingPreemptible (true/false)
    parameter: (dict) labels
    parameter: (string) labelFingerprint
    parameter: (string) minCpuPlatform
    parameter: (string) guestAcceleratorsAcceleratorType
    parameter: (integer) guestAcceleratorsAcceleratorCount
    parameter: (boolean) deletionProtection (true/false)

    Return the created instance to the war room
    """
    config = {}
    if args.get("name"):
        name = args.get("name", "")
        name = name.lower()
        config.update({"name": name})

    if args.get("description"):
        description = args.get("description")
        config.update({"description": description})

    if args.get("tags"):
        tags = args.get("tags")
        if "tags" not in config:
            config.update({"tags": [{}]})
        config["tags"][0].update({"items": parse_resource_ids(tags)})

    if args.get("canIpForward"):
        can_ip_forward = args.get("canIpForward") == "true"
        config.update({"canIpForward": can_ip_forward})

    if args.get("tagsFingerprint"):
        tags_fingerprint = args.get("tagsFingerprint")
        if "tags" not in config:
            config.update({"tags": [{}]})
        config["tags"][0].update({"fingerprint": tags_fingerprint})

    zone = args.get("zone")
    machine_type = args.get("machine_type")

    zone_machine_type = "zones/" + zone + "/machineTypes/" + machine_type
    config.update({"machineType": zone_machine_type})

    if args.get("network"):
        network = args.get("network")
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        config["networkInterfaces"][0].update({"network": network})

    if args.get("subnetwork"):
        sub_network = args.get("subnetwork")
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        config["networkInterfaces"][0].update({"subnetwork": sub_network})

    if args.get("networkIP"):
        network_ip = args.get("networkIP")
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        config["networkInterfaces"][0].update({"networkIP": network_ip})

    if args.get("networkInterfacesfingerprint"):
        network_interfaces_fingerprint = args.get("networkInterfacesfingerprint")
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        config["networkInterfaces"][0].update({"fingerprint": network_interfaces_fingerprint})

    if args.get("externalInternetAccess"):
        external_network = args.get("externalInternetAccess") == "true"
        if external_network:
            if "networkInterfaces" not in config:
                config.update({"networkInterfaces": [{}]})
            if "accessConfigs" not in config["networkInterfaces"][0]:
                config["networkInterfaces"][0].update({"accessConfigs": [{}]})
            config["networkInterfaces"][0]["accessConfigs"][0].update({"type": "ONE_TO_ONE_NAT", "name": "External NAT"})

    if args.get("externalNatIP"):
        nat_ip = args.get("externalNatIP")
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        if "accessConfigs" not in config["networkInterfaces"][0]:
            config["networkInterfaces"][0].update({"accessConfigs": [{}]})

        config["networkInterfaces"][0]["accessConfigs"][0].update({"natIP": nat_ip})

    if args.get("setPublicPtr"):
        set_public_ptr = args.get("setPublicPtr") == "true"
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        if "accessConfigs" not in config["networkInterfaces"][0]:
            config["networkInterfaces"][0].update({"accessConfigs": [{}]})

        config["networkInterfaces"][0]["accessConfigs"][0].update({"setPublicPtr": set_public_ptr})

    if args.get("publicPtrDomainName"):
        public_ptr_domain_name = args.get("setPublicPtr")
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        if "accessConfigs" not in config["networkInterfaces"][0]:
            config["networkInterfaces"][0].update({"accessConfigs": [{}]})

        config["networkInterfaces"][0]["accessConfigs"][0].update({"publicPtrDomainName": public_ptr_domain_name})

    if args.get("networkTier"):
        network_tier = args.get("networkTier")
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        if "accessConfigs" not in config["networkInterfaces"][0]:
            config["networkInterfaces"][0].update({"accessConfigs": [{}]})

        config["networkInterfaces"][0]["accessConfigs"][0].update({"networkTier": network_tier})

    if args.get("ipCidrRange"):
        ip_cidr_range = args.get("ipCidrRange")
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        if "aliasIpRanges" not in config["networkInterfaces"][0]:
            config["networkInterfaces"][0].update({"aliasIpRanges": [{}]})

        config["networkInterfaces"][0]["aliasIpRanges"][0].update({"ipCidrRange": ip_cidr_range})

    if args.get("subnetworkRangeName"):
        subnet_work_range_name = args.get("subnetworkRangeName")
        if "networkInterfaces" not in config:
            config.update({"networkInterfaces": [{}]})
        if "aliasIpRanges" not in config["networkInterfaces"][0]:
            config["networkInterfaces"][0].update({"aliasIpRanges": [{}]})

        config["networkInterfaces"][0]["aliasIpRanges"][0].update({"subnetworkRangeName": subnet_work_range_name})

    if args.get("diskType"):
        disk_type = args.get("diskType")
        if "disks" not in config:
            config.update({"disks": [{}]})
        config["disks"][0].update({"type": disk_type})

    if args.get("diskMode"):
        disk_mode = args.get("diskMode")
        if "disks" not in config:
            config.update({"disks": [{}]})
        config["disks"][0].update({"mode": disk_mode})

    if args.get("diskSource"):
        disk_source = args.get("diskSource")
        if "disks" not in config:
            config.update({"disks": [{}]})
        config["disks"][0].update({"source": disk_source})

    if args.get("diskDeviceName"):
        disk_device_name = args.get("diskDeviceName")
        if "disks" not in config:
            config.update({"disks": [{}]})
        config["disks"][0].update({"deviceName": disk_device_name})

    if args.get("diskBoot") is not None:
        disk_boot = args.get("diskBoot") == "true"
        if "disks" not in config:
            config.update({"disks": [{}]})
        config["disks"][0].update({"boot": disk_boot})

    if args.get("initializeParamsDiskName"):
        initialize_params_disk_name = args.get("initializeParamsDiskName")
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "initializeParams" not in config["disks"][0]:
            config["disks"][0].update({"initializeParams": {}})
        config["disks"][0]["initializeParams"].update({"diskName": initialize_params_disk_name})

    if args.get("initializeParamsSourceImage"):
        image = args.get("initializeParamsSourceImage")
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "initializeParams" not in config["disks"][0]:
            config["disks"][0].update({"initializeParams": {}})
        config["disks"][0]["initializeParams"].update({"sourceImage": image})

    if args.get("initializeParamsdiskSizeGb"):
        initialize_params_disk_size_gb = args.get("initializeParamsdiskSizeGb")
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "initializeParams" not in config["disks"][0]:
            config["disks"][0].update({"initializeParams": {}})
        config["disks"][0]["initializeParams"].update({"diskSizeGb": int(initialize_params_disk_size_gb)})

    if args.get("initializeParamsDiskType"):
        initialize_params_disk_type = args.get("initializeParamsDiskType")
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "initializeParams" not in config["disks"][0]:
            config["disks"][0].update({"initializeParams": {}})
        config["disks"][0]["initializeParams"].update({"diskType": initialize_params_disk_type})

    if args.get("initializeParamsSourceImageEncryptionKeyRawKey"):
        initialize_params_source_image_encryption_key_raw_key = args.get("initializeParamsSourceImageEncryptionKeyRawKey")
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "initializeParams" not in config["disks"][0]:
            config["disks"][0].update({"initializeParams": {}})
        if "sourceImageEncryptionKey" not in config["disks"][0]["initializeParams"]:
            config["disks"][0]["initializeParams"].update({"sourceImageEncryptionKey": {}})
        config["disks"][0]["initializeParams"]["sourceImageEncryptionKey"].update(
            {"rawKey": initialize_params_source_image_encryption_key_raw_key}
        )

    if args.get("initializeParamsSourceImageEncryptionKeykmsKeyName"):
        initialize_params_source_image_encryption_key_kms_key_name = args.get(
            "initializeParamsSourceImageEncryptionKeykmsKeyName"
        )
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "initializeParams" not in config["disks"][0]:
            config["disks"][0].update({"initializeParams": {}})
        if "sourceImageEncryptionKey" not in config["disks"][0]["initializeParams"]:
            config["disks"][0]["initializeParams"].update({"sourceImageEncryptionKey": {}})
        config["disks"][0]["initializeParams"]["sourceImageEncryptionKey"].update(
            {"kmsKeyName": initialize_params_source_image_encryption_key_kms_key_name}
        )

    if args.get("initializeParamsDiskLabels"):
        initialize_params_disk_labels = args.get("initializeParamsDiskLabels")
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "initializeParams" not in config["disks"][0]:
            config["disks"][0].update({"initializeParams": {}})
        config["disks"][0]["initializeParams"].update({"labels": parse_labels(initialize_params_disk_labels)})

    if args.get("initializeParamsDiskDescription"):
        initialize_params_disk_description = args.get("initializeParamsDiskDescription")
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "initializeParams" not in config["disks"][0]:
            config["disks"][0].update({"initializeParams": {}})
        config["disks"][0]["initializeParams"].update({"description": initialize_params_disk_description})

    if args.get("diskAutodelete"):
        disk_auto_delete = args.get("diskAutodelete") == "true"
        if "disks" not in config:
            config.update({"disks": [{}]})
        config["disks"][0].update({"autoDelete": disk_auto_delete})

    if args.get("diskInterface"):
        disk_interface = args.get("diskInterface")
        if "disks" not in config:
            config.update({"disks": [{}]})
        config["disks"][0].update({"interface": disk_interface})

    if args.get("diskGuestOsFeatures"):
        disk_guest_os_features = args.get("diskGuestOsFeatures")
        disk_guest_os_features = parse_resource_ids(disk_guest_os_features)
        if "disks" not in config:
            config.update({"disks": [{}]})
        config["disks"][0].update({"guestOsFeatures": []})
        for f in disk_guest_os_features:
            config["disks"][0]["guestOsFeatures"].append({"type": f})

    if args.get("diskEncryptionKeyRawKey"):
        disk_encryption_key_raw_key = args.get("diskEncryptionKeyRawKey")
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "diskEncryptionKey" not in config["disks"][0]:
            config["disks"][0].update({"diskEncryptionKey": {}})
        config["disks"][0]["diskEncryptionKey"].update({"rawKey": disk_encryption_key_raw_key})

    if args.get("diskEncryptionKeyKmsKeyName"):
        disk_encryption_key_kms_key_name = args.get("diskEncryptionKeyKmsKeyName")
        if "disks" not in config:
            config.update({"disks": [{}]})
        if "diskEncryptionKey" not in config["disks"][0]:
            config["disks"][0].update({"diskEncryptionKey": {}})
        config["disks"][0]["diskEncryptionKey"].update({"kmsKeyName": disk_encryption_key_kms_key_name})

    meta_data = {}
    if args.get("metadataItems"):
        meta_data.update({"items": parse_metadata_items(args.get("metadataItems"))})
        config.update({"metadata": meta_data})

    service_accounts = {}  # type: dict
    if args.get("serviceAccountEmail") is not None and args.get("serviceAccountscopes") is not None:
        service_accounts = {
            "serviceAccounts": [
                {
                    "email": args.get("serviceAccountEmail"),
                    "scopes": parse_resource_ids(args.get("serviceAccountscopes")),
                }
            ]
        }
        config.update({"serviceAccounts": service_accounts})

    if args.get("schedulingOnHostMaintenance"):
        scheduling_on_host_maintenance = args.get("schedulingOnHostMaintenance")
        if "scheduling" not in config:
            config.update({"scheduling": {}})
        config["scheduling"].update({"onHostMaintenance": scheduling_on_host_maintenance})

    if args.get("schedulingAutomaticRestart"):
        scheduling_automatic_restart = args.get("schedulingAutomaticRestart") == "true"
        if "scheduling" not in config:
            config.update({"scheduling": {}})
        config["scheduling"].update({"automaticRestart": scheduling_automatic_restart})

    if args.get("schedulingPreemptible"):
        scheduling_preemptible = args.get("schedulingPreemptible") == "true"
        if "scheduling" not in config:
            config.update({"scheduling": {}})
        config["scheduling"].update({"preemptible": scheduling_preemptible})

    if args.get("labels"):
        labels = args.get("labels")
        config.update({"labels": parse_labels(labels)})

    if args.get("labelFingerprint"):
        label_fingerprint = args.get("labelFingerprint")
        config.update({"labelFingerprint": label_fingerprint})

    if args.get("minCpuPlatform"):
        min_cpu_platform = args.get("minCpuPlatform")
        config.update({"minCpuPlatform": min_cpu_platform})

    if args.get("guestAcceleratorsAcceleratorType"):
        guest_accelerators_accelerator_type = args.get("guestAcceleratorsAcceleratorType")
        if "guestAccelerators" not in config:
            config.update({"guestAccelerators": [{}]})
        config["guestAccelerators"][0].update({"acceleratorType": guest_accelerators_accelerator_type})

    if args.get("guestAcceleratorsAcceleratorCount"):
        guest_accelerators_accelerator_count = args.get("guestAcceleratorsAcceleratorCount")
        if "guestAccelerators" not in config:
            config.update({"guestAccelerators": [{}]})
        config["guestAccelerators"][0].update({"acceleratorCount": int(guest_accelerators_accelerator_count)})

    if args.get("deletionProtection"):
        deletion_protection = args.get("deletionProtection") == "true"
        config.update({"deletionProtection": deletion_protection})

    project = SERVICE_ACT_PROJECT_ID

    operation = get_compute().instances().insert(project=project, zone=zone, body=config).execute()

    data_res = {
        "status": operation.get("status"),
        "kind": operation.get("kind"),
        "name": operation.get("name"),
        "id": operation.get("id"),
        "progress": operation.get("progress"),
        "startTime": operation.get("startTime"),
        "operationType": operation.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": operation}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        operation,
    )


def list_instances(args):
    """
    Retrieves the list of instances contained within the specified zone.

    parameter: (string) zone
        Name of the zone for request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (string) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name
    """
    project = SERVICE_ACT_PROJECT_ID
    zone = args.get("zone")
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    request = (
        get_compute()
        .instances()
        .list(
            project=project,
            zone=zone,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    output = []
    data_res = []
    while request:
        response = request.execute()
        if "items" in response:
            for instance in response["items"]:
                output.append(instance)
                data_res_item = {
                    "id": instance.get("id"),
                    "name": instance.get("name"),
                    "machineType": instance.get("machineType"),
                    "zone": instance.get("zone"),
                }
                data_res.append(data_res_item)

        request = get_compute().instances().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Instances(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Instances", data_res, removeNull=True),
        ec,
        response,
    )


def aggregated_list_instances(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []

    request = (
        get_compute()
        .instances()
        .aggregatedList(
            project=project,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for _name, instances_scoped_list in response["items"].items():
                if "warning" not in instances_scoped_list:
                    for inst in instances_scoped_list.get("instances", []):
                        output.append(inst)
                        data_res_item = {
                            "id": inst.get("id"),
                            "name": inst.get("name"),
                            "machineType": inst.get("machineType"),
                            "zone": inst.get("zone"),
                        }
                        data_res.append(data_res_item)

        request = get_compute().instances().aggregatedList_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Instances(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Instances", data_res, removeNull=True),
        ec,
        response,
    )


def set_instance_metadata(args):
    """
    Sets metadata for the specified instance to the data included in the request.

    parameter: (string) zone
        Name of the zone for request.
    parameter: (string) instance
        Name of the instance scoping this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    zone = args.get("zone")
    instance = args.get("instance")

    meta_data = {}
    if args.get("metadataFingerprint"):
        meta_data.update({"fingerprint": args.get("metadataFingerprint")})
    if args.get("metadataItems"):
        meta_data.update({"items": parse_metadata_items(args.get("metadataItems"))})

    request = get_compute().instances().setMetadata(project=project, zone=zone, instance=instance, body=meta_data)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def get_instance(args):
    """
    Returns the specified Instance resource.

    parameter: (string) zone
        Name of the zone for request.
    parameter: (string) instance
        Name of the instance scoping this request.
    """
    project = args.get("project_id")
    if not project:
        project = SERVICE_ACT_PROJECT_ID

    instance = args.get("instance")
    zone = args.get("zone")

    request = get_compute().instances().get(project=project, zone=zone, instance=instance)
    response = request.execute()
    data_res = {
        "id": response.get("id"),
        "name": response.get("name"),
        "machineType": response.get("machineType"),
        "zone": response.get("zone"),
    }

    ec = {"GoogleCloudCompute.Instances(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Instances", data_res, removeNull=True),
        ec,
        response,
    )


def delete_instance(args):
    """
    Deletes the specified Instance resource

    parameter: (string) zone
        Name of the zone for request.
    parameter: (string) instance
        Name of the instance scoping this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    instance = args.get("instance")
    zone = args.get("zone")

    request = get_compute().instances().delete(project=project, zone=zone, instance=instance)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def start_instance(args):
    """
    Starts an instance that was stopped using the instances().stop method.

    parameter: (string) zone
        Name of the zone for request.
    parameter: (string) instance
        Name of the instance scoping this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    instance = args.get("instance")
    zone = args.get("zone")

    request = get_compute().instances().start(project=project, zone=zone, instance=instance)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def stop_instance(args):
    """
    Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time

    parameter: (string) zone
        Name of the zone for request.
    parameter: (string) instance
        Name of the instance scoping this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    instance = args.get("instance")
    zone = args.get("zone")

    request = get_compute().instances().stop(project=project, zone=zone, instance=instance)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def reset_instance(args):
    """
    Performs a reset on the instance.

    parameter: (string) zone
        Name of the zone for request.
    parameter: (string) instance
        Name of the instance scoping this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    instance = args.get("instance")
    zone = args.get("zone")

    request = get_compute().instances().reset(project=project, zone=zone, instance=instance)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def set_instance_labels(args):
    """
    Sets labels on an instance

    parameter: (string) zone
        Name of the zone for request.
    parameter: (string) instance
        Name of the instance scoping this request.
    parameter: (dict) labels
        An object containing a list of 'key': value pairs
    parameter: (string) labelFingerprint
        Fingerprint of the previous set of labels for this resource.
    """
    project = SERVICE_ACT_PROJECT_ID
    instance = args.get("instance")
    zone = args.get("zone")
    labels = args.get("labels")

    labels = parse_labels(labels)
    body = {"labels": labels}

    if args.get("labelFingerprint"):
        body.update({"labelFingerprint": args.get("labelFingerprint")})

    request = get_compute().instances().setLabels(project=project, zone=zone, instance=instance, body=body)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def set_instance_machine_type(args):
    """
    Changes the machine type for a stopped instance to the machine type specified in the request.

    parameter: (string) zone
        Name of the zone for request.
    parameter: (string) instance
        Name of the instance scoping this request.
    parameter: (string) machine_type
        Full or partial URL of the machine type resource.
    """
    project = SERVICE_ACT_PROJECT_ID
    instance = args.get("instance")
    zone = args.get("zone")
    machine_type = args.get("machineType")

    body = {"machineType": machine_type}

    request = get_compute().instances().setMachineType(project=project, zone=zone, instance=instance, body=body)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


# images()
def get_image(args):
    """
    Returns the specified image.

    parameter: (string) project
        Project ID for this request.
    parameter: (string) image
        Name of the image resource to return.
    """
    if args.get("project") is not None:
        project = args.get("project")
    else:
        project = SERVICE_ACT_PROJECT_ID

    image = args.get("image")

    request = get_compute().images().get(project=project, image=image)
    response = request.execute()

    data_res = {"id": response.get("id"), "name": response.get("name")}

    ec = {"GoogleCloudCompute.Images(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Images", data_res, removeNull=True),
        ec,
        response,
    )


def get_image_from_family(args):
    """
    Returns the latest image that is part of an image family and is not deprecated.

    parameter: (string) project
        Project ID for this request.
    parameter: (string) family
        Name of the image family to search for.
    """
    project = args.get("project")
    family = args.get("family")

    request = get_compute().images().getFromFamily(project=project, family=family)
    response = request.execute()

    data_res = {
        "id": response.get("id"),
        "name": response.get("name"),
        "family": response.get("family"),
    }

    ec = {"GoogleCloudCompute.Images(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Images", data_res, removeNull=True),
        ec,
        response,
    )


def list_images(args):
    """
    parameter: (string) project
        Project ID for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (string) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    return: demisto entry (list)

    """
    project = SERVICE_ACT_PROJECT_ID

    if args.get("project"):
        project = args.get("project")
    else:
        project = SERVICE_ACT_PROJECT_ID

    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .images()
        .list(
            project=project,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for image in response["items"]:
                output.append(image)
                data_res_item = {"id": image.get("id"), "name": image.get("name")}
                data_res.append(data_res_item)

        request = get_compute().images().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Images(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Images", data_res, removeNull=True),
        ec,
        response,
    )


def delete_image(args):
    """
    Deletes the specified image.

    parameter: (string) image
        Name of the image resource to delete.
    """
    project = SERVICE_ACT_PROJECT_ID
    image = args.get("image")

    request = get_compute().images().delete(project=project, image=image)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def set_image_labels(args):
    """
    Sets the labels on an image.

    parameter: (string) image
        Name of the image resource to delete.
    parameter: (dict) labels
        A list of labels to apply for this resource.
    parameter: (string) labelFingerprint
        The fingerprint of the previous set of labels for this resource.
    """
    project = SERVICE_ACT_PROJECT_ID
    image = args.get("image")
    labels = args.get("labels")
    label_fingerprint = args.get("labelFingerprint")

    labels = parse_labels(labels)
    body = {"labels": labels, "labelFingerprint": label_fingerprint}

    request = get_compute().images().setLabels(project=project, resource=image, body=body)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def insert_image(args):
    """
    Creates an image in the specified project using the data included in the request.
    """
    config = {}
    if args.get("name"):
        name = args.get("name", "")
        name = name.lower()
        config.update({"name": name})

    force_create = False
    if args.get("forceCreate"):
        force_create = args.get("forceCreate") == "true"

    if args.get("description"):
        description = args.get("description")
        config.update({"description": description})

    if args.get("rawDiskSource"):
        raw_disk_source = args.get("rawDiskSource")
        config.update({"rawDisk": {}})
        config["rawDisk"].update({"source": raw_disk_source})

    if args.get("rawDiskSha1Checksum"):
        raw_disk_sha1_checksum = args.get("rawDiskSha1Checksum")
        if "rawDisk" not in config:
            config.update({"rawDisk": {}})
        config["rawDisk"].update({"sha1Checksum": raw_disk_sha1_checksum})

    if args.get("rawDiskContainerType"):
        raw_disk_container_type = args.get("rawDiskContainerType")
        if "rawDisk" not in config:
            config.update({"rawDisk": {}})
        config["rawDisk"].update({"containerType": raw_disk_container_type})

    if args.get("deprecatedState"):
        deprecated_state = args.get("deprecatedState")
        config.update({"deprecated": {}})
        config["deprecated"].update({"state": deprecated_state})

    if args.get("deprecatedReplacement"):
        deprecated_replacement = args.get("deprecatedReplacement")
        if "deprecated" not in config:
            config.update({"deprecated": {}})
        config["deprecated"].update({"replacement": deprecated_replacement})

    if args.get("archiveSizeBytes"):
        archive_size_bytes = args.get("archiveSizeBytes")
        config.update({"archiveSizeBytes": int(archive_size_bytes)})

    if args.get("diskSizeGb"):
        disk_size_gb = args.get("diskSizeGb")
        config.update({"diskSizeGb": int(disk_size_gb)})

    if args.get("sourceDisk"):
        source_disk = args.get("sourceDisk")
        config.update({"sourceDisk": source_disk})

    if args.get("licenses"):
        licenses = args.get("licenses")
        config.update({"licenses": parse_resource_ids(licenses)})

    if args.get("family"):
        family = args.get("family")
        config.update({"family": family})

    if args.get("imageEncryptionKeyRawKey"):
        image_encryption_key_raw_key = args.get("imageEncryptionKeyRawKey")
        config.update({"imageEncryptionKey": {"rawKey": image_encryption_key_raw_key}})

    if args.get("imageEncryptionKeyKmsKeyName"):
        image_encryption_key_kms_key_name = args.get("imageEncryptionKeyKmsKeyName")
        if "imageEncryptionKey" not in config:
            config.update({"imageEncryptionKey": {}})
        config["imageEncryptionKey"].update({"kmsKeyName": image_encryption_key_kms_key_name})

    if args.get("sourceDiskEncryptionKeyRawKey"):
        source_disk_encryption_key_raw_key = args.get("sourceDiskEncryptionKeyRawKey")
        if "sourceDiskEncryptionKey" not in config:
            config.update({"sourceDiskEncryptionKey": {}})
        config["sourceDiskEncryptionKey"].update({"rawKey": source_disk_encryption_key_raw_key})

    if args.get("sourceDiskEncryptionKeyKmsKeyName"):
        source_disk_encryption_key_kms_key_name = args.get("sourceDiskEncryptionKeyKmsKeyName")
        if "sourceDiskEncryptionKey" not in config:
            config.update({"sourceDiskEncryptionKey": {}})
        config["sourceDiskEncryptionKey"].update({"kmsKeyName": source_disk_encryption_key_kms_key_name})

    if args.get("labels"):
        labels = args.get("labels")
        config.update({"labels": parse_labels(labels)})

    if args.get("labelFingerprint"):
        label_fingerprint = args.get("labelFingerprint")
        config.update({"labelFingerprint": label_fingerprint})

    if args.get("guestOsFeatures"):
        guest_os_features = args.get("guestOsFeatures")
        guest_os_features = parse_resource_ids(guest_os_features)
        config.update({"guestOsFeatures": []})
        for f in guest_os_features:
            config["guestOsFeatures"].append({"type": f})

    if args.get("licenseCodes"):
        license_codes = args.get("licenseCodes")
        config.update({"licenseCodes": parse_resource_ids(license_codes)})

    if args.get("sourceImage"):
        source_image = args.get("sourceImage")
        config.update({"sourceImage": source_image})

    if args.get("imageEncryptionKeyRawKey"):
        image_encryption_key_raw_key = args.get("imageEncryptionKeyRawKey")
        config.update({"imageEncryptionKey": {"rawKey": image_encryption_key_raw_key}})

    if args.get("sourceImageEncryptionKeyKmsKeyName"):
        source_image_encryption_key_kms_key_name = args.get("sourceImageEncryptionKeyKmsKeyName")
        if "sourceImageEncryptionKey" not in config:
            config.update({"sourceImageEncryptionKey": {}})
        config["sourceImageEncryptionKey"].update({"kmsKeyName": source_image_encryption_key_kms_key_name})

    if args.get("sourceSnapshot"):
        source_snapshot = args.get("sourceSnapshot")
        config.update({"sourceSnapshot": source_snapshot})

    if args.get("sourceSnapshotEncryptionKeyRawKey"):
        source_snapshot_encryption_key_raw_key = args.get("sourceSnapshotEncryptionKeyRawKey")
        if "sourceSnapshotEncryptionKey" not in config:
            config.update({"sourceSnapshotEncryptionKey": {}})
        config["sourceSnapshotEncryptionKey"].update({"rawKey": source_snapshot_encryption_key_raw_key})

    if args.get("sourceSnapshotEncryptionKeyKmsKeyName"):
        source_snapshot_encryption_key_kms_key_name = args.get("sourceSnapshotEncryptionKeyKmsKeyName")
        if "sourceSnapshotEncryptionKey" not in config:
            config.update({"sourceSnapshotEncryptionKey": {}})
        config["sourceSnapshotEncryptionKey"].update({"kmsKeyName": source_snapshot_encryption_key_kms_key_name})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().images().insert(project=project, forceCreate=force_create, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def networks_add_peering(args):
    """
    Adds a peering to the specified network.
    """
    config = {}
    network = args.get("network")

    if args.get("name"):
        name = args.get("name", "")
        name = name.lower()
        config.update({"name": name})

    if args.get("peerNetwork"):
        peer_network = args.get("peerNetwork")
        config.update({"peerNetwork": peer_network})

    if args.get("autoCreateRoutes"):
        auto_create_routes = args.get("autoCreateRoutes") == "true"
        config.update({"autoCreateRoutes": auto_create_routes})

    if args.get("networkPeeringName"):
        network_peering_name = args.get("networkPeeringName")
        config.update({"networkPeering": {}})
        config["networkPeering"].update({"name": network_peering_name})

    if args.get("networkPeeringNetwork"):
        network_peering_network = args.get("networkPeeringNetwork")
        if "networkPeering" not in config:
            config.update({"networkPeering": {}})
        config["networkPeering"].update({"network": network_peering_network})

    if args.get("networkPeeringExchangeSubnetRoutes"):
        network_peering_exchange_subnet_routes = args.get("networkPeeringExchangeSubnetRoutes") == "True"
        if "networkPeering" not in config:
            config.update({"networkPeering": {}})
        config["networkPeering"].update({"exchangeSubnetRoutes": network_peering_exchange_subnet_routes})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().networks().addPeering(project=project, network=network, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def delete_network(args):
    """
    Deletes the specified network.

    parameter: (string) network
        Name of the network to delete.
    """
    project = SERVICE_ACT_PROJECT_ID
    network = args.get("network")

    request = get_compute().networks().delete(project=project, network=network)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def get_network(args):
    """
    Returns the specified network

    parameter: (string) network
        Name of the network to return.
    """
    project = SERVICE_ACT_PROJECT_ID
    network = args.get("network")

    request = get_compute().networks().get(project=project, network=network)
    response = request.execute()

    data_res = {"name": response.get("name"), "id": response.get("id")}

    ec = {"GoogleCloudCompute.Networks(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Networks", data_res, removeNull=True),
        ec,
        response,
    )


def insert_network(args):
    """
    Creates a network in the specified project using the data included in the request.
    """
    config = {}

    if args.get("name"):
        name = args.get("name", "")
        name = name.lower()
        config.update({"name": name})

    if args.get("description"):
        description = args.get("description")
        config.update({"description": description})

    if args.get("autoCreateSubnetworks"):
        auto_create_sub_networks = args.get("autoCreateSubnetworks") == "true"
        config.update({"autoCreateSubnetworks": auto_create_sub_networks})

    if args.get("routingConfigRoutingMode"):
        routing_config_routing_mode = args.get("routingConfigRoutingMode")
        config.update({"routingConfig": {"routingMode": routing_config_routing_mode}})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().networks().insert(project=project, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def list_networks(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .networks()
        .list(
            project=project,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for item in response["items"]:
                output.append(item)
                data_res_item = {"name": item.get("name"), "id": item.get("id")}
                data_res.append(data_res_item)

        request = get_compute().networks().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Networks(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Networks", data_res, removeNull=True),
        ec,
        response,
    )


def networks_removepeering(args):
    """
    Removes a peering from the specified network.

    parameter: (string) network
        Name of the network resource to remove peering from.
    parameter: (string) name
        Name of the peering.
    """
    config = {}
    network = args.get("network")

    if args.get("name"):
        name = args.get("name", "")
        config.update({"name": name})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().networks().removePeering(project=project, network=network, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def get_global_operation(args):
    """
    Retrieves the specified Operations resource.

    parameter: (string) name
        Name of the Operations resource to return.
    """
    project = SERVICE_ACT_PROJECT_ID
    operation = args.get("name")

    request = get_compute().globalOperations().get(project=project, operation=operation)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def get_zone_operation(args):
    """
    Retrieves the specified zone-specific Operations resource.

    parameter: (string) name
        Name of the Operations resource to return.
    parameter: (string) zone
        Name of the zone for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")
    zone = args.get("zone")

    request = get_compute().zoneOperations().get(project=project, zone=zone, operation=name)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def get_region_operation(args):
    """
    Retrieves the specified region-specific Operations resource.

    parameter: (string) name
        Name of the Operations resource to return.
    parameter: (string) region
        Name of the region for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")
    region = args.get("region")

    request = get_compute().regionOperations().get(project=project, region=region, operation=name)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def list_zone_operation(args):
    """
    parameter: (string) zone
        Name of the zone for request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    zone = args.get("zone")
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .zoneOperations()
        .list(
            project=project,
            zone=zone,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for operation in response["items"]:
                output.append(operation)
                data_res_item = {
                    "status": operation.get("status"),
                    "kind": operation.get("kind"),
                    "name": operation.get("name"),
                    "id": operation.get("id"),
                    "progress": operation.get("progress"),
                    "startTime": operation.get("startTime"),
                    "operationType": operation.get("operationType"),
                }
                data_res.append(data_res_item)

        request = get_compute().zoneOperations().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def delete_zone_operation(args):
    """
    Deletes the specified zone-specific Operations resource.

    parameter: (string) name
        Name of the Operations resource to delete.
    parameter: (string) zone
        Name of the zone for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")
    zone = args.get("zone")

    request = get_compute().zoneOperations().delete(project=project, zone=zone, operation=name)
    request.execute()

    return "success"


def list_region_operation(args):
    """
    parameter: (string) region
        Name of the region for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    region = args.get("region")
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .regionOperations()
        .list(
            project=project,
            region=region,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for operation in response["items"]:
                output.append(operation)
                data_res_item = {
                    "status": operation.get("status"),
                    "kind": operation.get("kind"),
                    "name": operation.get("name"),
                    "id": operation.get("id"),
                    "progress": operation.get("progress"),
                    "startTime": operation.get("startTime"),
                    "operationType": operation.get("operationType"),
                }
                data_res.append(data_res_item)

        request = get_compute().regionOperations().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def delete_region_operation(args):
    """
    Deletes the specified region-specific Operations resource.

    parameter: (string) name
        Name of the Operations resource to delete.
    parameter: (string) region
        Name of the region for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")
    region = args.get("region")

    request = get_compute().regionOperations().delete(project=project, region=region, operation=name)
    request.execute()

    return "success"


def list_global_operation(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .globalOperations()
        .list(
            project=project,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for operation in response["items"]:
                output.append(operation)
                data_res_item = {
                    "status": operation.get("status"),
                    "kind": operation.get("kind"),
                    "name": operation.get("name"),
                    "id": operation.get("id"),
                    "progress": operation.get("progress"),
                    "startTime": operation.get("startTime"),
                    "operationType": operation.get("operationType"),
                }
                data_res.append(data_res_item)

        request = get_compute().globalOperations().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def delete_global_operation(args):
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")

    request = get_compute().globalOperations().delete(project=project, operation=name)
    request.execute()

    return "success"


def aggregated_list_addresses(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .addresses()
        .aggregatedList(
            project=project,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for _name, instances_scoped_list in response["items"].items():
                if "warning" not in instances_scoped_list:
                    for addr in instances_scoped_list.get("addresses"):
                        output.append(addr)
                        data_res_item = {
                            "id": addr.get("id"),
                            "name": addr.get("name"),
                            "address": addr.get("address"),
                        }
                        data_res.append(data_res_item)

        request = get_compute().addresses().aggregatedList_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Addresses(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Addresses", data_res, removeNull=True),
        ec,
        response,
    )


def delete_address(args):
    """
    Deletes the specified address resource.

    parameter: (string) address
        Name of the address resource to delete.
    parameter: (string) region
        Name of the region for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    address = args.get("address")
    region = args.get("region")

    request = get_compute().addresses().delete(project=project, region=region, address=address)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def get_address(args):
    """
    Returns the specified address resource.

    parameter: (string) address
        Name of the address resource to return.
    parameter: (string) region
        Name of the region for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    address = args.get("address")
    region = args.get("region")

    request = get_compute().addresses().get(project=project, region=region, address=address)
    response = request.execute()
    data_res = {
        "id": response.get("id"),
        "name": response.get("name"),
        "address": response.get("address"),
    }
    ec = {"GoogleCloudCompute.Addresses(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Addresses", data_res, removeNull=True),
        ec,
        response,
    )


def insert_address(args):
    """
    Creates an address resource in the specified project using the data included in the request.
    """
    config = {}
    if args.get("name"):
        name = args.get("name", "")
        name = name.lower()
        config.update({"name": name})

    region = args.get("region")

    if args.get("description"):
        description = args.get("description")
        config.update({"description": description})

    if args.get("address"):
        address = args.get("address")
        config.update({"address": address})

    if args.get("prefixLength"):
        prefix_length = args.get("prefixLength")
        config.update({"prefixLength": prefix_length})

    if args.get("networkTier"):
        network_tier = args.get("networkTier")
        config.update({"networkTier": network_tier})

    if args.get("addressType"):
        address_type = args.get("addressType")
        config.update({"addressType": address_type})

    if args.get("purpose"):
        purpose = args.get("purpose")
        config.update({"purpose": purpose})

    if args.get("subnetwork"):
        sub_network = args.get("subnetwork")
        config.update({"subnetwork": sub_network})

    if args.get("network"):
        network = args.get("network")
        config.update({"network": network})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().addresses().insert(project=project, region=region, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def list_addresses(args):
    """
    parameter: (string) region
        Name of the region for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    region = args.get("region")
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .addresses()
        .list(
            project=project,
            region=region,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for address in response["items"]:
                output.append(address)
                data_res_item = {
                    "id": address.get("id"),
                    "name": address.get("name"),
                    "address": address.get("address"),
                }
                data_res.append(data_res_item)

        request = get_compute().addresses().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Addresses(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Addresses", data_res, removeNull=True),
        ec,
        response,
    )


def delete_global_address(args):
    """
    Deletes the specified address resource.

    parameter: (string) address
        Name of the address resource to delete.
    """
    project = SERVICE_ACT_PROJECT_ID
    address = args.get("address")

    request = get_compute().globalAddresses().delete(project=project, address=address)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def get_global_address(args):
    """
    Returns the specified address resource

    parameter: (string) address
        Name of the address resource to return.
    """
    project = SERVICE_ACT_PROJECT_ID
    address = args.get("address")

    request = get_compute().globalAddresses().get(project=project, address=address)
    response = request.execute()

    data_res = {
        "id": response.get("id"),
        "name": response.get("name"),
        "address": response.get("address"),
    }

    ec = {"GoogleCloudCompute.Addresses(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Addresses", data_res, removeNull=True),
        ec,
        response,
    )


def insert_global_address(args):
    """
    Creates an address resource in the specified project using the data included in the request.
    """
    config = {}
    if args.get("name"):
        name = args.get("name", "")
        name = name.lower()
        config.update({"name": name})

    if args.get("description"):
        description = args.get("description")
        config.update({"description": description})

    if args.get("address"):
        address = args.get("address")
        config.update({"address": address})

    if args.get("prefixLength"):
        prefix_length = args.get("prefixLength")
        config.update({"prefixLength": prefix_length})

    if args.get("networkTier"):
        networkTier = args.get("networkTier")
        config.update({"networkTier": networkTier})

    if args.get("ipVersion"):
        ip_version = args.get("ipVersion")
        config.update({"ipVersion": ip_version})

    if args.get("addressType"):
        address_type = args.get("addressType")
        config.update({"addressType": address_type})

    if args.get("purpose"):
        purpose = args.get("purpose")
        config.update({"purpose": purpose})

    if args.get("subnetwork"):
        sub_network = args.get("subnetwork")
        config.update({"subnetwork": sub_network})

    if args.get("network"):
        network = args.get("network")
        config.update({"network": network})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().globalAddresses().insert(project=project, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def list_global_addresses(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .globalAddresses()
        .list(
            project=project,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for address in response["items"]:
                output.append(address)
                data_res_item = {
                    "id": address.get("id"),
                    "name": address.get("name"),
                    "address": address.get("address"),
                }
                data_res.append(data_res_item)

        request = get_compute().globalAddresses().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Addresses(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Addresses", data_res, removeNull=True),
        ec,
        response,
    )


# disks()
def aggregated_list_disks(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .disks()
        .aggregatedList(
            project=project,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for _name, instances_scoped_list in response["items"].items():
                if "warning" not in instances_scoped_list:
                    for disk in instances_scoped_list.get("disks", []):
                        output.append(disk)
                        data_res_item = {
                            "id": disk.get("id"),
                            "name": disk.get("name"),
                            "sizeGb": disk.get("sizeGb"),
                            "zone": disk.get("zone"),
                            "status": disk.get("status"),
                            "type": disk.get("type"),
                        }
                        data_res.append(data_res_item)

        request = get_compute().disks().aggregatedList_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Disks(val.id === obj.id)": output}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Disks", data_res, removeNull=True),
        ec,
        response,
    )


def create_disk_snapshot(args):
    """
    Creates a snapshot of a specified persistent disk.

    parameter: (string) zone
        The name of the zone for this request.
    parameter: (string) disk
        Name of the persistent disk to snapshot.

    """

    zone = args.get("zone")
    disk = args.get("disk")

    config = {}
    if args.get("name"):
        name = args.get("name", "")
        name = name.lower()
        config.update({"name": name})

    if args.get("description"):
        description = args.get("description")
        config.update({"description": description})

    if args.get("snapshotEncryptionKeyRawKey"):
        raw_key = args.get("snapshotEncryptionKeyRawKey")
        if "snapshotEncryptionKey" not in config:
            config.update({"snapshotEncryptionKey": {}})
        config["snapshotEncryptionKey"].update({"rawKey": raw_key})

    if args.get("snapshotEncryptionKeyKmsKeyName"):
        kms_key_name = args.get("snapshotEncryptionKeyKmsKeyName")
        if "snapshotEncryptionKey" not in config:
            config.update({"snapshotEncryptionKey": {}})
        config["snapshotEncryptionKey"].update({"kmsKeyName": kms_key_name})

    if args.get("sourceDiskEncryptionKeyRawKey"):
        raw_key = args.get("sourceDiskEncryptionKeyRawKey")
        if "sourceDiskEncryptionKey" not in config:
            config.update({"sourceDiskEncryptionKey": {}})
        config["sourceDiskEncryptionKey"].update({"rawKey": raw_key})

    if args.get("sourceDiskEncryptionKeyKmsKeyName"):
        kms_key_name = args.get("sourceDiskEncryptionKeyKmsKeyName")
        if "sourceDiskEncryptionKey" not in config:
            config.update({"sourceDiskEncryptionKey": {}})
        config["sourceDiskEncryptionKey"].update({"kmsKeyName": kms_key_name})

    if args.get("labels"):
        labels = args.get("labels")
        config.update({"labels": parse_labels(labels)})

    if args.get("labelFingerprint"):
        label_fingerprint = args.get("labelFingerprint")
        config.update({"labelFingerprint": label_fingerprint})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().disks().createSnapshot(project=project, zone=zone, disk=disk, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def delete_disk(args):
    """
    Deletes the specified persistent disk.

    parameter: (string) disk
        Name or id of the resource for this request.
    parameter: (string) zone
        Name of the zone for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    disk = args.get("disk")
    zone = args.get("zone")

    request = get_compute().disks().delete(project=project, zone=zone, disk=disk)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def get_disk(args):
    """
    Returns a specified persistent disk.

    parameter: (string) disk
        Name or id of the resource for this request.
    parameter: (string) zone
        Name of the zone for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    disk = args.get("disk")
    zone = args.get("zone")

    request = get_compute().disks().get(project=project, zone=zone, disk=disk)
    response = request.execute()

    data_res = {
        "id": response.get("id"),
        "name": response.get("name"),
        "sizeGb": response.get("sizeGb"),
        "zone": response.get("zone"),
        "status": response.get("status"),
        "type": response.get("type"),
    }

    ec = {"GoogleCloudCompute.Disks(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Disks", data_res, removeNull=True),
        ec,
        response,
    )


def insert_disk(args):
    """
    Creates a persistent disk in the specified project using the data in the request.
    """
    config = {}
    if args.get("name"):
        name = args.get("name", "")
        name = name.lower()
        config.update({"name": name})

    if args.get("zone"):
        zone = args.get("zone")
    else:
        zone = None
        demisto.debug(f"{args.get('zone')=}")

    if args.get("disktype"):
        disk_type = args.get("disktype")
        config.update({"type": disk_type})

    if args.get("description"):
        description = args.get("description")
        config.update({"description": description})

    if args.get("sizeGb"):
        size_gb = args.get("sizeGb")
        config.update({"sizeGb": int(size_gb)})

    if args.get("sourceSnapshot"):
        sourceSnapshot = args.get("sourceSnapshot")
        config.update({"sourceSnapshot": sourceSnapshot})

    if args.get("sourceImage"):
        source_image = args.get("sourceImage")
        config.update({"sourceImage": source_image})

    if args.get("licenses"):
        licenses = args.get("licenses")
        config.update({"licenses": parse_resource_ids(licenses)})

    if args.get("guestOsFeatures"):
        guest_os_features = args.get("guestOsFeatures")
        guest_os_features = parse_resource_ids(guest_os_features)
        config.update({"guestOsFeatures": []})
        for f in guest_os_features:
            config["guestOsFeatures"].append({"type": f})

    if args.get("diskEncryptionKeyRawKey"):
        disk_encryption_key_raw_key = args.get("diskEncryptionKeyRawKey")
        config.update({"diskEncryptionKey": {}})
        config["diskEncryptionKey"].update({"rawKey": disk_encryption_key_raw_key})

    if args.get("diskEncryptionKeyKmsKeyName"):
        disk_encryption_key_kms_key_name = args.get("diskEncryptionKeyKmsKeyName")
        if "diskEncryptionKey" not in config:
            config.update({"diskEncryptionKey": {}})
        config["diskEncryptionKey"].update({"kmsKeyName": disk_encryption_key_kms_key_name})

    if args.get("imageEncryptionKeyRawKey"):
        image_encryption_key_raw_key = args.get("imageEncryptionKeyRawKey")
        config.update({"imageEncryptionKey": {"rawKey": image_encryption_key_raw_key}})

    if args.get("sourceImageEncryptionKeyKmsKeyName"):
        source_image_encryption_key_kms_key_name = args.get("sourceImageEncryptionKeyKmsKeyName")
        if "sourceImageEncryptionKey" not in config:
            config.update({"sourceImageEncryptionKey": {}})
        config["sourceImageEncryptionKey"].update({"kmsKeyName": source_image_encryption_key_kms_key_name})

    if args.get("sourceSnapshotEncryptionKeyRawKey"):
        source_snapshot_encryption_key_raw_key = args.get("sourceSnapshotEncryptionKeyRawKey")
        if "sourceSnapshotEncryptionKey" not in config:
            config.update({"sourceSnapshotEncryptionKey": {}})
        config["sourceSnapshotEncryptionKey"].update({"rawKey": source_snapshot_encryption_key_raw_key})

    if args.get("sourceSnapshotEncryptionKeyKmsKeyName"):
        source_snapshot_encryption_key_kms_key_name = args.get("sourceSnapshotEncryptionKeyKmsKeyName")
        if "sourceSnapshotEncryptionKey" not in config:
            config.update({"sourceSnapshotEncryptionKey": {}})
        config["sourceSnapshotEncryptionKey"].update({"kmsKeyName": source_snapshot_encryption_key_kms_key_name})

    if args.get("labels"):
        labels = args.get("labels")
        config.update({"labels": parse_labels(labels)})

    if args.get("labelFingerprint"):
        label_fingerprint = args.get("labelFingerprint")
        config.update({"labelFingerprint": label_fingerprint})

    if args.get("replicaZones"):
        replica_zones = args.get("replicaZones")
        config.update({"replicaZones": parse_resource_ids(replica_zones)})

    if args.get("licenseCodes"):
        license_codes = args.get("licenseCodes")
        config.update({"licenseCodes": parse_resource_ids(license_codes)})

    if args.get("physicalBlockSizeBytes"):
        physical_block_size_bytes = args.get("physicalBlockSizeBytes")
        config.update({"physicalBlockSizeBytes": int(physical_block_size_bytes)})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().disks().insert(project=project, zone=zone, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        ec,
        response,
    )


def list_disks(args):
    """
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    zone = args.get("zone")
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .disks()
        .list(project=project, zone=zone, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for disk in response["items"]:
                output.append(disk)
                data_res_item = {
                    "id": disk.get("id"),
                    "name": disk.get("name"),
                    "sizeGb": disk.get("sizeGb"),
                    "zone": disk.get("zone"),
                    "status": disk.get("status"),
                    "type": disk.get("type"),
                }
                data_res.append(data_res_item)

        request = get_compute().disks().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Disks(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Disks", data_res, removeNull=True), ec, response)


def resize_disk(args):
    """
    Resizes the specified persistent disk.

    parameter: (string) disk
        Name or id of the resource for this request.
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (string) sizeGb
        The new size of the persistent disk, which is specified in GB.
    """
    config = {}

    disk = args.get("disk")
    zone = args.get("zone")

    if args.get("sizeGb"):
        size_gb = args.get("sizeGb")
        config.update({"sizeGb": int(size_gb)})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().disks().resize(project=project, zone=zone, disk=disk, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


def set_disk_labels(args):
    """
    Sets the labels on a disk.

    parameter: (string) disk
        Name or id of the resource for this request.
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (dict) labels
        The labels to set for this resource.
    parameter: (string) labelFingerprint
        The fingerprint of the previous set of labels for this resource, used to detect conflicts.
    """
    project = SERVICE_ACT_PROJECT_ID
    disk = args.get("disk")
    zone = args.get("zone")
    labels = args.get("labels")

    labels = parse_labels(labels)
    body = {"labels": labels}

    if args.get("labelFingerprint"):
        label_fingerprint = args.get("labelFingerprint")
        if label_fingerprint is not None:
            body.update({"labelFingerprint": label_fingerprint})

    request = get_compute().disks().setLabels(project=project, zone=zone, resource=disk, body=body)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


# diskTypes()
def aggregated_list_disk_types(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .diskTypes()
        .aggregatedList(project=project, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for _name, instances_scoped_list in response["items"].items():
                if "warning" not in instances_scoped_list:
                    for disktype in instances_scoped_list.get("diskTypes", []):
                        output.append(disktype)
                        data_res_item = {"name": disktype.get("name"), "validDiskSize": disktype.get("validDiskSize")}
                        data_res.append(data_res_item)

        request = get_compute().diskTypes().aggregatedList_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.DiskTypes(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute DiskTypes", data_res, removeNull=True), ec, response)


def get_disk_type(args):
    """
    Returns the specified disk type.
    """
    project = SERVICE_ACT_PROJECT_ID
    disk_type = args.get("disktype")
    zone = args.get("zone")

    request = get_compute().diskTypes().get(project=project, zone=zone, diskType=disk_type)
    response = request.execute()

    data_res = {"name": response.get("name"), "validDiskSize": response.get("validDiskSize"), "zone": response.get("zone")}

    ec = {"GoogleCloudCompute.DiskTypes(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute DiskTypes", data_res, removeNull=True), ec, response)


def list_disks_types(args):
    """
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    zone = args.get("zone")
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .diskTypes()
        .list(project=project, zone=zone, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for disktype in response["items"]:
                output.append(disktype)
                data_res_item = {"name": disktype.get("name"), "validDiskSize": disktype.get("validDiskSize")}
                data_res.append(data_res_item)

        request = get_compute().diskTypes().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.DiskTypes(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute DiskTypes", data_res, removeNull=True), ec, response)


# instanceGroups()
def instance_groups_add_instances(args):
    """
    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.

    parameter: (dict) instances
        The list of instances to add to the instance group.
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (string) instance_group
        The name of the instance group

    """
    project = SERVICE_ACT_PROJECT_ID
    instance_group = args.get("instanceGroup")
    zone = args.get("zone")
    instances = args.get("instances")

    instances = parse_resource_ids(instances)
    instarry = []
    for inst in instances:
        instarry.append({"instance": inst})

    body = {}
    body.update({"instances": instarry})

    request = get_compute().instanceGroups().addInstances(project=project, zone=zone, instanceGroup=instance_group, body=body)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


def aggregated_list_instance_groups(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (string) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .instanceGroups()
        .aggregatedList(project=project, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for _name, instances_scoped_list in response["items"].items():
                if "warning" not in instances_scoped_list:
                    for item in instances_scoped_list.get("instanceGroups", []):
                        output.append(item)
                        data_res_item = {
                            "id": item.get("id"),
                            "name": item.get("name"),
                            "zone": item.get("zone"),
                            "network": item.get("network"),
                        }
                        data_res.append(data_res_item)

        request = get_compute().instanceGroups().aggregatedList_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.InstanceGroups(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Instance Groups", data_res, removeNull=True), ec, response)


def delete_instance_group(args):
    """
    Deletes the specified instance group. The instances in the group are not deleted.

    parameter: (string) zone
        Name of the zone for this request.
    parameter: (string) instance_group
        The name of the instance group
    """
    project = SERVICE_ACT_PROJECT_ID
    instance_group = args.get("instanceGroup")
    zone = args.get("zone")

    request = get_compute().instanceGroups().delete(project=project, zone=zone, instanceGroup=instance_group)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


def get_instance_group(args):
    """
    Returns the specified instance group.

    parameter: (string) zone
        Name of the zone for this request.
    parameter: (string) instance_group
        The name of the instance group.
    """
    project = SERVICE_ACT_PROJECT_ID
    instance_group = args.get("instanceGroup")
    zone = args.get("zone")

    request = get_compute().instanceGroups().get(project=project, zone=zone, instanceGroup=instance_group)
    response = request.execute()
    data_res = {
        "id": response.get("id"),
        "name": response.get("name"),
        "zone": response.get("zone"),
        "network": response.get("network"),
    }

    ec = {"GoogleCloudCompute.InstanceGroups(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Instance Groups", data_res, removeNull=True), ec, response)


def insert_instance_group(args):
    """
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (string) name
        The name of the instance group.
    parameter: (string) description
        An optional description of this resource. Provide this property when you create the resource.
    parameter: (object) namedPorts
        Assigns a name to a port number
    parameter: (string) network
        The URL of the network to which all instances in the instance group belong.

    """
    config = {}
    if args.get("name"):
        name = args.get("name")
        name = name.lower()
        config.update({"name": name})

    zone = args.get("zone")

    if args.get("description"):
        description = args.get("description")
        config.update({"description": description})

    if args.get("namedPorts"):
        named_ports = args.get("namedPorts")
        config.update({"namedPorts": parse_named_ports(named_ports)})

    if args.get("network"):
        network = args.get("network")
        config.update({"network": network})

    project = SERVICE_ACT_PROJECT_ID
    response = get_compute().instanceGroups().insert(project=project, zone=zone, body=config).execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


def list_instance_groups(args):
    """
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    zone = args.get("zone")
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    request = (
        get_compute()
        .instanceGroups()
        .list(project=project, zone=zone, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for item in response["items"]:
                output.append(item)

        request = get_compute().instanceGroups().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.InstanceGroups(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Instance Groups", output, removeNull=True), ec, response)


def list_instance_groups_instances(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name
    parameter: (enum) instanceState
        A filter for the state of the instances in the instance group. Valid options are ALL or RUNNING
    """
    project = SERVICE_ACT_PROJECT_ID

    zone = args.get("zone")
    config = {}
    instance_group = args.get("instanceGroup")
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    if args.get("instanceState"):
        instance_state = args.get("instanceState")
        config.update({"instanceState": instance_state})

    output = []
    data_res = []
    request = (
        get_compute()
        .instanceGroups()
        .listInstances(
            project=project,
            zone=zone,
            instanceGroup=instance_group,
            filter=filters,
            maxResults=max_results,
            orderBy=order_by,
            pageToken=page_token,
            body=config,
        )
    )
    while request:
        response = request.execute()
        if "items" in response:
            for item in response["items"]:
                output.append(item)
                data_res_item = {"instance": item.get("instance"), "status": item.get("status")}
                data_res.append(data_res_item)

        request = get_compute().instanceGroups().listInstances_next(previous_request=request, previous_response=response)
    output = {"Group": instance_group, "Instances": output}

    ec = {"GoogleCloudCompute.InstanceGroupsInstances": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Instance Groups", data_res, removeNull=True), ec, response)


def instance_groups_remove_instances(args):
    """
    Removes one or more instances from the specified instance group, but does not delete those instances.

    parameter: (string) zone
        The name of the zone for this request.
    parameter: (string) instanceGroup
        The name of the instance group where the named ports are updated.
    parameter: (list) instances
       The list of instances to remove from the instance group.
    """
    project = SERVICE_ACT_PROJECT_ID
    instance_group = args.get("instanceGroup")
    zone = args.get("zone")
    instances = args.get("instances")

    instances = parse_resource_ids(instances)
    instarry = []
    for inst in instances:
        instarry.append({"instance": inst})

    body = {"instances": instarry}

    request = get_compute().instanceGroups().removeInstances(project=project, zone=zone, instanceGroup=instance_group, body=body)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


def set_instance_group_named_ports(args):
    """
    Sets the named ports for the specified instance group.

    parameter: (string) zone
        The name of the zone for this request.
    parameter: (string) instanceGroup
        The name of the instance group where the named ports are updated.
    parameter: (list) namedPorts
        The list of named ports to set for this instance group.
    parameter: (string) fingerprint
        The fingerprint of the named ports information for this instance group.
    """
    config = {}
    instance_group = args.get("instanceGroup")

    zone = args.get("zone")

    if args.get("namedPorts"):
        named_ports = args.get("namedPorts")
        config.update({"namedPorts": parse_named_ports(named_ports)})

    if args.get("fingerprint"):
        fingerprint = args.get("fingerprint")
        config.update({"fingerprint": fingerprint})

    project = SERVICE_ACT_PROJECT_ID
    response = (
        get_compute()
        .instanceGroups()
        .setNamedPorts(project=project, zone=zone, instanceGroup=instance_group, body=config)
        .execute()
    )

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


# regions()
def get_region(args):
    """
    Get a specified region resource.

    parameter: (string) region
        The name of the region for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    region = args.get("region")

    request = get_compute().regions().get(project=project, region=region)
    response = request.execute()

    data_res = {"id": response.get("id"), "name": response.get("name"), "status": response.get("status")}

    ec = {"GoogleCloudCompute.Regions(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Regions", data_res, removeNull=True), ec, response)


def list_regions(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .regions()
        .list(project=project, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for item in response["items"]:
                output.append(item)
                data_res_item = {"id": item.get("id"), "name": item.get("name"), "status": item.get("status")}
                data_res.append(data_res_item)

        request = get_compute().regions().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Regions(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Regions", data_res, removeNull=True), ec, response)


def get_zone(args):
    """
    Get a specified zone resource.

    parameter: (string) zone
        The name of the zone for this request.
    """

    project = SERVICE_ACT_PROJECT_ID
    zone = args.get("zone")

    request = get_compute().zones().get(project=project, zone=zone)
    response = request.execute()

    data_res = {"id": response.get("id"), "name": response.get("name"), "status": response.get("status")}

    ec = {"GoogleCloudCompute.Zones(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Zones", data_res, removeNull=True), ec, response)


def list_zones(args):
    """
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """

    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .zones()
        .list(project=project, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for item in response["items"]:
                output.append(item)
                data_res_item = {"id": item.get("id"), "name": item.get("name"), "status": item.get("status")}
                data_res.append(data_res_item)

        request = get_compute().zones().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Zones(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Zones", data_res, removeNull=True), ec, response)


def aggregated_list_machine_types(args):
    """
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """

    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .machineTypes()
        .aggregatedList(project=project, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    response = request.execute()
    if "items" in response:
        for _name, instances_scoped_list in response["items"].items():
            if "warning" not in instances_scoped_list:
                for item in instances_scoped_list.get("machineTypes", []):
                    output.append(item)
                    data_res_item = {
                        "id": item.get("id"),
                        "name": item.get("name"),
                        "memoryMb": item.get("memoryMb"),
                        "guestCpus": item.get("guestCpus"),
                    }
                    data_res.append(data_res_item)

    ec = {"GoogleCloudCompute.MachineTypes(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Machine Types", data_res, removeNull=True), ec, response)


def get_machine_type(args):
    """
    Get a specified machine type.

    parameter: (string) zone
        The name of the zone for this request.

    parameter: (string) machineType
        Name of the machine type to return.
    """

    project = SERVICE_ACT_PROJECT_ID
    machine_type = args.get("machineType")
    zone = args.get("zone")

    request = get_compute().machineTypes().get(project=project, zone=zone, machineType=machine_type)
    response = request.execute()

    data_res = {
        "id": response.get("id"),
        "name": response.get("name"),
        "memoryMb": response.get("memoryMb"),
        "guestCpus": response.get("guestCpus"),
    }

    ec = {"GoogleCloudCompute.MachineTypes(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Machine Types", data_res, removeNull=True), ec, response)


def list_machine_types(args):
    """
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """

    project = SERVICE_ACT_PROJECT_ID
    zone = args.get("zone")
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .machineTypes()
        .list(project=project, zone=zone, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for item in response["items"]:
                output.append(item)
                data_res_item = {
                    "id": item.get("id"),
                    "name": item.get("name"),
                    "memoryMb": item.get("memoryMb"),
                    "guestCpus": item.get("guestCpus"),
                }
                data_res.append(data_res_item)

        request = get_compute().machineTypes().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.MachineTypes(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Machine Types", data_res, removeNull=True), ec, response)


def insert_firewall(args):
    """
    Creates a firewall rule in the specified project using the data included in the request.
    """
    project = args.get("project_id")
    if not project:
        project = SERVICE_ACT_PROJECT_ID

    config = {}
    if args.get("name"):
        config.update({"name": args.get("name")})

    if args.get("description"):
        config.update({"description": args.get("description")})

    if args.get("network"):
        config.update({"network": args.get("network")})

    if args.get("priority"):
        config.update({"priority": int(args.get("priority"))})

    if args.get("sourceRanges"):
        config.update({"sourceRanges": parse_resource_ids(args.get("sourceRanges"))})

    if args.get("destinationRanges"):
        config.update({"destinationRanges": parse_resource_ids(args.get("destinationRanges"))})

    if args.get("sourceTags"):
        config.update({"sourceTags": parse_resource_ids(args.get("sourceTags"))})

    if args.get("targetTags"):
        config.update({"targetTags": parse_resource_ids(args.get("targetTags"))})

    if args.get("sourceServiceAccounts"):
        config.update({"sourceServiceAccounts": parse_resource_ids(args.get("sourceServiceAccounts"))})

    if args.get("targetServiceAccounts"):
        config.update({"targetServiceAccounts": parse_resource_ids(args.get("targetServiceAccounts"))})

    if args.get("allowed"):
        config.update({"allowed": parse_firewall_rule(args.get("allowed"))})

    if args.get("denied"):
        config.update({"denied": parse_firewall_rule(args.get("denied"))})

    if args.get("direction"):
        config.update({"direction": args.get("direction")})

    if args.get("logConfigEnable"):
        log_config_enable = args.get("logConfigEnable") == "true"
        config.update({"logConfig": {"enable": log_config_enable}})

    if args.get("disabled"):
        disabled = args.get("disabled") == "true"
        config.update({"disabled": disabled})

    request = get_compute().firewalls().insert(project=project, body=config)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


def patch_firewall(args):
    """
    Updates the specified firewall rule with the data included in the request.
    """
    project = SERVICE_ACT_PROJECT_ID

    config = {}
    if args.get("name"):
        name = args.get("name")
        config.update({"name": args.get("name")})
    else:
        name = None
        demisto.debug(f"{args.get('name')=} -> {name=}")

    if args.get("description"):
        config.update({"description": args.get("description")})

    if args.get("network"):
        config.update({"network": args.get("network")})

    if args.get("priority"):
        config.update({"priority": int(args.get("priority"))})

    if args.get("sourceRanges"):
        config.update({"sourceRanges": parse_resource_ids(args.get("sourceRanges"))})

    if args.get("destinationRanges"):
        config.update({"destinationRanges": parse_resource_ids(args.get("destinationRanges"))})

    if args.get("sourceTags"):
        config.update({"sourceTags": parse_resource_ids(args.get("sourceTags"))})

    if args.get("targetTags"):
        config.update({"targetTags": parse_resource_ids(args.get("targetTags"))})

    if args.get("sourceServiceAccounts"):
        config.update({"sourceServiceAccounts": parse_resource_ids(args.get("sourceServiceAccounts"))})

    if args.get("targetServiceAccounts"):
        config.update({"targetServiceAccounts": parse_resource_ids(args.get("targetServiceAccounts"))})

    if args.get("allowed"):
        config.update({"allowed": parse_firewall_rule(args.get("allowed"))})

    if args.get("denied"):
        config.update({"denied": parse_firewall_rule(args.get("denied"))})

    if args.get("direction"):
        config.update({"direction": args.get("direction")})

    if args.get("logConfigEnable"):
        log_config_enable = args.get("logConfigEnable") == "true"
        config.update({"logConfig": {"enable": log_config_enable}})

    if args.get("disabled"):
        disabled = args.get("disabled") == "true"
        config.update({"disabled": disabled})

    request = get_compute().firewalls().patch(project=project, firewall=name, body=config)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


def list_firewalls(args):
    """
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = args.get("project_id")
    if not project:
        project = SERVICE_ACT_PROJECT_ID

    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .firewalls()
        .list(project=project, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for item in response["items"]:
                output.append(item)
                data_res_item = {"name": item.get("name"), "network": item.get("network"), "priority": item.get("priority")}
                data_res.append(data_res_item)

        request = get_compute().firewalls().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Firewalls(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Firewalls", data_res, removeNull=True), ec, response)


def get_firewall(args):
    """
    Get a specified firewall rule.

    parameter: (string) name
        Name of the firewall rule to return.
    """
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")

    request = get_compute().firewalls().get(project=project, firewall=name)
    response = request.execute()

    data_res = {"name": response.get("name"), "network": response.get("network"), "priority": response.get("priority")}

    ec = {"GoogleCloudCompute.Firewalls(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Firewalls", data_res, removeNull=True), ec, response)


def delete_firewall(args):
    """
    Delete a specified firewall.

    parameter: (string) name
        Name of the firewall rule to delete.
    """
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")

    request = get_compute().firewalls().delete(project=project, firewall=name)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


# snapshots()
def delete_snapshot(args):
    """
    Delete a specified snapshot.

    parameter: (string) name
        Name of the Snapshot resource to delete.
    """
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")

    request = get_compute().snapshots().delete(project=project, snapshot=name)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


def get_snapshot(args):
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")

    request = get_compute().snapshots().get(project=project, snapshot=name)
    response = request.execute()

    data_res = {
        "name": response.get("name"),
        "status": response.get("status"),
        "creationTimestamp": response.get("creationTimestamp"),
    }

    ec = {"GoogleCloudCompute.Snapshots(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Snapshots", data_res, removeNull=True), ec, response)


def list_snapshots(args):
    """
    parameter: (string) zone
        Name of the zone for this request.
    parameter: (number) maxResults
        The maximum number of results per page that should be returned (Default 500).
    parameter: (string) filters
        A filter expression that filters resources listed in the response
    parameter: (string) pageToken
        Specifies a page token to use
    parameter: (orderBy) orderBy
        Sorts list results by a certain order.
        By default, results are returned in alphanumerical order based on the resource name

    """
    project = SERVICE_ACT_PROJECT_ID
    max_results = int(args.get("maxResults"))
    filters = args.get("filters")
    order_by = args.get("orderBy")
    page_token = args.get("pageToken")

    output = []
    data_res = []
    request = (
        get_compute()
        .snapshots()
        .list(project=project, filter=filters, maxResults=max_results, orderBy=order_by, pageToken=page_token)
    )
    while request:
        response = request.execute()
        if "items" in response:
            for item in response["items"]:
                output.append(item)
                data_res_item = {
                    "name": response.get("name"),
                    "status": response.get("status"),
                    "creationTimestamp": response.get("creationTimestamp"),
                }
                data_res.append(data_res_item)

        request = get_compute().snapshots().list_next(previous_request=request, previous_response=response)

    ec = {"GoogleCloudCompute.Snapshots(val.id === obj.id)": output}
    return_outputs(tableToMarkdown("Google Cloud Compute Snapshots", data_res, removeNull=True), ec, response)


def set_snapshot_labels(args):
    """ "
    parameter: (dict) labels
        A list of labels to apply for this resource.
    parameter: (number) labelFingerprint
        The fingerprint of the previous set of labels for this resource, used to detect conflicts.
    parameter: (string) name
        Name or ID of the resource for this request.
    """
    project = SERVICE_ACT_PROJECT_ID
    name = args.get("name")
    labels = args.get("labels")

    labels = parse_labels(labels)
    body = {"labels": labels}

    if args.get("labelFingerprint"):
        body.update({"labelFingerprint": args.get("labelFingerprint")})

    request = get_compute().snapshots().setLabels(project=project, resource=name, body=body)
    response = request.execute()

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    ec = {"GoogleCloudCompute.Operations(val.id === obj.id)": response}
    return_outputs(tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True), ec, response)


def add_project_info_metadata(metadata):
    """
    Add or update project wide metadata.
    :param metadata:  Each metadata entry is a key/value pair separated by ';' like so: key=abc,value=123;key=abc,value=123
    """
    project = SERVICE_ACT_PROJECT_ID
    project_instance = get_compute().projects().get(project=project).execute()
    fingerprint = project_instance.get("tags", {}).get("fingerprint")
    items = parse_metadata_items(metadata)
    body = assign_params(fingerprint=fingerprint, items=items, kind="compute#metadata")
    raw_res = get_compute().projects().setCommonInstanceMetadata(project=project, body=body).execute()
    data_res = {
        "status": raw_res.get("status"),
        "kind": raw_res.get("kind"),
        "name": raw_res.get("name"),
        "id": raw_res.get("id"),
        "progress": raw_res.get("progress"),
        "operationType": raw_res.get("operationType"),
    }
    ec = {"GoogleCloudCompute.ProjectMetadata(val.id === obj.id)": raw_res}
    return_outputs(
        tableToMarkdown("Google Cloud Compute Project Metadata Update Operation Started Successfully", data_res, removeNull=True),
        ec,
        raw_res,
    )


def aggregated_list_instances_ip(args: Dict[str, Any]) -> CommandResults:
    """
    gcp-compute-aggregated-list-instances-by-ip: Retrieves instance information based on public IP in your project
    across all regions and zones.

    Args:
        args (dict): all command arguments, usually passed from ``demisto.args()``.
            ``args['ip']`` IP Address to search on.

    Returns:
        CommandResults: A ``CommandResults`` object that is then passed to ``return_results``, that contains instance
        details.
    """
    ip = args.get("ip")
    default_search_scope = demisto.params().get("default_search_scope")
    # 'default_search_scope' param was set use it for scope, else use the project in the service account.
    # 'compute.googleapis.com/Instance' asset-type needed to find static and ephemeral public IPs.
    if default_search_scope:
        request_asset = (
            get_asset()
            .v1()
            .searchAllResources(
                scope=default_search_scope,
                assetTypes="compute.googleapis.com/Instance",
                query=f"additionalAttributes.externalIPs={ip}",
            )
        )

    else:
        request_asset = (
            get_asset()
            .v1()
            .searchAllResources(
                scope=f"projects/{SERVICE_ACT_PROJECT_ID}",
                assetTypes="compute.googleapis.com/Instance",
                query=f"additionalAttributes.externalIPs={ip}",
            )
        )
    response_asset = request_asset.execute()
    if response_asset:
        raw = response_asset.get("results")[0].get("parentFullResourceName")
        if raw:
            project = raw.split("/")[-1]
        else:
            raise ValueError("Unable to find project of the asset")

        output = []
        data_res = []

        request_comp = (
            get_compute()
            .instances()
            .aggregatedList(
                project=project,
            )
        )
        while request_comp:
            response_comp = request_comp.execute()
            if "items" in response_comp:
                for _, instances_scoped_list in response_comp["items"].items():
                    if "warning" not in instances_scoped_list:
                        for inst in instances_scoped_list.get("instances", []):
                            for interface in inst.get("networkInterfaces", []):
                                for config in interface.get("accessConfigs", []):
                                    # only add if 'natIP' (public IP) matches.
                                    if config.get("natIP") == ip:
                                        output.append(inst)
                                        data_res_item = {
                                            "id": inst.get("id"),
                                            "name": inst.get("name"),
                                            "machineType": inst.get("machineType"),
                                            "zone": inst.get("zone"),
                                        }
                                        data_res.append(data_res_item)

            request_comp = (
                get_compute().instances().aggregatedList_next(previous_request=request_comp, previous_response=response_comp)
            )

        return CommandResults(
            readable_output=tableToMarkdown("Google Cloud Compute Instances", data_res, removeNull=True),
            raw_response=response_comp,
            outputs_prefix="GoogleCloudCompute.Instances",
            outputs_key_field="id",
            outputs=output,
        )
    else:
        return CommandResults(
            readable_output="Unable to find asset with IP address.  If you are using an organization service account,"
            "please make sure the default_search_scope integration parameter is set."
        )


def add_networks_tag(args: Dict[str, Any]) -> CommandResults:
    """
    gcp-compute-add-network-tag: Add network tag for the specified instance.

    Args:
        args (dict): all command arguments, usually passed from ``demisto.args()``.
            ``args['instance']`` Name of the instance scoping this request.
            ``args['zone']`` The name of the zone for this request.
            ``args['tag']`` Network tag to add.  Tag must be unique, 1-63 characters long, and comply with RFC1035.

    Returns:
        CommandResults: A ``CommandResults`` object that is then passed to ``return_results``, that contains Compute
        action details.
    """
    project = args.get("project_id")
    if not project:
        project = SERVICE_ACT_PROJECT_ID
    instance = args.get("instance")
    zone = args.get("zone")
    tag = args.get("tag")

    # first request is to get info on instance (fingerprint and current tags)
    inst_obj = get_compute().instances().get(project=project, zone=zone, instance=instance)
    inst_resp = inst_obj.execute()
    finger = inst_resp.get("tags").get("fingerprint")
    all_tags = inst_resp.get("tags").get("items", [])
    all_tags.append(tag)

    if finger:
        body = {"fingerprint": finger, "items": all_tags}
        request = get_compute().instances().setTags(project=project, zone=zone, instance=instance, body=body)
        response = request.execute()
    else:
        raise ValueError("Unable to find tag fingerprint")

    data_res = {
        "status": response.get("status"),
        "kind": response.get("kind"),
        "name": response.get("name"),
        "id": response.get("id"),
        "progress": response.get("progress"),
        "operationType": response.get("operationType"),
    }

    return CommandResults(
        readable_output=tableToMarkdown("Google Cloud Compute Operations", data_res, removeNull=True),
        raw_response=response,
        outputs_prefix="GoogleCloudCompute.Operations",
        outputs_key_field="id",
        outputs=response,
    )


"""
EXECUTION CODE
"""


def main():
    if not SERVICE_ACCOUNT_FILE:
        raise DemistoException("Service Account Private Key file contents must be provided.")
    try:
        build_and_authenticate(GSERVICE)
        command = demisto.command()
        if command == "test-module":
            # This is the call made when pressing the integration test button.
            test_module()

        elif command == "gcp-compute-insert-instance":
            create_instance(demisto.args())

        elif command == "gcp-compute-get-instance":
            get_instance(demisto.args())

        elif command == "gcp-compute-delete-instance":
            delete_instance(demisto.args())

        elif command == "gcp-compute-start-instance":
            start_instance(demisto.args())

        elif command == "gcp-compute-stop-instance":
            stop_instance(demisto.args())

        elif command == "gcp-compute-reset-instance":
            reset_instance(demisto.args())

        elif command == "gcp-compute-list-instances":
            list_instances(demisto.args())

        elif command == "gcp-compute-set-instance-labels":
            set_instance_labels(demisto.args())

        elif command == "gcp-compute-set-instance-metadata":
            set_instance_metadata(demisto.args())

        elif command == "gcp-compute-set-instance-machine-type":
            set_instance_machine_type(demisto.args())

        elif command == "gcp-compute-aggregated-list-instances":
            aggregated_list_instances(demisto.args())

        elif command == "gcp-compute-get-image-from-family":
            get_image_from_family(demisto.args())

        elif command == "gcp-compute-get-image":
            get_image(demisto.args())

        elif command == "gcp-compute-networks-add-peering":
            networks_add_peering(demisto.args())

        elif command == "gcp-compute-delete-network":
            delete_network(demisto.args())

        elif command == "gcp-compute-get-network":
            get_network(demisto.args())

        elif command == "gcp-compute-insert-network":
            insert_network(demisto.args())

        elif command == "gcp-compute-list-networks":
            list_networks(demisto.args())

        elif command == "gcp-compute-networks-remove-peering":
            networks_removepeering(demisto.args())

        elif command == "gcp-compute-get-global-operation":
            get_global_operation(demisto.args())

        elif command == "gcp-compute-get-zone-operation":
            get_zone_operation(demisto.args())

        elif command == "gcp-compute-get-region-operation":
            get_region_operation(demisto.args())

        elif command == "gcp-compute-list-zone-operation":
            list_zone_operation(demisto.args())

        elif command == "gcp-compute-list-global-operation":
            list_global_operation(demisto.args())

        elif command == "gcp-compute-list-region-operation":
            list_region_operation(demisto.args())

        elif command == "gcp-compute-delete-zone-operation":
            delete_zone_operation(demisto.args())

        elif command == "gcp-compute-delete-global-operation":
            delete_global_operation(demisto.args())

        elif command == "gcp-compute-delete-region-operation":
            delete_region_operation(demisto.args())

        elif command == "gcp-compute-delete-address":
            delete_address(demisto.args())

        elif command == "gcp-compute-get-address":
            get_address(demisto.args())

        elif command == "gcp-compute-insert-address":
            insert_address(demisto.args())

        elif command == "gcp-compute-list-addresses":
            list_addresses(demisto.args())

        elif command == "gcp-compute-aggregated-list-addresses":
            aggregated_list_addresses(demisto.args())

        elif command == "gcp-compute-delete-global-address":
            delete_global_address(demisto.args())

        elif command == "gcp-compute-get-global-address":
            get_global_address(demisto.args())

        elif command == "gcp-compute-insert-global-address":
            insert_global_address(demisto.args())

        elif command == "gcp-compute-list-global-addresses":
            list_global_addresses(demisto.args())

        elif command == "gcp-compute-aggregated-list-disks":
            aggregated_list_disks(demisto.args())

        elif command == "gcp-compute-create-disk-snapshot":
            create_disk_snapshot(demisto.args())

        elif command == "gcp-compute-delete-disk":
            delete_disk(demisto.args())

        elif command == "gcp-compute-get-disk":
            get_disk(demisto.args())

        elif command == "gcp-compute-insert-disk":
            insert_disk(demisto.args())

        elif command == "gcp-compute-list-disks":
            list_disks(demisto.args())

        elif command == "gcp-compute-resize-disk":
            resize_disk(demisto.args())

        elif command == "gcp-compute-set-disk-labels":
            set_disk_labels(demisto.args())

        elif command == "gcp-compute-aggregated-list-disk-types":
            aggregated_list_disk_types(demisto.args())

        elif command == "gcp-compute-get-disk-type":
            get_disk_type(demisto.args())

        elif command == "gcp-compute-list-disk-types":
            list_disks_types(demisto.args())

        elif command == "gcp-compute-list-images":
            list_images(demisto.args())

        elif command == "gcp-compute-delete-image":
            delete_image(demisto.args())

        elif command == "gcp-compute-set-image-labels":
            set_image_labels(demisto.args())

        elif command == "gcp-compute-insert-image":
            insert_image(demisto.args())

        elif command == "gcp-compute-instance-groups-add-instances":
            instance_groups_add_instances(demisto.args())

        elif command == "gcp-compute-aggregated-list-instance-groups":
            aggregated_list_instance_groups(demisto.args())

        elif command == "gcp-compute-delete-instance-group":
            delete_instance_group(demisto.args())

        elif command == "gcp-compute-get-instance-group":
            get_instance_group(demisto.args())

        elif command == "gcp-compute-insert-instance-group":
            insert_instance_group(demisto.args())

        elif command == "gcp-compute-list-instance-groups":
            list_instance_groups(demisto.args())

        elif command == "gcp-compute-list-instance-group-instances":
            list_instance_groups_instances(demisto.args())

        elif command == "gcp-compute-instance-groups-remove-instances":
            instance_groups_remove_instances(demisto.args())

        elif command == "gcp-compute-set-group-instance-named-ports":
            set_instance_group_named_ports(demisto.args())

        elif command == "gcp-compute-get-region":
            get_region(demisto.args())

        elif command == "gcp-compute-list-regions":
            list_regions(demisto.args())

        elif command == "gcp-compute-get-zone":
            get_zone(demisto.args())

        elif command == "gcp-compute-list-zones":
            list_zones(demisto.args())

        elif command == "gcp-compute-aggregated-list-machine-types":
            aggregated_list_machine_types(demisto.args())

        elif command == "gcp-compute-get-machine-type":
            get_machine_type(demisto.args())

        elif command == "gcp-compute-list-machine-types":
            list_machine_types(demisto.args())

        elif command == "gcp-compute-wait-for-zone-operation":
            wait_for_zone_operation(demisto.args())

        elif command == "gcp-compute-wait-for-region-operation":
            wait_for_region_operation(demisto.args())

        elif command == "gcp-compute-wait-for-global-operation":
            wait_for_global_operation(demisto.args())

        elif command == "gcp-compute-insert-firewall":
            insert_firewall(demisto.args())

        elif command == "gcp-compute-patch-firewall":
            patch_firewall(demisto.args())

        elif command == "gcp-compute-list-firewall":
            list_firewalls(demisto.args())

        elif command == "gcp-compute-get-firewall":
            get_firewall(demisto.args())

        elif command == "gcp-compute-delete-firewall":
            delete_firewall(demisto.args())

        elif command == "gcp-compute-set-snapshot-labels":
            set_snapshot_labels(demisto.args())

        elif command == "gcp-compute-list-snapshots":
            list_snapshots(demisto.args())

        elif command == "gcp-compute-get-snapshot":
            get_snapshot(demisto.args())

        elif command == "gcp-compute-delete-snapshot":
            delete_snapshot(demisto.args())

        elif command == "gcp-compute-project-info-add-metadata":
            add_project_info_metadata(**demisto.args())

        elif command == "gcp-compute-add-network-tag":
            return_results(add_networks_tag(demisto.args()))

        elif command == "gcp-compute-aggregated-list-instances-by-ip":
            return_results(aggregated_list_instances_ip(demisto.args()))

    except Exception as e:
        LOG(e)
        try:
            response = json.loads(e.content)  # type: ignore
            response = response["error"]
            status_code = response.get("code")
            err_message = response.get("message")
            full_err_msg = f"error code: {status_code}\n{err_message}"
            return_error(full_err_msg)
        except AttributeError:
            return_error(str(e))


if __name__ in ("__main__", "__builtin__", "builtins"):
    main()