Skip to main content

Google Cloud Platform

This Integration is part of the GCP Pack.#

Supported versions

Supported Cortex XSOAR versions: 8.11.0 and later.

The GCP Integration automates management and security configurations for Compute Engine, Storage, and Container resources on GCP. This integration was integrated and tested with version v1 (Compute, Storage, Container, SERVICE_USAGE), v3 (Resource Manager).

Configure Google Cloud Platform in Cortex#

ParameterRequired
Service Account Private Key file content (JSON).False
Use system proxy settingsFalse
Trust any certificate (not secure)False

Commands#

You can execute these commands from the 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-firewall-patch#


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

Base Command#

gcp-compute-firewall-patch

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
resource_nameName of the firewall rule to update.Required
descriptionAn optional description of this resource, which you provide when you create the resource.Optional
networkURL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used.Optional
priorityPriority for this rule. This is an integer between 0 and 65535, 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.Optional
sourceRangesIf source ranges are specified, the firewall applies only to traffic with source IP addresses 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 applies to traffic with a source IP address within sourceRanges OR the source IP belonging to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported, comma-separated.Optional
destinationRangesIf destination ranges are specified, the firewall applies only to traffic with destination IP addresses in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported. Comma-separated.Optional
sourceTagsIf source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address. It only applies to traffic between instances in the same virtual network, because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic with a source IP address within sourceRanges OR the source IP belonging to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Comma-separated.Optional
targetTagsA list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. Comma-separated.Optional
sourceServiceAccountsIf source service accounts are specified, the firewall applies only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has a source IP address within sourceRanges OR the source IP belongs to an instance with a service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used simultaneously as sourceTags or targetTags. Comma-separated.Optional
targetServiceAccountsA list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. Comma-separated.Optional
allowedThe ALLOW rules list specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. For example, ipprotocol=tcp,ports=22,443;ipprotocol=tcp,ports=8080,80.Optional
deniedThe DENY rules list specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. For example, ipprotocol=tcp,ports=22,443;ipprotocol=tcp,ports=8080,80.Optional
directionDirection of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.Optional
logConfigEnableThis field denotes whether to enable logging for a particular firewall rule. Possible values are: true, false.Optional
disabledDenotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. Possible values are: true, false.Optional

Context Output#

PathTypeDescription
GCP.Compute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GCP.Compute.Operations.namestringName of the resource.
GCP.Compute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GCP.Compute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GCP.Compute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk from which the snapshot was created.
GCP.Compute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource.
GCP.Compute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE.
GCP.Compute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GCP.Compute.Operations.userstringThe user who requested the operation, for example, EMAILADDRESS.
GCP.Compute.Operations.progressnumberAn optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
GCP.Compute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GCP.Compute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GCP.Compute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GCP.Compute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GCP.Compute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GCP.Compute.Operations.selfLinkstringServer-defined URL for the resource.
GCP.Compute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GCP.Compute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.

gcp-storage-bucket-policy-delete#


Removes an entity from a bucket's Access Control List.

Base Command#

gcp-storage-bucket-policy-delete

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
resource_nameName of the GCS bucket.Required
entityEntity to remove from the Access Control List.
Common entity formats are:
user:<userId or email>
group:<groupId or email>
allUsers
allAuthenticatedUsers
For more options and details, see: https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls#resource . Default is allUsers.
Optional

Context Output#

There is no context output for this command.

gcp-compute-subnet-update#


Enables flow logs or Private Google Access on a subnet.

Base Command#

gcp-compute-subnet-update

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
regionGCP region.Required
resource_nameSubnet name.Required
enable_flow_logsEnable VPC Flow Logs. Possible values are: true, false.Optional
enable_private_ip_google_accessEnable Private Google Access. Possible values are: true, false.Optional

Context Output#

