### IAM Policy Get Request Example Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/apigeeregistry_v1.projects.locations.apis.versions.html Example of how to get an IAM policy for a resource. ```APIDOC ## GET /v1/{resource}:getIamPolicy ### Description Gets the IAM policy for a specified resource. ### Method GET ### Endpoint `/{resource}:getIamPolicy` ### Query Parameters - **resource** (string) - Required - The resource for which the policy is requested. Example: `projects/my-project` or `buckets/my-bucket`. - **xgafv** (string) - Optional - V1 error format. Allowed values: `1` (v1 error format). ``` -------------------------------- ### Example of Running Compute Engine Instance Creation Sample Source: https://github.com/googleapis/google-api-python-client/blob/main/samples/compute/README.md An example command demonstrating how to execute the `python-example.py` script with specific instance details, including name, zone, project, and Cloud Storage bucket. ```bash python python-example.py --name example-instance --zone us-central1-a example-project my-gcs-bucket ``` -------------------------------- ### Run Compute Engine Instance Creation Sample Source: https://github.com/googleapis/google-api-python-client/blob/main/samples/compute/README.md Command-line instruction to run the `create_instance.py` sample. This requires specifying the instance name, zone, project ID, and a Cloud Storage bucket name. Ensure the `startup-script.sh` file is also downloaded. ```bash python create_instance.py --name [INSTANCE_NAME] --zone [ZONE] [PROJECT_ID] [CLOUD_STORAGE_BUCKET] ``` -------------------------------- ### Initial Setup APKs Installation Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/testing_v1.projects.testMatrices.html Specifies optional initial setup APKs to be installed on the device before the application under test is installed. These are also limited in total number. ```APIDOC ## initialSetupApks ### Description Optional. Initial setup APKs to install before the app under test is installed. Limited to a combined total of 100 initial setup and additional files. ### Type Array of Objects #### Object Properties - **location** (Object) - Required - A reference to a file, used for user inputs. The path to an APK to be installed on the device before the test begins. - **gcsPath** (String) - Required - A path to a file in Google Cloud Storage. Example: gs://build-app-1414623860166/app%40debug-unaligned.apk These paths are expected to be url encoded (percent encoding) ``` -------------------------------- ### Get Dialogflow Playbook Example Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/dialogflow_v3beta1.projects.locations.agents.playbooks.examples.html Retrieves a specific example from a Dialogflow playbook. Requires the resource name of the example. ```python client.get(name='projects/my-project/locations/my-location/agents/my-agent/playbooks/my-playbook/examples/my-example-id') ``` -------------------------------- ### start() Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/run_v2.projects.locations.instances.html Starts an Instance. ```APIDOC ## start(name, body=None, x__xgafv=None) ### Description Starts an Instance. ### Method POST (inferred from start operation) ### Endpoint {name}:start ### Parameters #### Path Parameters - **name** (string) - Required - The name of the instance to start. #### Query Parameters - **x__xgafv** (string) - Optional - V1 error format. #### Request Body - **body** (object) - Optional - The request message for the StartInstance method. ``` -------------------------------- ### ExampleGcsSource Configuration Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/aiplatform_v1.projects.locations.endpoints.html Configuration for providing input instances from Google Cloud Storage for example-based explanations. ```APIDOC ## ExampleGcsSource ### Description Configuration for providing input instances from Google Cloud Storage for example-based explanations. ### Fields - **dataFormat** (String) - The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. - **gcsSource** (Object) - The Google Cloud Storage location for the input instances. - **uris** (Array[String]) - Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards. - **nearestNeighborSearchConfig** (String) - The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). - **neighborCount** (Integer) - The number of neighbors to return when querying for examples. - **presets** (Object) - Simplified preset configuration, which automatically sets configuration values based on the desired query speed-precision trade-off and modality. - **modality** (String) - The modality of the uploaded model, which automatically configures the distance measurement and feature normalization for the underlying example index and queries. If your model does not precisely fit one of these types, it is okay to choose the closest type. - **query** (String) - Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. ``` -------------------------------- ### Get Example Store Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/aiplatform_v1beta1.projects.locations.exampleStores.html Retrieves a specific Example Store by its resource name. ```APIDOC ## get(name, x__xgafv=None) Get an ExampleStore. ### Description This method allows you to retrieve the details of a specific Example Store using its unique resource name. ### Parameters * **name** (string) - Required. The resource name of the ExampleStore to retrieve. Format: `projects/{project}/locations/{location}/exampleStores/{exampleStore}`. * **x__xgafv** (string) - Optional. V1 error format. If set, the API will return non-standard error messages, and the error message will be in the `x-goog-message` header. Possible values are `"2"` and `"1"`. ``` -------------------------------- ### Get App Installation Details Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/androidenterprise_v1.installs.html Retrieves details of an app installation on a specific device. ```APIDOC ## GET /androidenterprise_v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId} ### Description Retrieves details of an installation of an app on a device. ### Method GET ### Endpoint /androidenterprise_v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId} #### Path Parameters - **enterpriseId** (string) - Required - The ID of the enterprise. - **userId** (string) - Required - The ID of the user. - **deviceId** (string) - Required - The ID of the device. - **installId** (string) - Required - The ID of the installation. #### Query Parameters - **x__xgafv** (string) - Optional - Affects the "X-Xga-API-Version" header value. #### Response #### Success Response (200) - **kind** (string) - The type of resource. - **installId** (string) - The ID of the installation. - **productId** (string) - The ID of the product (app). - **productTitle** (string) - The title of the product (app). - **status** (string) - The status of the installation. ``` -------------------------------- ### POST /workstations.start Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/workstations_v1.projects.locations.workstationClusters.workstationConfigs.workstations.html Starts a workstation to allow user connections. ```APIDOC ## POST /workstations.start ### Description Starts running a workstation so that users can connect to it. ### Method POST ### Parameters #### Query Parameters - **name** (string) - Required - The name of the workstation to start. - **x__xgafv** (string) - Optional - V1 error format. ### Request Body - **body** (object) - Optional - Request body for the start operation. ``` -------------------------------- ### POST /workstations/{name}:start Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/workstations_v1.projects.locations.workstationClusters.workstationConfigs.workstations.html Starts a workstation to allow user connections. Supports optional boost configurations and optimistic concurrency control via etags. ```APIDOC ## POST /workstations/{name}:start ### Description Starts running a workstation so that users can connect to it. ### Method POST ### Endpoint /workstations/{name}:start ### Parameters #### Path Parameters - **name** (string) - Required - Name of the workstation to start. #### Request Body - **boostConfig** (string) - Optional - If set, the workstation starts using the boost configuration with the specified ID. - **etag** (string) - Optional - If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag. - **validateOnly** (boolean) - Optional - If set, validate the request and preview the result, but do not actually apply it. ### Request Example { "boostConfig": "config-123", "etag": "abc-123", "validateOnly": false } ### Response #### Success Response (200) - **done** (boolean) - If the value is false, it means the operation is still in progress. If true, the operation is completed. - **name** (string) - The server-assigned name of the operation. - **error** (object) - The error result of the operation in case of failure. - **metadata** (object) - Service-specific metadata associated with the operation. ``` -------------------------------- ### Get Example Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/ces_v1beta.projects.locations.apps.examples.html Retrieves the details of a specified example. This method allows you to fetch all information associated with a particular example, including its messages and metadata. ```APIDOC ## GET /v1/examples/{name} ### Description Gets details of the specified example. ### Method GET ### Endpoint `/v1/examples/{name}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the example to retrieve. Format: `projects/{project}/locations/{location}/apps/{app}/examples/{example}` #### Query Parameters - **x__xgafv** (string) - Optional - V1 error format. Allowed values: `1` (v1 error format), `2` (v2 error format) ### Request Example ```json { "name": "projects/my-project/locations/us-central1/apps/my-app/examples/my-example" } ``` ### Response #### Success Response (200) - **name** (string) - Identifier. The unique identifier of the example. Format: `projects/{project}/locations/{location}/apps/{app}/examples/{example}` - **displayName** (string) - Required. Display name of the example. - **description** (string) - Optional. Human-readable description of the example. - **entryAgent** (string) - Optional. The agent that initially handles the conversation. Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - **etag** (string) - Etag used to ensure the object hasn't changed during a read-modify-write operation. - **createTime** (string) - Output only. Timestamp when the example was created. - **updateTime** (string) - Output only. Timestamp when the example was last updated. - **invalid** (boolean) - Output only. Indicates if the example may become invalid due to referencing resources being deleted. - **messages** (array) - Optional. The collection of messages that make up the conversation. - **role** (string) - Optional. The role within the conversation (e.g., user, agent). - **eventTime** (string) - Optional. Timestamp when the message was sent or received. - **transcript** (string) - Optional. Transcript associated with the audio. - **updatedVariables** (object) - A struct representing variables updated in the conversation, keyed by variable names. - **toolResponse** (object) - Optional. Tool execution response. - **displayName** (string) - Output only. Display name of the tool. - **id** (string) - Optional. The matching ID of the tool call the response is for. - **response** (object) - Required. The tool execution result in JSON object format. - **tool** (string) - Optional. The name of the tool to execute. Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - **toolsetTool** (object) - Optional. The toolset tool that got executed. - **toolId** (string) - Optional. The tool ID to filter the tools to retrieve the schema for. - **toolset** (string) - Required. The resource name of the Toolset from which this tool is derived. Format: `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - **tool** (string) - Optional. The name of the tool to execute. Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - **toolsetTool** (object) - Optional. The toolset tool to execute. - **toolId** (string) - Optional. The tool ID to filter the tools to retrieve the schema for. - **toolset** (string) - Required. The resource name of the Toolset from which this tool is derived. Format: `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` #### Response Example ```json { "name": "projects/my-project/locations/us-central1/apps/my-app/examples/my-example", "displayName": "Sample Conversation", "description": "A typical user interaction.", "createTime": "2023-01-01T12:00:00Z", "updateTime": "2023-01-01T12:05:00Z", "messages": [ { "role": "user", "transcript": "Hello, what is the weather today?" }, { "role": "agent", "transcript": "The weather today is sunny with a high of 75 degrees Fahrenheit." } ] } ``` ``` -------------------------------- ### POST /instances/create Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/vmmigration_v1alpha1.projects.locations.sources.migratingVms.cutoverJobs.html Creates a new virtual machine instance with the specified configuration, including scheduling, networking, and hardware settings. ```APIDOC ## POST /instances/create ### Description Creates a new VM instance with defined machine type, network interfaces, and scheduling policies. ### Method POST ### Endpoint /instances/create ### Request Body - **name** (string) - Required - The name of the VM to create. - **machineType** (string) - Required - The machine type to create the VM with. - **zone** (string) - Required - The zone in which to create the VM. - **computeScheduling** (object) - Optional - Scheduling information for VM maintenance and node allocation. - **networkInterfaces** (array) - Optional - List of NICs connected to this VM. - **metadata** (map) - Optional - Key/value pairs to assign to the VM. ### Request Example { "name": "my-vm", "machineType": "n1-standard-1", "zone": "us-central1-a", "computeScheduling": { "automaticRestart": true, "onHostMaintenance": "MIGRATE" } } ### Response #### Success Response (200) - **project** (string) - The project in which the VM was created. #### Response Example { "project": "my-gcp-project" } ``` -------------------------------- ### Get Conversation Example Details Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/ces_v1.projects.locations.apps.examples.html Retrieves the full details of a specific conversation example resource. The input is the unique resource name of the example. ```python service.examples().get(name="projects/{project}/locations/{location}/apps/{app}/examples/{example}").execute() ``` -------------------------------- ### Configure Instance Startup Script and Data Disk Options Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/notebooks_v1.projects.locations.instances.html Specifies a post-startup script to run after the instance boots and controls the auto-deletion behavior of the data disk. The startup script can be a URL or a Cloud Storage path, and the data disk deletion can be prevented. ```python instance_config = { "postStartupScript": "gs://your-bucket/startup-script.sh", "noRemoveDataDisk": True } ``` -------------------------------- ### Get Style Guide API Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/apihub_v1.projects.locations.plugins.html Retrieves the style guide used for linting a specific plugin. ```APIDOC ## GET /v1/projects/{project}/locations/{location}/plugins/{plugin}/styleGuide ### Description Retrieves the style guide being used for linting a specific plugin. ### Method GET ### Endpoint /v1/projects/{project}/locations/{location}/plugins/{plugin}/styleGuide ### Parameters #### Path Parameters - **project** (string) - Required - The project ID. - **location** (string) - Required - The location of the plugin. - **plugin** (string) - Required - The name of the plugin. #### Query Parameters - **x__xgafv** (string) - Optional - V1 error format. Allowed values: 1, 2. ### Response #### Success Response (200) - **linter** (string) - Required - Target linter for the style guide. - **name** (string) - Identifier. The name of the style guide. - **contents** (object) - Required - Input only. The contents of the uploaded style guide. - **contents** (string) - Required - The contents of the style guide. - **mimeType** (string) - Required - The mime type of the content. #### Response Example ```json { "linter": "CLANG_FORMAT", "name": "projects/my-project/locations/us-central1/plugins/my-plugin/styleGuide", "contents": { "contents": "{\"basedOn\": \"Google\"}", "mimeType": "application/json" } } ``` ``` -------------------------------- ### Get Style Guide Contents Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/apihub_v1.projects.locations.plugins.styleGuide.html Retrieves the contents of a style guide for a specific project, location, and plugin. ```APIDOC ## GET /v1/projects/{project}/locations/{location}/plugins/{plugin}/styleGuide ### Description Get the contents of the style guide. ### Method GET ### Endpoint /v1/projects/{project}/locations/{location}/plugins/{plugin}/styleGuide ### Parameters #### Path Parameters - **project** (string) - Required - The project ID. - **location** (string) - Required - The location ID. - **plugin** (string) - Required - The plugin ID. #### Query Parameters - **x__xgafv** (string) - Optional - V1 error format. Allowed values: 1, 2. ### Request Example ```json { "example": "GET /v1/projects/my-project/locations/us-central1/plugins/my-plugin/styleGuide?x__xgafv=1" } ``` ### Response #### Success Response (200) - **contents** (string) - Required - The contents of the style guide. - **mimeType** (string) - Required - The mime type of the content. #### Response Example ```json { "contents": "Sample style guide content.", "mimeType": "text/plain" } ``` ``` -------------------------------- ### Disk Initialization Parameters Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/compute_alpha.instanceGroupManagers.html Details on how to specify source disks for new instance boot disks, including options for instant snapshots, regular snapshots, and encryption. ```APIDOC ## Disk Initialization Parameters This section describes the parameters used to initialize a new disk, particularly for instance boot disks. ### Parameters - **sourceInstantSnapshot** (string) - Optional - The source instant-snapshot to create this disk. When creating a new instance boot disk, one of initializeParams.sourceSnapshot or initializeParams.sourceInstantSnapshot, initializeParams.sourceImage or disks.source is required. To create a disk with a snapshot that you created, specify the snapshot name in the following format: `us-central1-a/instantSnapshots/my-backup` If the source instant-snapshot is deleted later, this field will not be set. - **sourceSnapshot** (string) - Optional - The source snapshot to create this disk. When creating a new instance boot disk, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required. To create a disk with a snapshot that you created, specify the snapshot name in the following format: `global/snapshots/my-backup` If the source snapshot is deleted later, this field will not be set. Note: You cannot create VMs in bulk using a snapshot as the source. Use an image instead when you create VMs using the bulk insert method. - **sourceSnapshotEncryptionKey** (object) - Optional - The customer-supplied encryption key of the source snapshot. ### Parameters for sourceSnapshotEncryptionKey: - **kmsKeyName** (string) - Optional - The name of the encryption key that is stored in Google Cloud KMS. For example: `"kmsKeyName": "projects/kms_project_id/locations/region/keyRings/key_region/cryptoKeys/key" The fully-qualified key name may be returned for resource GET requests. For example: `"kmsKeyName": "projects/kms_project_id/locations/region/keyRings/key_region/cryptoKeys/key/cryptoKeyVersions/1" - **kmsKeyServiceAccount** (string) - Optional - The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: `"kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/" - **rawKey** (string) - Optional - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: `"rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0="` - **rsaEncryptedKey** (string) - Optional - Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: `"rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: `https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem` - **sha256** (string) - Output only - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. - **storagePool** (string) - Optional - The storage pool in which the new disk is created. You can provide ``` -------------------------------- ### Start Environment - Python Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/cloudshell_v1.users.environments.html Starts a Google Cloud environment, enabling client connections. The operation returned can be polled to track the starting process. Once complete, the response will contain details about the started environment. An optional access token can be provided for pre-authentication. ```python def start(name: str, body: dict = None, x__xgafv: str = None): """Starts an existing environment, allowing clients to connect to it. Args: name: string, Name of the resource that should be started, for example `users/me/environments/default` or `users/someone@example.com/environments/default`. body: object, The request body. The object takes the form of: { "accessToken": "A String", # The initial access token passed to the environment. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object representing the long-running operation. """ pass ``` -------------------------------- ### iOS Test Setup Configuration Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/testing_v1.projects.testMatrices.html Configure the setup requirements for an iOS device prior to running a test, including additional IPAs to install. ```APIDOC ## iOS Test Setup Configuration ### Description Configure the setup requirements for an iOS device prior to running a test, including additional IPAs to install. ### Method Not Applicable (Configuration Object) ### Endpoint Not Applicable (Configuration Object) ### Parameters #### Request Body - **iosTestSetup** (object) - Test setup requirements for iOS. - **additionalIpas** (array) - iOS apps to install in addition to those being directly tested. - **gcsPath** (string) - A path to a file in Google Cloud Storage. Example: gs://build-app-1414623860166/app%40debug-unaligned.apk These paths are expected to be url encoded (percent encoding) ### Request Example ```json { "iosTestSetup": { "additionalIpas": [ { "gcsPath": "gs://your-bucket/additional_app1.ipa" }, { "gcsPath": "gs://your-bucket/additional_app2.ipa" } ] } } ``` ### Response (Response structure depends on the API call, typically a test execution object) #### Success Response (200) - **testMatrixId** (string) - Unique identifier for the test matrix. #### Response Example ```json { "testMatrixId": "projects/12345/testMatrices/abcdef123456" } ``` ``` -------------------------------- ### Source Snapshot Example Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/compute_v1.instances.html Specifies the source snapshot to create a new disk. When creating a boot disk for a new instance, either initializeParams.sourceSnapshot, initializeParams.sourceImage, or disks.source is required. The format for a user-created snapshot is global/snapshots/my-backup. ```json "sourceSnapshot": "global/snapshots/my-backup" ``` -------------------------------- ### Android Test Setup Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/testing_v1.projects.testMatrices.html Defines the setup requirements for Android tests, including installing additional APKs and configuring Google account login. ```APIDOC ## POST /run/android/test ### Description Configures and runs tests on Android devices. ### Method POST ### Endpoint /run/android/test ### Parameters #### Request Body - **testSetup** (object) - Optional - Test setup requirements for Android. - **account** (object) - Optional - Identifies an account and how to log into it. - **googleAuto** (object) - Optional - Enables automatic Google account login. If set, the service automatically generates a Google test account and adds it to the device, before executing the test. - **additionalApks** (array) - Optional - APKs to install in addition to those being directly tested. Limited to a combined total of 100 initial setup and additional files. - **bundleId** (string) - Required - The bundle id of the APK. - **fileReference** (object) - Required - Reference to the APK file. - **gcsPath** (string) - Required - A path to a file in Google Cloud Storage. Example: gs://build-app-1414623860166/app%40debug-unaligned.apk These paths are expected to be url encoded (percent encoding) - **packageName** (string) - Required - The package name of the APK. ### Request Example ```json { "testSetup": { "account": { "googleAuto": {} }, "additionalApks": [ { "bundleId": "com.example.additional.app", "fileReference": { "gcsPath": "gs://my-bucket/additional_app.apk" }, "packageName": "com.example.additional.app" } ] } } ``` ### Response #### Success Response (200) - **runId** (string) - A unique identifier for the test run. #### Response Example ```json { "runId": "run_def456" } ``` ``` -------------------------------- ### POST /v1/projects/{project}/instances Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/vmmigration_v1.projects.locations.sources.migratingVms.html Creates a new virtual machine instance with the specified configuration, including network, storage, and security parameters. ```APIDOC ## POST /v1/projects/{project}/instances ### Description Creates a new virtual machine instance in a specified Google Cloud project and zone. ### Method POST ### Endpoint /v1/projects/{project}/instances ### Parameters #### Path Parameters - **project** (string) - Required - The Google Cloud target project ID. #### Request Body - **vmName** (string) - Required - The name of the VM to create. - **machineType** (string) - Required - The machine type to create the VM with. - **zone** (string) - Required - The zone in which to create the VM. - **networkInterfaces** (array) - Optional - List of NICs connected to this VM. - **encryption** (object) - Optional - The encryption to apply to the VM disks. - **secureBoot** (boolean) - Optional - Defines whether the instance has Secure Boot enabled. ### Request Example { "vmName": "my-vm", "machineType": "n1-standard-1", "zone": "us-central1-a", "networkInterfaces": [{"network": "default"}] } ### Response #### Success Response (200) - **createTime** (string) - The time the job was created. - **endTime** (string) - The time the job finished. #### Response Example { "createTime": "2023-10-27T10:00:00Z", "endTime": "2023-10-27T10:05:00Z" } ``` -------------------------------- ### Kubernetes PostStart HTTP GET Hook Example Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/run_v1alpha1.projects.locations.revisions.html This snippet shows a PostStart lifecycle hook configured to perform an HTTP GET request to a specified host, path, and port. It includes an example of setting custom HTTP headers. The request is made after the container is created. ```yaml lifecycle: postStart: httpGet: host: "A String" httpHeaders: - name: "A String" value: "A String" path: "A String" port: intVal: 42 strVal: "A String" type: 42 scheme: "A String" ``` -------------------------------- ### POST /v1/projects/{project}/locations/{location}/instances Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/notebooks_v2.projects.locations.instances.html Create a new notebook instance with specific VM configurations including hardware, storage, and networking. ```APIDOC ## POST /v1/projects/{project}/locations/{location}/instances ### Description Creates a new notebook instance within a specified project and location. This endpoint accepts configurations for machine type, disks, and network settings. ### Method POST ### Endpoint /v1/projects/{project}/locations/{location}/instances ### Parameters #### Path Parameters - **project** (string) - Required - The Google Cloud project ID. - **location** (string) - Required - The zone or region for the instance. #### Request Body - **machineType** (string) - Optional - The machine type of the VM instance. - **diskSizeGb** (string) - Optional - The size of the boot disk in GB. - **containerImage** (object) - Optional - Container image configuration for the environment. - **dataDisks** (array) - Optional - List of data disks attached to the VM. - **disablePublicIp** (boolean) - Optional - If true, no external IP will be assigned. - **networkInterfaces** (array) - Optional - Network interface configuration. ### Request Example { "machineType": "n1-standard-4", "diskSizeGb": "150", "disablePublicIp": false } ### Response #### Success Response (200) - **instanceId** (string) - The unique ID of the created Compute Engine instance. #### Response Example { "instanceId": "1234567890123456789" } ``` -------------------------------- ### GET /v1/messages/{name=messages/*} Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/servicemanagement_v1.services.html This example demonstrates mapping a GET request to a gRPC GetMessage method. The 'name' field from GetMessageRequest is mapped to the URL path. ```APIDOC ## GET /v1/messages/{name=messages/*} ### Description Retrieves a message resource. ### Method GET ### Endpoint /v1/messages/{name=messages/*} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the message to retrieve, formatted as 'messages/*'. ### Request Example (No request body for GET method) ### Response #### Success Response (200) - **text** (string) - The content of the message. #### Response Example ```json { "text": "The message content." } ``` ``` -------------------------------- ### GET /projects/{project}/locations/{location}/apps/{app}/examples/{example} Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/ces_v1.projects.locations.apps.examples.html Retrieves the details of a specific conversation example using its unique identifier. ```APIDOC ## GET /projects/{project}/locations/{location}/apps/{app}/examples/{example} ### Description Retrieves a specific example resource by its unique identifier. ### Method GET ### Endpoint /projects/{project}/locations/{location}/apps/{app}/examples/{example} ### Parameters #### Path Parameters - **project** (string) - Required - The project ID. - **location** (string) - Required - The location ID. - **app** (string) - Required - The application ID. - **example** (string) - Required - The unique identifier of the example. ### Response #### Success Response (200) - **name** (string) - The unique identifier of the example. - **updateTime** (string) - Timestamp when the example was last updated. - **messages** (array) - List of conversation messages. #### Response Example { "name": "projects/my-project/locations/us-central1/apps/my-app/examples/123", "updateTime": "2023-10-27T10:00:00Z", "messages": [ { "role": "user" } ] } ``` -------------------------------- ### Disk Initialization Parameters Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/compute_alpha.regionInstanceGroupManagers.html Details on how to specify parameters for initializing a new disk when creating an instance. ```APIDOC ## Disk Initialization Parameters ### Description 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. This property is mutually exclusive with the source property; you can only define one or the other, but not both. This field is persisted and returned for instanceTemplate and not returned in the context of instance. ### Parameters #### initializeParams - **architecture** (string) - The architecture of the attached disk. Valid values are arm64 or x86_64. - **description** (string) - An optional description. Provide this property when creating the disk. - **diskName** (string) - Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created. - **diskSizeGb** (string) - Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB. - **diskType** (string) - The type of the disk. - **enableConfidentialCompute** (boolean) - Whether this disk is using confidential compute mode. - **guestOsFeatures** (array) - 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. - **type** (string) - The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: VIRTIO_SCSI_MULTIQUEUE, WINDOWS, MULTI_IP_SUBNET, UEFI_COMPATIBLE, GVNIC, SEV_CAPABLE, SUSPEND_RESUME_COMPATIBLE, SEV_LIVE_MIGRATABLE_V2, SEV_SNP_CAPABLE, TDX_CAPABLE, IDPF, SNP_SVSM_CAPABLE, CCA_CAPABLE. - **interface** (string) - Deprecated. Specifies the disk interface to use for attaching this disk. ``` -------------------------------- ### Instance Disk Initialization Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/notebooks_v1.projects.locations.runtimes.html Configure parameters for a new disk to be created alongside a new instance. This includes disk name, size, type, and labels. ```APIDOC ## POST /compute/v1/instances ### Description Creates a new virtual machine instance with specified configurations, including attached disks. ### Method POST ### Endpoint /compute/v1/instances ### Parameters #### Request Body - **initializeParams** (object) - Optional. Specifies the parameters for a new disk that will be created alongside the new instance. Mutually exclusive with the `source` property. - **diskName** (string) - Optional. Specifies the disk name. Defaults to the instance name. - **diskSizeGb** (string) - Optional. Specifies the size of the disk in base-2 GB. Defaults to 10GB, must be >= 10GB. - **diskType** (string) - Optional. The type of the boot disk. Defaults to `PD_STANDARD`. - **labels** (object) - Optional. Labels to apply to this disk. - **a_key** (string) - Example label key. - **source** (string) - Specifies a valid partial or full URL to an existing Persistent Disk resource. Mutually exclusive with `initializeParams`. - **machineType** (string) - Required. The Compute Engine machine type for the instance. Examples: `n1-standard-2`, `e2-standard-8`. - **internalIpOnly** (boolean) - Optional. If true, runtime will only have internal IP addresses. Defaults to false. - **labels** (object) - Optional. The labels to associate with this runtime. - **a_key** (string) - Example label key. - **metadata** (object) - Optional. The Compute Engine metadata entries to add to the virtual machine. - **a_key** (string) - Example metadata key. - **encryptionConfig** (object) - Optional. Encryption settings for the virtual machine's data disk. - **kmsKey** (string) - The Cloud KMS resource identifier of the customer-managed encryption key. ### Request Example ```json { "machineType": "e2-medium", "initializeParams": { "diskSizeGb": "100", "diskType": "pd-ssd", "labels": { "environment": "development" } }, "labels": { "app": "my-app" }, "metadata": { "startup-script": "echo 'Hello World!'" }, "encryptionConfig": { "kmsKey": "projects/my-project/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key" } } ``` ### Response #### Success Response (200) - **name** (string) - The name of the created instance. - **status** (string) - The current status of the instance. #### Response Example ```json { "name": "my-instance-12345", "status": "PROVISIONING" } ``` ``` -------------------------------- ### GET /apps Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/drive_v2.apps.html Lists all third-party applications installed or authorized by the user. ```APIDOC ## GET /apps ### Description Lists all applications that the user has installed or granted access to within their Google Drive. ### Method GET ### Endpoint /apps ### Parameters #### Query Parameters - **appFilterExtensions** (string) - Optional - Comma-separated list of file extensions to filter apps. - **appFilterMimeTypes** (string) - Optional - Comma-separated list of MIME types to filter apps. - **languageCode** (string) - Optional - BCP 47 language or locale code. ### Request Example GET /apps?appFilterExtensions=pdf,txt ### Response #### Success Response (200) - **items** (array) - The list of apps. - **defaultAppIds** (array) - List of default app IDs. #### Response Example { "items": [ { "id": "123", "name": "App One" } ], "defaultAppIds": ["123"] } ``` -------------------------------- ### Disk Initialization Parameters Source: https://github.com/googleapis/google-api-python-client/blob/main/docs/dyn/compute_alpha.instances.html Configure parameters for a new disk to be created alongside a new instance, including disk size and guest OS features. ```APIDOC ## Disk Initialization Parameters ### Description Configure parameters for a new disk to be created alongside a new instance, including disk size and guest OS features. ### Parameters #### Request Body Fields - **diskSizeGb** (String) - The size of the disk in GB. - **forceAttach** (Boolean) - [Input Only] Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error. - **guestOsFeatures** (Array) - A list of features to enable on the guest operating system. Applicable only for bootable images. - **type** (String) - The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: VIRTIO_SCSI_MULTIQUEUE, WINDOWS, MULTI_IP_SUBNET, UEFI_COMPATIBLE, GVNIC, SEV_CAPABLE, SUSPEND_RESUME_COMPATIBLE, SEV_LIVE_MIGRATABLE_V2, SEV_SNP_CAPABLE, TDX_CAPABLE, IDPF, SNP_SVSM_CAPABLE, CCA_CAPABLE. - **index** (Integer) - Output only. 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. - **initializeParams** (Object) - [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. ```