PathTypeDescription
GCP.Compute.Operations.nameStringThe name of the updated subnet.
GCP.Compute.Operations.regionStringThe region of the updated subnet.
GCP.Compute.Operations.subnetNameStringThe name of the subnet that was updated.
GCP.Compute.Operations.enableFlowLogsBooleanWhether flow logs are enabled for the subnet.
GCP.Compute.Operations.ipCidrRangeStringThe updated CIDR range for the subnet.
GCP.Compute.Operations.privateIpGoogleAccessBooleanWhether private Google access is enabled for the subnet.
GCP.Compute.Operations.privateIpv6GoogleAccessBooleanWhether private IPv6 Google access is enabled for the subnet.
GCP.Compute.Operations.stackTypeStringThe stack type of the subnet (e.g., `IPV4`, `IPV6`).
GCP.Compute.Operations.rangeNameStringThe name of the IP range associated with the subnet.
GCP.Compute.Operations.secondaryIpRangesUnknownList of secondary IP ranges for the subnet.
GCP.Compute.Operations.descriptionStringThe description of the subnet.

gcp-container-cluster-security-update#


Configures security settings for GKE clusters, including access controls and visibility.

Base Command#

gcp-container-cluster-security-update

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
regionGCP region.Required
resource_nameName of the GKE cluster.Required
enable_intra_node_visibilityEnable intra-node visibility. Possible values are: true, false.Optional
enable_master_authorized_networksEnable Master Authorized Networks. Possible values are: true, false.Optional
cidrsComma-separated list of up to 50 CIDR blocks (e.g., "192.168.0.0/24,10.0.0.0/32") that are allowed to access the Kubernetes master via HTTPS.
If enable_master_authorized_networks is true and no CIDRs are provided, all access will be blocked.
.
Optional

Context Output#

PathTypeDescription
GCP.Container.Operations.nameStringThe name of the GKE cluster.
GCP.Container.Operations.zoneStringThe zone of the GKE cluster.
GCP.Container.Operations.enableStackdriverLoggingBooleanWhether Stackdriver Logging is enabled for the cluster.
GCP.Container.Operations.enableStackdriverMonitoringBooleanWhether Stackdriver Monitoring is enabled for the cluster.
GCP.Container.Operations.enablePrivateNodesBooleanWhether private nodes are enabled for the GKE cluster.
GCP.Container.Operations.enablePrivateEndpointBooleanWhether private endpoint is enabled for the GKE cluster control plane.
GCP.Container.Operations.enableHttpsOnlyBooleanWhether HTTPS-only traffic is enforced for the cluster.
GCP.Container.Operations.enableNetworkPolicyBooleanWhether network policies are enabled for the cluster.
GCP.Container.Operations.enableAutoscalingBooleanWhether autoscaling is enabled for the cluster nodes.
GCP.Container.Operations.enableIstioBooleanWhether Istio is enabled for the GKE cluster.
GCP.Container.Operations.enablePodSecurityPolicyBooleanWhether PodSecurityPolicy is enabled for the GKE cluster.
GCP.Container.Operations.enableBinaryAuthorizationBooleanWhether Binary Authorization is enabled for the cluster.
GCP.Container.Operations.enableLegacyABACBooleanWhether legacy ABAC is enabled for the cluster.
GCP.Container.Operations.clusterIpv4CidrStringThe cluster’s IPv4 CIDR block.
GCP.Container.Operations.masterAuthorizedNetworksConfig.cidrBlocksUnknownList of authorized CIDR blocks that can access the GKE cluster master.
GCP.Container.Operations.masterAuthorizedNetworksConfig.enabledBooleanWhether master authorized networks are enabled for the cluster.
GCP.Container.Operations.networkStringThe network to which the GKE cluster belongs.
GCP.Container.Operations.subnetworkStringThe subnetwork to which the GKE cluster belongs.
GCP.Container.Operations.loggingServiceStringThe logging service used for the cluster (e.g., "logging.googleapis.com").
GCP.Container.Operations.monitoringServiceStringThe monitoring service used for the cluster (e.g., "monitoring.googleapis.com").
GCP.Container.Operations.nodePoolsUnknownA list of node pools in the cluster, with their configuration and security settings.
GCP.Container.Operations.privateClusterConfig.enablePrivateNodesBooleanWhether private nodes are enabled in the cluster.
GCP.Container.Operations.privateClusterConfig.enablePrivateEndpointBooleanWhether private endpoint is enabled for the cluster control plane.
GCP.Container.Operations.masterVersionStringThe current version of the Kubernetes master in the GKE cluster.

gcp-storage-bucket-metadata-update#


Updates the metadata of a Google Cloud Storage (GCS) bucket, including settings such as versioning and Uniform Bucket-Level Access (UBLA).

Base Command#

gcp-storage-bucket-metadata-update

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
resource_nameName of the bucket.Required
enable_versioningEnable versioning. Possible values are: true, false.Optional
enable_uniform_accessEnable uniform bucket-level access. Possible values are: true, false.Optional

Context Output#

PathTypeDescription
GCP.StorageBucket.MetadataUnknownUpdated bucket metadata.
GCP.StorageBucket.Metadata.nameStringThe name of the GCP bucket.
GCP.StorageBucket.Metadata.idStringThe ID of the GCP bucket.
GCP.StorageBucket.Metadata.locationStringThe location of the bucket.
GCP.StorageBucket.Metadata.storageClassStringThe storage class of the bucket (e.g., STANDARD, NEARLINE).
GCP.StorageBucket.Metadata.createdDateThe creation timestamp of the bucket.
GCP.StorageBucket.Metadata.updatedDateThe last update timestamp of the bucket.
GCP.StorageBucket.Metadata.metagenerationNumberThe metadata generation of the bucket.
GCP.StorageBucket.Metadata.labelsUnknownThe labels attached to the bucket.
GCP.StorageBucket.Metadata.defaultEventBasedHoldBooleanWhether a default event-based hold is enabled on the bucket.
GCP.StorageBucket.Metadata.retentionPolicy.retentionPeriodNumberThe duration in seconds that objects in the bucket must be retained.
GCP.StorageBucket.Metadata.retentionPolicy.effectiveTimeDateThe time from which the retention policy is effective.
GCP.StorageBucket.Metadata.retentionPolicy.isLockedBooleanWhether the retention policy is locked.
GCP.StorageBucket.Metadata.versioning.enabledBooleanWhether object versioning is enabled.
GCP.StorageBucket.Metadata.logging.logBucketStringThe destination bucket where access logs are stored.
GCP.StorageBucket.Metadata.logging.logObjectPrefixStringThe object prefix used for logging.
GCP.StorageBucket.Metadata.lifecycle.ruleUnknownA list of lifecycle management rules for the bucket.
GCP.StorageBucket.Metadata.iamConfiguration.uniformBucketLevelAccessBooleanWhether uniform bucket-level access is enabled.
GCP.StorageBucket.Metadata.corsUnknownCORS configuration for the bucket.
GCP.StorageBucket.Metadata.customPlacementConfigUnknownCustom placement configuration for multi-region buckets.
GCP.StorageBucket.Metadata.encryption.defaultKmsKeyNameStringThe default Cloud KMS key used to encrypt objects.
GCP.StorageBucket.Metadata.billing.requesterPaysBooleanWhether requester pays is enabled.
GCP.StorageBucket.Metadata.website.mainPageSuffixStringSuffix appended to requests for the bucket's website configuration.
GCP.StorageBucket.Metadata.website.notFoundPageStringThe path to the custom 404 page for the bucket website.

gcp-iam-project-policy-binding-remove#


Removes a specified IAM role binding from a GCP project.

Base Command#

gcp-iam-project-policy-binding-remove

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
memberMember to remove (e.g., user:test@example.com).Required
roleRole to remove (e.g., roles/viewer).Required

Context Output#

There is no context output for this command.

gcp-compute-instance-service-account-set#


Sets the service account for a GCP Compute Engine VM instance. The instance must be stopped before the service account can be changed.

Base Command#

gcp-compute-instance-service-account-set

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
zoneThe name of the zone for this request.Required
resource_nameName of the VM instance.Required
service_account_emailEmail of the service account.Required
scopesOAuth scopes to assign (full URLs), e.g., https://www.googleapis.com/auth/cloud-platform. Empty list means no scopes.Required

Context Output#

PathTypeDescription
GCP.Compute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GCP.Compute.Operations.namestringName of the resource.
GCP.Compute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GCP.Compute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GCP.Compute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk from which the snapshot was created.
GCP.Compute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource.
GCP.Compute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE.
GCP.Compute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GCP.Compute.Operations.userstringThe user who requested the operation, for example, EMAILADDRESS.
GCP.Compute.Operations.progressnumberAn optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
GCP.Compute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GCP.Compute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GCP.Compute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GCP.Compute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GCP.Compute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GCP.Compute.Operations.selfLinkstringServer-defined URL for the resource.
GCP.Compute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GCP.Compute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.

gcp-compute-instance-service-account-remove#


Removes the service account associated with a GCP Compute Engine VM instance. The instance must be stopped before the service account can be changed.

Base Command#

gcp-compute-instance-service-account-remove

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
zoneThe name of the zone for this request.Required
resource_nameName of the VM instance.Required

Context Output#

PathTypeDescription
GCP.Compute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GCP.Compute.Operations.namestringName of the resource.
GCP.Compute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GCP.Compute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GCP.Compute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk from which the snapshot was created.
GCP.Compute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource.
GCP.Compute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE.
GCP.Compute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GCP.Compute.Operations.userstringThe user who requested the operation, for example, EMAILADDRESS.
GCP.Compute.Operations.progressnumberAn optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
GCP.Compute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GCP.Compute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GCP.Compute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GCP.Compute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GCP.Compute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GCP.Compute.Operations.selfLinkstringServer-defined URL for the resource.
GCP.Compute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GCP.Compute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.

gcp-compute-instance-start#


Starts an instance that was stopped using the instances().stop method.

Base Command#

gcp-compute-instance-start

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
zoneThe name of the zone for this request.Required
resource_nameName of the instance resource to start.Required

Context Output#

PathTypeDescription
GCP.Compute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GCP.Compute.Operations.namestringName of the resource.
GCP.Compute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GCP.Compute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GCP.Compute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk from which the snapshot was created.
GCP.Compute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource.
GCP.Compute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE.
GCP.Compute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GCP.Compute.Operations.userstringThe user who requested the operation, for example, EMAILADDRESS.
GCP.Compute.Operations.progressnumberAn optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
GCP.Compute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GCP.Compute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GCP.Compute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GCP.Compute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GCP.Compute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GCP.Compute.Operations.selfLinkstringServer-defined URL for the resource.
GCP.Compute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GCP.Compute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.

gcp-compute-instance-stop#


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.

Base Command#

gcp-compute-instance-stop

Input#

Argument NameDescriptionRequired
project_idGCP project ID.Required
zoneThe name of the zone for this request.Required
resource_nameName of the instance resource to stop.Required

Context Output#

PathTypeDescription
GCP.Compute.Operations.idstringThe unique identifier for the resource. This identifier is defined by the server.
GCP.Compute.Operations.namestringName of the resource.
GCP.Compute.Operations.zonestringThe URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.clientOperationIdstringThe value of requestId if you provided it in the request. Not present otherwise.
GCP.Compute.Operations.operationTypestringThe type of operation, such as insert, update, or delete, and so on.
GCP.Compute.Operations.targetLinkstringThe URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk from which the snapshot was created.
GCP.Compute.Operations.targetIdstringThe unique target ID, which identifies a specific incarnation of the target resource.
GCP.Compute.Operations.statusstringThe status of the operation, which can be one of the following: PENDING RUNNING or DONE.
GCP.Compute.Operations.statusMessagestringAn optional textual description of the current status of the operation.
GCP.Compute.Operations.userstringThe user who requested the operation, for example, EMAILADDRESS.
GCP.Compute.Operations.progressnumberAn optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
GCP.Compute.Operations.insertTimestringThe time that this operation was requested. This value is in RFC3339 text format.
GCP.Compute.Operations.startTimestringThe time that this operation was started by the server. This value is in RFC3339 text format.
GCP.Compute.Operations.endTimestringThe time that this operation was completed. This value is in RFC3339 text format.
GCP.Compute.Operations.errorstringIf errors are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.warningsstringIf warning messages are generated during processing of the operation, this field will be populated.
GCP.Compute.Operations.httpErrorStatusCodenumberIf the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
GCP.Compute.Operations.httpErrorMessagestringIf the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
GCP.Compute.Operations.selfLinkstringServer-defined URL for the resource.
GCP.Compute.Operations.regionstringThe URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not configurable as a field in the request body.
GCP.Compute.Operations.descriptionstringA textual description of the operation, which is set when the operation is created.
GCP.Compute.Operations.kindstringType of the resource. Always compute#operation for Operation resources.