> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Cloud API reference

> API reference for the Google Cloud plugin in Corsair: every `googlecloud.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Artifact Registry

### locations.get

`artifactRegistry.locations.get`

Gets information about a location

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.get({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Resource name for the location. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locationId` | `string \| null` | No | The canonical id for this location. For example: `"us-east1"`. |
| `labels` | `Record<string, string> \| null` | No | Cross-service attributes for the location. For example \{"cloud.googleapis.com/region": "us-east1"} |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata. For example the available capacity at the given location. |
| `name` | `string \| null` | No | Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` |
| `displayName` | `string \| null` | No | The friendly name for this location, typically a nearby city name. For example, "Tokyo". |

***

### locations.getProjectConfig

`artifactRegistry.locations.getProjectConfig`

Retrieves the project configuration

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.getProjectConfig({ name: 'projects/demo-project/locations/us-central1/projectConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the project's logging configuration: projects/\{project}/locations/\{location}/projectConfig Format: `projects/<id>/locations/<id>/projectConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The name of the project's configuration. Always of the form: projects/\{project}/locations/\{location}/projectConfig |
| `platformLogsConfig` | `object \| null` | No | The platform logs config for a project or a repository. |

> [accordion] platformLogsConfig full type
>
> ```ts theme={null}
> {
>   severityLevel?: string | null,
>   loggingState?: string | null
> } | null
> ```

***

### locations.getVpcscConfig

`artifactRegistry.locations.getVpcscConfig`

Retrieves the VPCSC Config for the Project

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.getVpcscConfig({ name: 'projects/demo-project/locations/us-central1/vpcscConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the VPCSCConfig resource. Format: `projects/<id>/locations/<id>/vpcscConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `vpcscPolicy` | `string \| null` | No | The project per location VPC SC policy that defines the VPC SC behavior for the Remote Repository (Allow/Deny). |
| `name` | `string \| null` | No | The name of the project's VPC SC Config. Always of the form: projects/\{projectID}/locations/\{location}/vpcscConfig In update request: never set In response: always set |

***

### locations.list

`artifactRegistry.locations.list`

Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: \* **Global locations**: If `name` is empty, the method lists the public locations available to all projects. \* **Project-specific locations**: If `name` follows the format `projects/{project}`, the method lists locations... (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). |
| `pageSize` | `number` | No | The maximum number of results to return. If not set, the service selects a default. |
| `pageToken` | `string` | No | A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. |
| `name` | `string` | Yes | The resource that owns the locations collection, if applicable. Format: `projects/<id>`. |
| `extraLocationTypes` | `string[]` | No | Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `locations` | `object[] \| null` | No | A list of locations that matches the specified filter in the request. |

> [accordion] locations full type
>
> ```ts theme={null}
> {
>   locationId?: string | null,
>   labels?: Record<string, string> | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### locations.operations.cancel

`artifactRegistry.locations.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.operations.cancel({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be cancelled. Format: `projects/<id>/locations/<id>/operations/<id>`. |
| `body` | `object` | No | The request message for Operations.CancelOperation. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.operations.get

`artifactRegistry.locations.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.operations.get({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.aptArtifacts.import

`artifactRegistry.locations.repositories.aptArtifacts.import`

Imports Apt artifacts. The returned Operation will complete once the resources are imported

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.aptArtifacts.import({
	parent: 'projects/demo-project/locations/us-central1/repositories/debian',
	gcsSource: {
		uris: ['gs://demo-bucket/hello_1.0_all.deb'],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the parent resource where the artifacts will be imported. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `gcsSource` | `object` | No | Google Cloud Storage location where the artifacts currently reside. |

> [accordion] gcsSource full type
>
> ```ts theme={null}
> {
>   uris?: string[],
>   useWildcards?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.aptArtifacts.upload

`artifactRegistry.locations.repositories.aptArtifacts.upload`

Directly uploads an Apt artifact. The returned Operation will complete once the resources are uploaded; pass the bytes in `file` (body fields go up with them in one multipart request)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.aptArtifacts.upload({
	parent: 'projects/demo-project/locations/us-central1/repositories/debian',
	file: { url: 'https://deb.debian.org/debian/pool/main/h/hello/hello_2.10-3_amd64.deb', filename: 'hello_2.10-3_amd64.deb', contentType: 'application/vnd.debian.binary-package' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the parent resource where the artifacts will be uploaded. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `body` | `object` | No | The request to upload an artifact. |
| `file` | `string \| object \| custom` | Yes | The bytes to upload (a URL, `{ base64 }` or a Blob). Body fields sent with it go up in the same multipart request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `object \| null` | No | This resource represents a long-running operation that is the result of a network API call. |

> [accordion] operation full type
>
> ```ts theme={null}
> {
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   response?: Record<string, any> | null,
>   done?: boolean | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null
> } | null
> ```

***

### locations.repositories.attachments.create

`artifactRegistry.locations.repositories.attachments.create`

Creates an attachment. The returned Operation will finish once the attachment has been created

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.attachments.create({
	parent: 'projects/demo-project/locations/us-central1/repositories/docker',
	attachmentId: 'sbom',
	type: 'application/vnd.spdx+json',
	target: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/versions/sha256:abc',
	files: ['projects/demo-project/locations/us-central1/repositories/docker/files/sbom.json'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `attachmentId` | `string` | No | Required. The attachment id to use for this attachment. |
| `parent` | `string` | Yes | Required. The name of the parent resource where the attachment will be created. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `annotations` | `Record<string, string>` | No | Optional. User annotations. These attributes can only be set and used by the user, and not by Artifact Registry. See [https://google.aip.dev/128#annotations](https://google.aip.dev/128#annotations) for more details such as format and size limitations. |
| `files` | `string[]` | No | Required. The files that belong to this attachment. If the file ID part contains slashes, they are escaped. E.g. `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. |
| `attachmentNamespace` | `string` | No | The namespace this attachment belongs to. E.g. If an attachment is created by artifact analysis, namespace is set to `artifactanalysis.googleapis.com`. |
| `type` | `string` | No | Type of attachment. E.g. `application/vnd.spdx+json` |
| `target` | `string` | No | Required. The target the attachment is for, can be a Version, Package or Repository. E.g. `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. |
| `name` | `string` | No | The name of the attachment. E.g. `projects/p1/locations/us/repositories/repo/attachments/sbom`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.attachments.delete

`artifactRegistry.locations.repositories.attachments.delete`

Deletes an attachment. The returned Operation will finish once the attachments has been deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.attachments.delete({ name: 'projects/demo-project/locations/us-central1/repositories/docker/attachments/att-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the attachment to delete. Format: `projects/<id>/locations/<id>/repositories/<id>/attachments/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.attachments.get

`artifactRegistry.locations.repositories.attachments.get`

Gets an attachment

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.attachments.get({ name: 'projects/demo-project/locations/us-central1/repositories/docker/attachments/att-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the attachment to retrieve. Format: `projects/<id>/locations/<id>/repositories/<id>/attachments/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `annotations` | `Record<string, string> \| null` | No | Optional. User annotations. These attributes can only be set and used by the user, and not by Artifact Registry. See [https://google.aip.dev/128#annotations](https://google.aip.dev/128#annotations) for more details such as format and size limitations. |
| `updateTime` | `string \| null` | No | Output only. The time when the attachment was last updated. |
| `ociVersionName` | `string \| null` | No | Output only. The name of the OCI version that this attachment created. Only populated for Docker attachments. E.g. `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. |
| `createTime` | `string \| null` | No | Output only. The time when the attachment was created. |
| `files` | `string[] \| null` | No | Required. The files that belong to this attachment. If the file ID part contains slashes, they are escaped. E.g. `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. |
| `attachmentNamespace` | `string \| null` | No | The namespace this attachment belongs to. E.g. If an attachment is created by artifact analysis, namespace is set to `artifactanalysis.googleapis.com`. |
| `type` | `string \| null` | No | Type of attachment. E.g. `application/vnd.spdx+json` |
| `target` | `string \| null` | No | Required. The target the attachment is for, can be a Version, Package or Repository. E.g. `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. |
| `name` | `string \| null` | No | The name of the attachment. E.g. `projects/p1/locations/us/repositories/repo/attachments/sbom`. |

***

### locations.repositories.attachments.list

`artifactRegistry.locations.repositories.attachments.list`

Lists attachments (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.attachments.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |
| `parent` | `string` | Yes | Required. The name of the parent resource whose attachments will be listed. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `filter` | `string` | No | Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: \* `target` \* `type` \* `attachment_namespace` |
| `pageSize` | `number` | No | The maximum number of attachments to return. Maximum page size is 1,000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attachments` | `object[] \| null` | No | The attachments returned. |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of attachments, or empty if there are no more attachments to return. |

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   annotations?: Record<string, string> | null,
>   updateTime?: string | null,
>   ociVersionName?: string | null,
>   createTime?: string | null,
>   files?: string[] | null,
>   attachmentNamespace?: string | null,
>   type?: string | null,
>   target?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.repositories.checkPrewarmedArtifact

`artifactRegistry.locations.repositories.checkPrewarmedArtifact`

Checks an artifact streaming

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.checkPrewarmedArtifact({ repository: 'projects/demo-project/locations/us-central1/repositories/docker', tag: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/tags/v1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `repository` | `string` | Yes | Required. The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. If the package or version ID parts contain slashes, the slashes are escaped. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `tag` | `string` | No | Optional. The artifact tag Format:projects/\{project}/locations/\{location}/repositories/\{repository}/packages/\{package}/tags/\{tag} |
| `streamLocation` | `string` | No | Optional. The location of the prewarmed artifact. multi-region is not supported for this field. |
| `version` | `string` | No | Optional. The artifact version Format: projects/\{project}/locations/\{location}/repositories/\{repository}/packages/\{package}/versions/\{version} |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `prewarmedArtifact` | `object \| null` | No | PrewarmedArtifact represents a streamed artifact. |

> [accordion] prewarmedArtifact full type
>
> ```ts theme={null}
> {
>   expirationTime?: string | null,
>   uri?: string | null,
>   errorMessage?: string | null,
>   location?: string | null,
>   state?: string | null,
>   createTime?: string | null,
>   sizeBytes?: string | number | null
> } | null
> ```

***

### locations.repositories.create

`artifactRegistry.locations.repositories.create`

Creates a repository. The returned Operation will finish once the repository has been created

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.create({
	parent: 'projects/demo-project/locations/us-central1',
	repositoryId: 'docker',
	format: 'DOCKER',
	description: 'Container images',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `repositoryId` | `string` | No | Required. The repository id to use for this repository. |
| `parent` | `string` | Yes | Required. The name of the parent resource where the repository will be created. Format: `projects/<id>/locations/<id>`. |
| `description` | `string` | No | The user-provided description of the repository. |
| `virtualRepositoryConfig` | `object` | No | Virtual repository configuration. |
| `dockerConfig` | `object` | No | DockerRepositoryConfig is docker related repository details. Provides additional configuration details for repositories of the docker format type. |
| `format` | `FORMAT_UNSPECIFIED \| DOCKER \| MAVEN \| NPM \| APT \| YUM \| GOOGET \| PYTHON \| KFP \| GO \| GENERIC \| RUBY \| CONDA` | No | Optional. The format of packages that are stored in the repository. |
| `name` | `string` | No | The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. For each location in a project, repository names must be unique. |
| `remoteRepositoryConfig` | `object` | No | Remote repository configuration. |
| `kmsKeyName` | `string` | No | The Cloud KMS resource name of the customer managed encryption key that's used to encrypt the contents of the Repository. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. This value may not be changed after the Repository has been created. |
| `mode` | `MODE_UNSPECIFIED \| STANDARD_REPOSITORY \| VIRTUAL_REPOSITORY \| REMOTE_REPOSITORY \| AOSS_REPOSITORY \| ASSURED_OSS_REPOSITORY` | No | Optional. The mode of the repository. |
| `cleanupPolicyDryRun` | `boolean` | No | Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. |
| `cleanupPolicies` | `object` | No | Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. |
| `disallowUnspecifiedMode` | `boolean` | No | Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard. |
| `mavenConfig` | `object` | No | MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. |
| `vulnerabilityScanningConfig` | `object` | No | Config on whether to perform vulnerability scanning for resources in this repository, as well as output fields describing current state. |
| `platformLogsConfig` | `object` | No | The platform logs config for a project or a repository. |
| `labels` | `Record<string, string>` | No | Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes. |

> [accordion] virtualRepositoryConfig full type
>
> ```ts theme={null}
> {
>   upstreamPolicies?: {
>     id?: string,
>     repository?: string,
>     priority?: number
>   }[]
> }
> ```

> [accordion] dockerConfig full type
>
> ```ts theme={null}
> {
>   immutableTags?: boolean
> }
> ```

> [accordion] remoteRepositoryConfig full type
>
> ```ts theme={null}
> {
>   description?: string,
>   pythonRepository?: {
>     publicRepository?: PUBLIC_REPOSITORY_UNSPECIFIED | PYPI,
>     customRepository?: {
>       uri?: string
>     }
>   },
>   npmRepository?: {
>     publicRepository?: PUBLIC_REPOSITORY_UNSPECIFIED | NPMJS,
>     customRepository?: {
>       uri?: string
>     }
>   },
>   upstreamCredentials?: {
>     usernamePasswordCredentials?: {
>       username?: string,
>       passwordSecretVersion?: string
>     }
>   },
>   commonRepository?: {
>     uri?: string
>   },
>   disableUpstreamValidation?: boolean,
>   aptRepository?: {
>     publicRepository?: {
>       repositoryBase?: REPOSITORY_BASE_UNSPECIFIED | DEBIAN | UBUNTU | DEBIAN_SNAPSHOT,
>       repositoryPath?: string
>     },
>     customRepository?: {
>       uri?: string
>     }
>   },
>   noCache?: {
>   },
>   yumRepository?: {
>     publicRepository?: {
>       repositoryBase?: REPOSITORY_BASE_UNSPECIFIED | CENTOS | CENTOS_DEBUG | CENTOS_VAULT | CENTOS_STREAM | ROCKY | EPEL,
>       repositoryPath?: string
>     },
>     customRepository?: {
>       uri?: string
>     }
>   },
>   mavenRepository?: {
>     publicRepository?: PUBLIC_REPOSITORY_UNSPECIFIED | MAVEN_CENTRAL,
>     customRepository?: {
>       uri?: string
>     }
>   },
>   dockerRepository?: {
>     publicRepository?: PUBLIC_REPOSITORY_UNSPECIFIED | DOCKER_HUB,
>     customRepository?: {
>       uri?: string
>     }
>   }
> }
> ```

> [accordion] cleanupPolicies full type
>
> ```ts theme={null}
> Record<string, {
>   mostRecentVersions?: {
>     keepCount?: number,
>     packageNamePrefixes?: string[]
>   },
>   id?: string,
>   condition?: {
>     olderThan?: string,
>     packageNamePrefixes?: string[],
>     newerThan?: string,
>     tagState?: TAG_STATE_UNSPECIFIED | TAGGED | UNTAGGED | ANY,
>     tagPrefixes?: string[],
>     versionNamePrefixes?: string[]
>   },
>   action?: ACTION_UNSPECIFIED | DELETE | KEEP
> }>
> ```

> [accordion] mavenConfig full type
>
> ```ts theme={null}
> {
>   allowSnapshotOverwrites?: boolean,
>   versionPolicy?: VERSION_POLICY_UNSPECIFIED | RELEASE | SNAPSHOT
> }
> ```

> [accordion] vulnerabilityScanningConfig full type
>
> ```ts theme={null}
> {
>   enablementConfig?: ENABLEMENT_CONFIG_UNSPECIFIED | INHERITED | DISABLED
> }
> ```

> [accordion] platformLogsConfig full type
>
> ```ts theme={null}
> {
>   severityLevel?: SEVERITY_LEVEL_UNSPECIFIED | DEBUG | INFO | NOTICE | WARNING | ERROR | CRITICAL | ALERT | EMERGENCY,
>   loggingState?: LOGGING_STATE_UNSPECIFIED | ENABLED | DISABLED
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.delete

`artifactRegistry.locations.repositories.delete`

Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.delete({ name: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the repository to delete. Format: `projects/<id>/locations/<id>/repositories/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.dockerImages.get

`artifactRegistry.locations.repositories.dockerImages.get`

Gets a docker image

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.dockerImages.get({ name: 'projects/demo-project/locations/us-central1/repositories/docker/dockerImages/api@sha256:abc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the docker images. Format: `projects/<id>/locations/<id>/repositories/<id>/dockerImages/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `mediaType` | `string \| null` | No | Media type of this image, e.g. "application/vnd.docker.distribution.manifest.v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource. |
| `tags` | `string[] \| null` | No | Tags attached to this image. |
| `buildTime` | `string \| null` | No | The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor. |
| `uri` | `string \| null` | No | Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx\@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf |
| `uploadTime` | `string \| null` | No | Time the image was uploaded. |
| `artifactType` | `string \| null` | No | ArtifactType of this image, e.g. "application/vnd.example+type". If the `subject_digest` is set and no `artifact_type` is given, the `media_type` will be considered as the `artifact_type`. This field is returned as the `metadata.artifactType` field in the Version resource. |
| `imageSizeBytes` | `string \| number \| null` | No | Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource. |
| `imageManifests` | `object[] \| null` | No | Optional. For multi-arch images (manifest lists), this field contains the list of image manifests. |
| `updateTime` | `string \| null` | No | Output only. The time when the docker image was last updated. |
| `name` | `string \| null` | No | Required. registry\_location, project\_id, repository\_name and image id forms a unique image name:`projects//locations//repositories//dockerImages/`. For example, "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ nginx\@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us-west4" is the registry\_location, "test-project" is the project\_id, "test-repo" is the repository\_name and "nginx\@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image's digest. |

> [accordion] imageManifests full type
>
> ```ts theme={null}
> {
>   osVersion?: string | null,
>   digest?: string | null,
>   os?: string | null,
>   mediaType?: string | null,
>   variant?: string | null,
>   architecture?: string | null,
>   osFeatures?: string[] | null
> }[] | null
> ```

***

### locations.repositories.dockerImages.list

`artifactRegistry.locations.repositories.dockerImages.list`

Lists docker images (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.dockerImages.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |
| `parent` | `string` | Yes | Required. The name of the parent resource whose docker images will be listed. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `pageSize` | `number` | No | The maximum number of artifacts to return. Maximum page size is 1,000. |
| `orderBy` | `string` | No | The field to order the results by. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dockerImages` | `object[] \| null` | No | The docker images returned. |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of artifacts, or empty if there are no more artifacts to return. |

> [accordion] dockerImages full type
>
> ```ts theme={null}
> {
>   mediaType?: string | null,
>   tags?: string[] | null,
>   buildTime?: string | null,
>   uri?: string | null,
>   uploadTime?: string | null,
>   artifactType?: string | null,
>   imageSizeBytes?: string | number | null,
>   imageManifests?: {
>     osVersion?: string | null,
>     digest?: string | null,
>     os?: string | null,
>     mediaType?: string | null,
>     variant?: string | null,
>     architecture?: string | null,
>     osFeatures?: string[] | null
>   }[] | null,
>   updateTime?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.repositories.exportArtifact

`artifactRegistry.locations.repositories.exportArtifact`

Exports an artifact to a Cloud Storage bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.exportArtifact({ repository: 'projects/demo-project/locations/us-central1/repositories/docker', sourceTag: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/tags/v1', gcsPath: 'demo-bucket/exports' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `repository` | `string` | Yes | Required. The repository of the artifact to export. Format: projects/\{project}/locations/\{location}/repositories/\{repository} Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `gcsPath` | `string` | No | The Cloud Storage path to export the artifact to. Should start with the bucket name, and optionally have a directory path. Examples: `dst_bucket`, `dst_bucket/sub_dir`. Existing objects with the same path will be overwritten. |
| `sourceVersion` | `string` | No | The artifact version to export. Format: projects/\{project}/locations/\{location}/repositories/\{repository}/packages/\{package}/versions/\{version} |
| `sourceTag` | `string` | No | The artifact tag to export. Format:projects/\{project}/locations/\{location}/repositories/\{repository}/packages/\{package}/tags/\{tag} |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.files.delete

`artifactRegistry.locations.repositories.files.delete`

Deletes a file and all of its content. It is only allowed on generic repositories

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.files.delete({ name: 'projects/demo-project/locations/us-central1/repositories/files/files/cli:1.2.0:cli.tar.gz' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the file to delete. Format: `projects/<id>/locations/<id>/repositories/<id>/files/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.files.download

`artifactRegistry.locations.repositories.files.download`

Download a repository file's bytes (returned as a file)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.files.download({ name: 'projects/demo-project/locations/us-central1/repositories/files/files/cli:1.2.0:cli.tar.gz' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the file to download. Format: `projects/<id>/locations/<id>/repositories/<id>/files/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### locations.repositories.files.get

`artifactRegistry.locations.repositories.files.get`

Gets a file

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.files.get({ name: 'projects/demo-project/locations/us-central1/repositories/files/files/cli:1.2.0:cli.tar.gz' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the file to retrieve. Format: `projects/<id>/locations/<id>/repositories/<id>/files/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sizeBytes` | `string \| number \| null` | No | The size of the File in bytes. |
| `name` | `string \| null` | No | The name of the file, for example: `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. If the file ID part contains slashes, they are escaped. |
| `createTime` | `string \| null` | No | Output only. The time when the File was created. |
| `hashes` | `object[] \| null` | No | The hashes of the file content. |
| `owner` | `string \| null` | No | The name of the Package or Version that owns this file, if any. |
| `updateTime` | `string \| null` | No | Output only. The time when the File was last updated. |
| `fetchTime` | `string \| null` | No | Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Client specified annotations. |

> [accordion] hashes full type
>
> ```ts theme={null}
> {
>   value?: string | null,
>   type?: string | null
> }[] | null
> ```

***

### locations.repositories.files.list

`artifactRegistry.locations.repositories.files.list`

Lists files (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.files.list({ parent: 'projects/demo-project/locations/us-central1/repositories/files' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of files to return. Maximum page size is 1,000. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |
| `parent` | `string` | Yes | Required. The name of the repository whose files will be listed. For example: "projects/p1/locations/us-central1/repositories/repo1 Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `filter` | `string` | No | An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: \* `name` \* `owner` \* `annotations` Examples of using a filter: To filter the results of your request to files with the name `my_file.txt` in project `my-project` in the `us-central` region, in repository `my-repo`, append the following filter expression to your request: \* `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` You can also use wildcards to match any number of characters before or after the value: \*… |
| `orderBy` | `string` | No | The field to order the results by. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of files, or empty if there are no more files to return. |
| `files` | `object[] \| null` | No | The files returned. |

> [accordion] files full type
>
> ```ts theme={null}
> {
>   sizeBytes?: string | number | null,
>   name?: string | null,
>   createTime?: string | null,
>   hashes?: {
>     value?: string | null,
>     type?: string | null
>   }[] | null,
>   owner?: string | null,
>   updateTime?: string | null,
>   fetchTime?: string | null,
>   annotations?: Record<string, string> | null
> }[] | null
> ```

***

### locations.repositories.files.patch

`artifactRegistry.locations.repositories.files.patch`

Updates a file

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.files.patch({
	name: 'projects/demo-project/locations/us-central1/repositories/files/files/cli:1.2.0:cli.tar.gz',
	updateMask: 'annotations',
	annotations: { env: 'prod' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Required. The update mask applies to the resource. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `name` | `string` | Yes | The name of the file, for example: `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. If the file ID part contains slashes, they are escaped. Format: `projects/<id>/locations/<id>/repositories/<id>/files/<id>`. |
| `sizeBytes` | `string \| number` | No | The size of the File in bytes. |
| `body_name` | `string` | No | The name of the file, for example: `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. If the file ID part contains slashes, they are escaped. |
| `hashes` | `object[]` | No | The hashes of the file content. |
| `owner` | `string` | No | The name of the Package or Version that owns this file, if any. |
| `annotations` | `Record<string, string>` | No | Optional. Client specified annotations. |

> [accordion] hashes full type
>
> ```ts theme={null}
> {
>   value?: string,
>   type?: HASH_TYPE_UNSPECIFIED | SHA256 | MD5 | DIRSUM_SHA256
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sizeBytes` | `string \| number \| null` | No | The size of the File in bytes. |
| `name` | `string \| null` | No | The name of the file, for example: `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. If the file ID part contains slashes, they are escaped. |
| `createTime` | `string \| null` | No | Output only. The time when the File was created. |
| `hashes` | `object[] \| null` | No | The hashes of the file content. |
| `owner` | `string \| null` | No | The name of the Package or Version that owns this file, if any. |
| `updateTime` | `string \| null` | No | Output only. The time when the File was last updated. |
| `fetchTime` | `string \| null` | No | Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Client specified annotations. |

> [accordion] hashes full type
>
> ```ts theme={null}
> {
>   value?: string | null,
>   type?: string | null
> }[] | null
> ```

***

### locations.repositories.files.upload

`artifactRegistry.locations.repositories.files.upload`

Directly uploads a file to a repository. The returned Operation will complete once the resources are uploaded; pass the bytes in `file` (body fields go up with them in one multipart request)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.files.upload({
	parent: 'projects/demo-project/locations/us-central1/repositories/files',
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'release-notes.txt', contentType: 'text/plain' },
	fileId: 'release-notes.txt',
	fileType: 'ARTIFACT',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the repository where the file will be uploaded. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `fileType` | `ATTACHMENT \| ARTIFACT` | No | Optional. The type of the file to upload. Defaulting to ATTACHMENT if not specified. |
| `fileId` | `string` | No | Optional. The ID of the file. If left empty will default to sha256 digest of the content uploaded. |
| `file` | `string \| object \| custom` | Yes | The bytes to upload (a URL, `{ base64 }` or a Blob). Body fields sent with it go up in the same multipart request. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `object \| null` | No | This resource represents a long-running operation that is the result of a network API call. |

> [accordion] operation full type
>
> ```ts theme={null}
> {
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   response?: Record<string, any> | null,
>   done?: boolean | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null
> } | null
> ```

***

### locations.repositories.genericArtifacts.upload

`artifactRegistry.locations.repositories.genericArtifacts.upload`

Directly uploads a Generic artifact. The returned operation will complete once the resources are uploaded; pass the bytes in `file` (body fields go up with them in one multipart request)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.genericArtifacts.upload({
	parent: 'projects/demo-project/locations/us-central1/repositories/files',
	file: { url: 'https://github.com/cli/cli/releases/download/v2.60.0/gh_2.60.0_linux_amd64.tar.gz', filename: 'cli.tar.gz', contentType: 'application/gzip' },
	packageId: 'cli',
	versionId: '1.2.0',
	filename: 'cli.tar.gz',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the repository where the generic artifact will be uploaded. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `versionAnnotations` | `Record<string, string>` | No | Optional. Client specified annotations to attach to the version upon creation. This field is only applied if the Version is created during this upload. If the Version already exists and this field is set, the request will fail. |
| `packageId` | `string` | No | The ID of the package of the generic artifact. If the package does not exist, a new package will be created. The `package_id` should start and end with a letter or number, only contain letters, numbers, hyphens, underscores, and periods, and not exceed 256 characters. |
| `versionId` | `string` | No | The ID of the version of the generic artifact. If the version does not exist, a new version will be created. The version\_id must start and end with a letter or number, can only contain lowercase letters, numbers, the following characters \[-.+~~:], i.e.\[a-z0-9-.+~~:] and cannot exceed a total of 128 characters. Creating a version called `latest` is not allowed. |
| `filename` | `string` | No | The name of the file of the generic artifact to be uploaded. E.g. `example-file.zip` The filename is limited to letters, numbers, and url safe characters, i.e. \[a-zA-Z0-9-\_.\~@]. |
| `file` | `string \| object \| custom` | Yes | The bytes to upload (a URL, `{ base64 }` or a Blob). Body fields sent with it go up in the same multipart request. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `object \| null` | No | This resource represents a long-running operation that is the result of a network API call. |

> [accordion] operation full type
>
> ```ts theme={null}
> {
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   response?: Record<string, any> | null,
>   done?: boolean | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null
> } | null
> ```

***

### locations.repositories.get

`artifactRegistry.locations.repositories.get`

Gets a repository

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.get({ name: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the repository to retrieve. Format: `projects/<id>/locations/<id>/repositories/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | The user-provided description of the repository. |
| `virtualRepositoryConfig` | `object \| null` | No | Virtual repository configuration. |
| `dockerConfig` | `object \| null` | No | DockerRepositoryConfig is docker related repository details. Provides additional configuration details for repositories of the docker format type. |
| `format` | `string \| null` | No | Optional. The format of packages that are stored in the repository. |
| `name` | `string \| null` | No | The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. For each location in a project, repository names must be unique. |
| `remoteRepositoryConfig` | `object \| null` | No | Remote repository configuration. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. Whether or not this repository satisfies PZI. |
| `sizeBytes` | `string \| number \| null` | No | Output only. The size, in bytes, of all artifact storage in this repository. Repositories that are generally available or in public preview use this to calculate storage costs. |
| `createTime` | `string \| null` | No | Output only. The time when the repository was created. |
| `updateTime` | `string \| null` | No | Output only. The time when the repository was last updated. |
| `kmsKeyName` | `string \| null` | No | The Cloud KMS resource name of the customer managed encryption key that's used to encrypt the contents of the Repository. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. This value may not be changed after the Repository has been created. |
| `mode` | `string \| null` | No | Optional. The mode of the repository. |
| `cleanupPolicyDryRun` | `boolean \| null` | No | Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. |
| `cleanupPolicies` | `object \| null` | No | Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. |
| `registryUri` | `string \| null` | No | Output only. The repository endpoint, for example: `us-docker.pkg.dev/my-proj/my-repo`. |
| `disallowUnspecifiedMode` | `boolean \| null` | No | Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard. |
| `mavenConfig` | `object \| null` | No | MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. |
| `vulnerabilityScanningConfig` | `object \| null` | No | Config on whether to perform vulnerability scanning for resources in this repository, as well as output fields describing current state. |
| `platformLogsConfig` | `object \| null` | No | The platform logs config for a project or a repository. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Whether or not this repository satisfies PZS. |
| `labels` | `Record<string, string> \| null` | No | Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes. |

> [accordion] virtualRepositoryConfig full type
>
> ```ts theme={null}
> {
>   upstreamPolicies?: {
>     id?: string | null,
>     repository?: string | null,
>     priority?: number | null
>   }[] | null
> } | null
> ```

> [accordion] dockerConfig full type
>
> ```ts theme={null}
> {
>   immutableTags?: boolean | null
> } | null
> ```

> [accordion] remoteRepositoryConfig full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   pythonRepository?: {
>     publicRepository?: string | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   npmRepository?: {
>     publicRepository?: string | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   upstreamCredentials?: {
>     usernamePasswordCredentials?: {
>       username?: string | null,
>       passwordSecretVersion?: string | null
>     } | null
>   } | null,
>   commonRepository?: {
>     uri?: string | null
>   } | null,
>   disableUpstreamValidation?: boolean | null,
>   aptRepository?: {
>     publicRepository?: {
>       repositoryBase?: string | null,
>       repositoryPath?: string | null
>     } | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   noCache?: {
>   } | null,
>   yumRepository?: {
>     publicRepository?: {
>       repositoryBase?: string | null,
>       repositoryPath?: string | null
>     } | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   mavenRepository?: {
>     publicRepository?: string | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   dockerRepository?: {
>     publicRepository?: string | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null
> } | null
> ```

> [accordion] cleanupPolicies full type
>
> ```ts theme={null}
> Record<string, {
>   mostRecentVersions?: {
>     keepCount?: number | null,
>     packageNamePrefixes?: string[] | null
>   } | null,
>   id?: string | null,
>   condition?: {
>     olderThan?: string | null,
>     packageNamePrefixes?: string[] | null,
>     newerThan?: string | null,
>     tagState?: string | null,
>     tagPrefixes?: string[] | null,
>     versionNamePrefixes?: string[] | null
>   } | null,
>   action?: string | null
> }> | null
> ```

> [accordion] mavenConfig full type
>
> ```ts theme={null}
> {
>   allowSnapshotOverwrites?: boolean | null,
>   versionPolicy?: string | null
> } | null
> ```

> [accordion] vulnerabilityScanningConfig full type
>
> ```ts theme={null}
> {
>   lastEnableTime?: string | null,
>   enablementState?: string | null,
>   enablementConfig?: string | null,
>   enablementStateReason?: string | null
> } | null
> ```

> [accordion] platformLogsConfig full type
>
> ```ts theme={null}
> {
>   severityLevel?: string | null,
>   loggingState?: string | null
> } | null
> ```

***

### locations.repositories.getIamPolicy

`artifactRegistry.locations.repositories.getIamPolicy`

Gets the IAM policy for a given resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.getIamPolicy({ resource: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     location?: string | null,
>     description?: string | null,
>     title?: string | null,
>     expression?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### locations.repositories.goModules.upload

`artifactRegistry.locations.repositories.goModules.upload`

Directly uploads a Go module. The returned Operation will complete once the Go module is uploaded; pass the bytes in `file` (body fields go up with them in one multipart request)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.goModules.upload({
	parent: 'projects/demo-project/locations/us-central1/repositories/go',
	file: { url: 'https://proxy.golang.org/github.com/google/uuid/@v/v1.6.0.zip', filename: 'v1.6.0.zip', contentType: 'application/zip' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the repository where the Go module will be uploaded. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `body` | `object` | No | The request to upload a Go module. |
| `file` | `string \| object \| custom` | Yes | The bytes to upload (a URL, `{ base64 }` or a Blob). Body fields sent with it go up in the same multipart request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `object \| null` | No | This resource represents a long-running operation that is the result of a network API call. |

> [accordion] operation full type
>
> ```ts theme={null}
> {
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   response?: Record<string, any> | null,
>   done?: boolean | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null
> } | null
> ```

***

### locations.repositories.googetArtifacts.import

`artifactRegistry.locations.repositories.googetArtifacts.import`

Imports GooGet artifacts. The returned Operation will complete once the resources are imported

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.googetArtifacts.import({
	parent: 'projects/demo-project/locations/us-central1/repositories/windows',
	gcsSource: {
		uris: ['gs://demo-bucket/hello.x86_64.1.0.0@1.goo'],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the parent resource where the artifacts will be imported. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `gcsSource` | `object` | No | Google Cloud Storage location where the artifacts currently reside. |

> [accordion] gcsSource full type
>
> ```ts theme={null}
> {
>   useWildcards?: boolean,
>   uris?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.googetArtifacts.upload

`artifactRegistry.locations.repositories.googetArtifacts.upload`

Directly uploads a GooGet artifact. The returned Operation will complete once the resources are uploaded; pass the bytes in `file` (body fields go up with them in one multipart request)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.googetArtifacts.upload({
	parent: 'projects/demo-project/locations/us-central1/repositories/windows',
	file: { url: 'https://packages.cloud.google.com/yuck/pool/google-compute-engine-stable/9fe501b2314644ec972217b4530f4c06b2548026af0ad984c42b0ea08d849942-certgen-x86_64-20261005.00.0@1.goo', filename: 'certgen.x86_64.20261005.00.0@1.goo', contentType: 'application/octet-stream' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the parent resource where the artifacts will be uploaded. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `body` | `object` | No | The request to upload an artifact. |
| `file` | `string \| object \| custom` | Yes | The bytes to upload (a URL, `{ base64 }` or a Blob). Body fields sent with it go up in the same multipart request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `object \| null` | No | This resource represents a long-running operation that is the result of a network API call. |

> [accordion] operation full type
>
> ```ts theme={null}
> {
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   response?: Record<string, any> | null,
>   done?: boolean | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null
> } | null
> ```

***

### locations.repositories.kfpArtifacts.upload

`artifactRegistry.locations.repositories.kfpArtifacts.upload`

Directly uploads a KFP artifact. The returned Operation will complete once the resource is uploaded; pass the bytes in `file` (body fields go up with them in one multipart request)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.kfpArtifacts.upload({
	parent: 'projects/demo-project/locations/us-central1/repositories/pipelines',
	file: { url: 'https://raw.githubusercontent.com/kubeflow/pipelines/2.0.0/sdk/python/test_data/pipelines/pipeline_in_pipeline.yaml', filename: 'pipeline.yaml', contentType: 'application/yaml' },
	tags: ['latest'],
	description: 'Training pipeline',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the repository where the KFP artifact will be uploaded. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `tags` | `string[]` | No | Tags to be created with the version. |
| `description` | `string` | No | Description of the package version. |
| `file` | `string \| object \| custom` | Yes | The bytes to upload (a URL, `{ base64 }` or a Blob). Body fields sent with it go up in the same multipart request. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `object \| null` | No | This resource represents a long-running operation that is the result of a network API call. |

> [accordion] operation full type
>
> ```ts theme={null}
> {
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   response?: Record<string, any> | null,
>   done?: boolean | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null
> } | null
> ```

***

### locations.repositories.list

`artifactRegistry.locations.repositories.list`

Lists repositories (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |
| `parent` | `string` | Yes | Required. The name of the parent resource whose repositories will be listed. Format: `projects/<id>/locations/<id>`. |
| `filter` | `string` | No | Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: \* `name` Examples of using a filter: To filter the results of your request to repositories with the name `my-repo` in project `my-project` in the `us-central` region, append the following filter expression to your request: \* `name="projects/my-project/locations/us-central1/repositories/my-repo"` You can also use wildcards to match any number of characters before or after the value: \* `name="projects/my-project/locations/us-central1/repositories/my-*"` \*… |
| `pageSize` | `number` | No | The maximum number of repositories to return. Maximum page size is 1,000. |
| `orderBy` | `string` | No | Optional. The field to order the results by. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of repositories, or empty if there are no more repositories to return. |
| `repositories` | `object[] \| null` | No | The repositories returned. |

> [accordion] repositories full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   virtualRepositoryConfig?: {
>     upstreamPolicies?: {
>       id?: string | null,
>       repository?: string | null,
>       priority?: number | null
>     }[] | null
>   } | null,
>   dockerConfig?: {
>     immutableTags?: boolean | null
>   } | null,
>   format?: string | null,
>   name?: string | null,
>   remoteRepositoryConfig?: {
>     description?: string | null,
>     pythonRepository?: {
>       publicRepository?: string | null,
>       customRepository?: {
>         uri?: string | null
>       } | null
>     } | null,
>     npmRepository?: {
>       publicRepository?: string | null,
>       customRepository?: {
>         uri?: string | null
>       } | null
>     } | null,
>     upstreamCredentials?: {
>       usernamePasswordCredentials?: {
>         username?: string | null,
>         passwordSecretVersion?: string | null
>       } | null
>     } | null,
>     commonRepository?: {
>       uri?: string | null
>     } | null,
>     disableUpstreamValidation?: boolean | null,
>     aptRepository?: {
>       publicRepository?: {
>         repositoryBase?: string | null,
>         repositoryPath?: string | null
>       } | null,
>       customRepository?: {
>         uri?: string | null
>       } | null
>     } | null,
>     noCache?: {
>     } | null,
>     yumRepository?: {
>       publicRepository?: {
>         repositoryBase?: string | null,
>         repositoryPath?: string | null
>       } | null,
>       customRepository?: {
>         uri?: string | null
>       } | null
>     } | null,
>     mavenRepository?: {
>       publicRepository?: string | null,
>       customRepository?: {
>         uri?: string | null
>       } | null
>     } | null,
>     dockerRepository?: {
>       publicRepository?: string | null,
>       customRepository?: {
>         uri?: string | null
>       } | null
>     } | null
>   } | null,
>   satisfiesPzi?: boolean | null,
>   sizeBytes?: string | number | null,
>   createTime?: string | null,
>   updateTime?: string | null,
>   kmsKeyName?: string | null,
>   mode?: string | null,
>   cleanupPolicyDryRun?: boolean | null,
>   cleanupPolicies?: Record<string, {
>     mostRecentVersions?: {
>       keepCount?: number | null,
>       packageNamePrefixes?: string[] | null
>     } | null,
>     id?: string | null,
>     condition?: {
>       olderThan?: string | null,
>       packageNamePrefixes?: string[] | null,
>       newerThan?: string | null,
>       tagState?: string | null,
>       tagPrefixes?: string[] | null,
>       versionNamePrefixes?: string[] | null
>     } | null,
>     action?: string | null
>   }> | null,
>   registryUri?: string | null,
>   disallowUnspecifiedMode?: boolean | null,
>   mavenConfig?: {
>     allowSnapshotOverwrites?: boolean | null,
>     versionPolicy?: string | null
>   } | null,
>   vulnerabilityScanningConfig?: {
>     lastEnableTime?: string | null,
>     enablementState?: string | null,
>     enablementConfig?: string | null,
>     enablementStateReason?: string | null
>   } | null,
>   platformLogsConfig?: {
>     severityLevel?: string | null,
>     loggingState?: string | null
>   } | null,
>   satisfiesPzs?: boolean | null,
>   labels?: Record<string, string> | null
> }[] | null
> ```

***

### locations.repositories.mavenArtifacts.get

`artifactRegistry.locations.repositories.mavenArtifacts.get`

Gets a maven artifact

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.mavenArtifacts.get({ name: 'projects/demo-project/locations/us-central1/repositories/maven/mavenArtifacts/com.example:app:1.2.0' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the maven artifact. Format: `projects/<id>/locations/<id>/repositories/<id>/mavenArtifacts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pomUri` | `string \| null` | No | Required. URL to access the pom file of the artifact. Example: us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom |
| `groupId` | `string \| null` | No | Group ID for the artifact. Example: com.google.guava |
| `name` | `string \| null` | No | Required. registry\_location, project\_id, repository\_name and maven\_artifact forms a unique artifact For example, "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ com.google.guava:guava:31.0-jre", where "us-west4" is the registry\_location, "test-project" is the project\_id, "test-repo" is the repository\_name and "com.google.guava:guava:31.0-jre" is the maven artifact. |
| `artifactId` | `string \| null` | No | Artifact ID for the artifact. |
| `updateTime` | `string \| null` | No | Output only. Time the artifact was updated. |
| `version` | `string \| null` | No | Version of this artifact. |
| `createTime` | `string \| null` | No | Output only. Time the artifact was created. |

***

### locations.repositories.mavenArtifacts.list

`artifactRegistry.locations.repositories.mavenArtifacts.list`

Lists maven artifacts (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.mavenArtifacts.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the parent resource whose maven artifacts will be listed. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `pageSize` | `number` | No | The maximum number of artifacts to return. Maximum page size is 1,000. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `mavenArtifacts` | `object[] \| null` | No | The maven artifacts returned. |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of artifacts, or empty if there are no more artifacts to return. |

> [accordion] mavenArtifacts full type
>
> ```ts theme={null}
> {
>   pomUri?: string | null,
>   groupId?: string | null,
>   name?: string | null,
>   artifactId?: string | null,
>   updateTime?: string | null,
>   version?: string | null,
>   createTime?: string | null
> }[] | null
> ```

***

### locations.repositories.npmPackages.get

`artifactRegistry.locations.repositories.npmPackages.get`

Gets a npm package

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.npmPackages.get({ name: 'projects/demo-project/locations/us-central1/repositories/npm/npmPackages/app:1.2.0' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the npm package. Format: `projects/<id>/locations/<id>/repositories/<id>/npmPackages/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `string \| null` | No | Version of this package. |
| `createTime` | `string \| null` | No | Output only. Time the package was created. |
| `tags` | `string[] \| null` | No | Tags attached to this package. |
| `packageName` | `string \| null` | No | Package for the artifact. |
| `updateTime` | `string \| null` | No | Output only. Time the package was updated. |
| `name` | `string \| null` | No | Required. registry\_location, project\_id, repository\_name and npm\_package forms a unique package For example, "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ npm\_test:1.0.0", where "us-west4" is the registry\_location, "test-project" is the project\_id, "test-repo" is the repository\_name and npm\_test:1.0.0" is the npm package. |

***

### locations.repositories.npmPackages.list

`artifactRegistry.locations.repositories.npmPackages.list`

Lists npm packages (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.npmPackages.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the parent resource whose npm packages will be listed. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |
| `pageSize` | `number` | No | The maximum number of artifacts to return. Maximum page size is 1,000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of artifacts, or empty if there are no more artifacts to return. |
| `npmPackages` | `object[] \| null` | No | The npm packages returned. |

> [accordion] npmPackages full type
>
> ```ts theme={null}
> {
>   version?: string | null,
>   createTime?: string | null,
>   tags?: string[] | null,
>   packageName?: string | null,
>   updateTime?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.repositories.packages.delete

`artifactRegistry.locations.repositories.packages.delete`

Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.delete({ name: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the package to delete. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.packages.get

`artifactRegistry.locations.repositories.packages.get`

Gets a package

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.get({ name: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the package to retrieve. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | The time when the package was last updated. This includes publishing a new version of the package. |
| `name` | `string \| null` | No | The name of the package, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the package ID part contains slashes, the slashes are escaped. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Client specified annotations. |
| `createTime` | `string \| null` | No | The time when the package was created. |
| `displayName` | `string \| null` | No | The display name of the package. |

***

### locations.repositories.packages.list

`artifactRegistry.locations.repositories.packages.list`

Lists packages (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | Optional. The field to order the results by. |
| `parent` | `string` | Yes | Required. The name of the parent resource whose packages will be listed. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `filter` | `string` | No | Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: \* `name` \* `annotations` Examples of using a filter: To filter the results of your request to packages with the name `my-package` in project `my-project` in the `us-central` region, in repository `my-repo`, append the following filter expression to your request: \* `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` You can also use wildcards to match any number of characters before or after the value: \*… |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |
| `pageSize` | `number` | No | The maximum number of packages to return. Maximum page size is 1,000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packages` | `object[] \| null` | No | The packages returned. |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of packages, or empty if there are no more packages to return. |

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   name?: string | null,
>   annotations?: Record<string, string> | null,
>   createTime?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### locations.repositories.packages.patch

`artifactRegistry.locations.repositories.packages.patch`

Updates a package

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.patch({ name: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the package, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the package ID part contains slashes, the slashes are escaped. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>`. |
| `updateMask` | `string` | No | The update mask applies to the resource. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `updateTime` | `string` | No | The time when the package was last updated. This includes publishing a new version of the package. |
| `body_name` | `string` | No | The name of the package, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the package ID part contains slashes, the slashes are escaped. |
| `annotations` | `Record<string, string>` | No | Optional. Client specified annotations. |
| `createTime` | `string` | No | The time when the package was created. |
| `displayName` | `string` | No | The display name of the package. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | The time when the package was last updated. This includes publishing a new version of the package. |
| `name` | `string \| null` | No | The name of the package, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the package ID part contains slashes, the slashes are escaped. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Client specified annotations. |
| `createTime` | `string \| null` | No | The time when the package was created. |
| `displayName` | `string \| null` | No | The display name of the package. |

***

### locations.repositories.packages.tags.create

`artifactRegistry.locations.repositories.packages.tags.create`

Creates a tag

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.tags.create({ parent: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api', tagId: 'v1', version: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/versions/sha256:abc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the parent resource where the tag will be created. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>`. |
| `tagId` | `string` | No | The tag id to use for this repository. |
| `version` | `string` | No | The name of the version the tag refers to, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` If the package or version ID parts contain slashes, the slashes are escaped. |
| `name` | `string` | No | The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in \[a-zA-Z0-9\\-.\_\~:@], anything else must be URL encoded. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `string \| null` | No | The name of the version the tag refers to, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` If the package or version ID parts contain slashes, the slashes are escaped. |
| `name` | `string \| null` | No | The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in \[a-zA-Z0-9\\-.\_\~:@], anything else must be URL encoded. |

***

### locations.repositories.packages.tags.delete

`artifactRegistry.locations.repositories.packages.tags.delete`

Deletes a tag

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.tags.delete({ name: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/tags/v1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the tag to delete. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>/tags/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.repositories.packages.tags.get

`artifactRegistry.locations.repositories.packages.tags.get`

Gets a tag

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.tags.get({ name: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/tags/v1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the tag to retrieve. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>/tags/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `string \| null` | No | The name of the version the tag refers to, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` If the package or version ID parts contain slashes, the slashes are escaped. |
| `name` | `string \| null` | No | The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in \[a-zA-Z0-9\\-.\_\~:@], anything else must be URL encoded. |

***

### locations.repositories.packages.tags.list

`artifactRegistry.locations.repositories.packages.tags.list`

Lists tags (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.tags.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the parent package whose tags will be listed. For example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>`. |
| `filter` | `string` | No | An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: \* `name` \* `version` Examples of using a filter: To filter the results of your request to tags with the name `my-tag` in package `my-package` in repository `my-repo` in project "`y-project` in the us-central region, append the following filter expression to your request: \* `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` You can also use wildcards to match any number of characters before or after the value: \*… |
| `pageSize` | `number` | No | The maximum number of tags to return. Maximum page size is 1,000. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of tags, or empty if there are no more tags to return. |
| `tags` | `object[] \| null` | No | The tags returned. |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   version?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.repositories.packages.tags.patch

`artifactRegistry.locations.repositories.packages.tags.patch`

Updates a tag

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.tags.patch({ name: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/tags/v1', updateMask: 'version', version: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/versions/sha256:abc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in \[a-zA-Z0-9\\-.\_\~:@], anything else must be URL encoded. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>/tags/<id>`. |
| `updateMask` | `string` | No | The update mask applies to the resource. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `version` | `string` | No | The name of the version the tag refers to, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` If the package or version ID parts contain slashes, the slashes are escaped. |
| `body_name` | `string` | No | The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in \[a-zA-Z0-9\\-.\_\~:@], anything else must be URL encoded. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `string \| null` | No | The name of the version the tag refers to, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` If the package or version ID parts contain slashes, the slashes are escaped. |
| `name` | `string \| null` | No | The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in \[a-zA-Z0-9\\-.\_\~:@], anything else must be URL encoded. |

***

### locations.repositories.packages.versions.batchDelete

`artifactRegistry.locations.repositories.packages.versions.batchDelete`

Deletes multiple versions across a repository. The returned operation will complete once the versions have been deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.versions.batchDelete({
	parent: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api',
	names: ['projects/demo-project/locations/us-central1/repositories/docker/packages/api/versions/sha256:abc'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the repository holding all requested versions. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>`. |
| `names` | `string[]` | No | Required. The names of the versions to delete. The maximum number of versions deleted per batch is determined by the service and is dependent on the available resources in the region. |
| `validateOnly` | `boolean` | No | If true, the request is performed without deleting data, following AIP-163. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.packages.versions.delete

`artifactRegistry.locations.repositories.packages.versions.delete`

Deletes a version and all of its content. The returned operation will complete once the version has been deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.versions.delete({ name: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/versions/latest' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the version to delete. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>/versions/<id>`. |
| `force` | `boolean` | No | By default, a version that is tagged may not be deleted. If force=true, the version and any tags pointing to the version are deleted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.packages.versions.get

`artifactRegistry.locations.repositories.packages.versions.get`

Gets a version

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.versions.get({ name: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/versions/latest' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the version to retrieve. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>/versions/<id>`. |
| `view` | `VERSION_VIEW_UNSPECIFIED \| BASIC \| FULL` | No | The view that should be returned in the response. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | The time when the version was last updated. |
| `description` | `string \| null` | No | Optional. Description of the version, as specified in its metadata. |
| `fingerprints` | `object[] \| null` | No | Output only. Immutable reference for the version, calculated based on the version's content. Currently we only support dirsum\_sha256 hash algorithm. Additional hash algorithms may be added in the future. |
| `metadata` | `Record<string, any> \| null` | No | Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the resources could be: DockerImage MavenArtifact |
| `name` | `string \| null` | No | The name of the version, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. If the package or version ID parts contain slashes, the slashes are escaped. |
| `relatedTags` | `object[] \| null` | No | Output only. A list of related tags. Will contain up to 100 tags that reference this version. |
| `createTime` | `string \| null` | No | The time when the version was created. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Client specified annotations. |

> [accordion] fingerprints full type
>
> ```ts theme={null}
> {
>   value?: string | null,
>   type?: string | null
> }[] | null
> ```

> [accordion] relatedTags full type
>
> ```ts theme={null}
> {
>   version?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.repositories.packages.versions.list

`artifactRegistry.locations.repositories.packages.versions.list`

Lists versions (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.versions.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of versions to return. Maximum page size is 1,000. |
| `orderBy` | `string` | No | Optional. The field to order the results by. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |
| `view` | `VERSION_VIEW_UNSPECIFIED \| BASIC \| FULL` | No | The view that should be returned in the response. |
| `parent` | `string` | Yes | The name of the parent resource whose versions will be listed. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>`. |
| `filter` | `string` | No | Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: \* `name` \* `annotations` Examples of using a filter: To filter the results of your request to versions with the name `my-version` in project `my-project` in the `us-central` region, in repository `my-repo`, append the following filter expression to your request: \* `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` You can also use wildcards to match any number of characters before or after the… |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `versions` | `object[] \| null` | No | The versions returned. |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of versions, or empty if there are no more versions to return. |

> [accordion] versions full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   description?: string | null,
>   fingerprints?: {
>     value?: string | null,
>     type?: string | null
>   }[] | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   relatedTags?: {
>     version?: string | null,
>     name?: string | null
>   }[] | null,
>   createTime?: string | null,
>   annotations?: Record<string, string> | null
> }[] | null
> ```

***

### locations.repositories.packages.versions.patch

`artifactRegistry.locations.repositories.packages.versions.patch`

Updates a version

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.packages.versions.patch({ name: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/versions/latest', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | The update mask applies to the resource. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `name` | `string` | Yes | The name of the version, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. If the package or version ID parts contain slashes, the slashes are escaped. Format: `projects/<id>/locations/<id>/repositories/<id>/packages/<id>/versions/<id>`. |
| `updateTime` | `string` | No | The time when the version was last updated. |
| `description` | `string` | No | Optional. Description of the version, as specified in its metadata. |
| `body_name` | `string` | No | The name of the version, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. If the package or version ID parts contain slashes, the slashes are escaped. |
| `relatedTags` | `object[]` | No | Output only. A list of related tags. Will contain up to 100 tags that reference this version. |
| `createTime` | `string` | No | The time when the version was created. |
| `annotations` | `Record<string, string>` | No | Optional. Client specified annotations. |

> [accordion] relatedTags full type
>
> ```ts theme={null}
> {
>   version?: string,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | The time when the version was last updated. |
| `description` | `string \| null` | No | Optional. Description of the version, as specified in its metadata. |
| `fingerprints` | `object[] \| null` | No | Output only. Immutable reference for the version, calculated based on the version's content. Currently we only support dirsum\_sha256 hash algorithm. Additional hash algorithms may be added in the future. |
| `metadata` | `Record<string, any> \| null` | No | Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the resources could be: DockerImage MavenArtifact |
| `name` | `string \| null` | No | The name of the version, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. If the package or version ID parts contain slashes, the slashes are escaped. |
| `relatedTags` | `object[] \| null` | No | Output only. A list of related tags. Will contain up to 100 tags that reference this version. |
| `createTime` | `string \| null` | No | The time when the version was created. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Client specified annotations. |

> [accordion] fingerprints full type
>
> ```ts theme={null}
> {
>   value?: string | null,
>   type?: string | null
> }[] | null
> ```

> [accordion] relatedTags full type
>
> ```ts theme={null}
> {
>   version?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.repositories.patch

`artifactRegistry.locations.repositories.patch`

Updates a repository

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.patch({ name: 'projects/demo-project/locations/us-central1/repositories/docker', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. For each location in a project, repository names must be unique. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `updateMask` | `string` | No | The update mask applies to the resource. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `description` | `string` | No | The user-provided description of the repository. |
| `virtualRepositoryConfig` | `object` | No | Virtual repository configuration. |
| `dockerConfig` | `object` | No | DockerRepositoryConfig is docker related repository details. Provides additional configuration details for repositories of the docker format type. |
| `format` | `FORMAT_UNSPECIFIED \| DOCKER \| MAVEN \| NPM \| APT \| YUM \| GOOGET \| PYTHON \| KFP \| GO \| GENERIC \| RUBY \| CONDA` | No | Optional. The format of packages that are stored in the repository. |
| `body_name` | `string` | No | The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. For each location in a project, repository names must be unique. |
| `remoteRepositoryConfig` | `object` | No | Remote repository configuration. |
| `kmsKeyName` | `string` | No | The Cloud KMS resource name of the customer managed encryption key that's used to encrypt the contents of the Repository. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. This value may not be changed after the Repository has been created. |
| `mode` | `MODE_UNSPECIFIED \| STANDARD_REPOSITORY \| VIRTUAL_REPOSITORY \| REMOTE_REPOSITORY \| AOSS_REPOSITORY \| ASSURED_OSS_REPOSITORY` | No | Optional. The mode of the repository. |
| `cleanupPolicyDryRun` | `boolean` | No | Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. |
| `cleanupPolicies` | `object` | No | Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. |
| `disallowUnspecifiedMode` | `boolean` | No | Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard. |
| `mavenConfig` | `object` | No | MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. |
| `vulnerabilityScanningConfig` | `object` | No | Config on whether to perform vulnerability scanning for resources in this repository, as well as output fields describing current state. |
| `platformLogsConfig` | `object` | No | The platform logs config for a project or a repository. |
| `labels` | `Record<string, string>` | No | Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes. |

> [accordion] virtualRepositoryConfig full type
>
> ```ts theme={null}
> {
>   upstreamPolicies?: {
>     id?: string,
>     repository?: string,
>     priority?: number
>   }[]
> }
> ```

> [accordion] dockerConfig full type
>
> ```ts theme={null}
> {
>   immutableTags?: boolean
> }
> ```

> [accordion] remoteRepositoryConfig full type
>
> ```ts theme={null}
> {
>   description?: string,
>   pythonRepository?: {
>     publicRepository?: PUBLIC_REPOSITORY_UNSPECIFIED | PYPI,
>     customRepository?: {
>       uri?: string
>     }
>   },
>   npmRepository?: {
>     publicRepository?: PUBLIC_REPOSITORY_UNSPECIFIED | NPMJS,
>     customRepository?: {
>       uri?: string
>     }
>   },
>   upstreamCredentials?: {
>     usernamePasswordCredentials?: {
>       username?: string,
>       passwordSecretVersion?: string
>     }
>   },
>   commonRepository?: {
>     uri?: string
>   },
>   disableUpstreamValidation?: boolean,
>   aptRepository?: {
>     publicRepository?: {
>       repositoryBase?: REPOSITORY_BASE_UNSPECIFIED | DEBIAN | UBUNTU | DEBIAN_SNAPSHOT,
>       repositoryPath?: string
>     },
>     customRepository?: {
>       uri?: string
>     }
>   },
>   noCache?: {
>   },
>   yumRepository?: {
>     publicRepository?: {
>       repositoryBase?: REPOSITORY_BASE_UNSPECIFIED | CENTOS | CENTOS_DEBUG | CENTOS_VAULT | CENTOS_STREAM | ROCKY | EPEL,
>       repositoryPath?: string
>     },
>     customRepository?: {
>       uri?: string
>     }
>   },
>   mavenRepository?: {
>     publicRepository?: PUBLIC_REPOSITORY_UNSPECIFIED | MAVEN_CENTRAL,
>     customRepository?: {
>       uri?: string
>     }
>   },
>   dockerRepository?: {
>     publicRepository?: PUBLIC_REPOSITORY_UNSPECIFIED | DOCKER_HUB,
>     customRepository?: {
>       uri?: string
>     }
>   }
> }
> ```

> [accordion] cleanupPolicies full type
>
> ```ts theme={null}
> Record<string, {
>   mostRecentVersions?: {
>     keepCount?: number,
>     packageNamePrefixes?: string[]
>   },
>   id?: string,
>   condition?: {
>     olderThan?: string,
>     packageNamePrefixes?: string[],
>     newerThan?: string,
>     tagState?: TAG_STATE_UNSPECIFIED | TAGGED | UNTAGGED | ANY,
>     tagPrefixes?: string[],
>     versionNamePrefixes?: string[]
>   },
>   action?: ACTION_UNSPECIFIED | DELETE | KEEP
> }>
> ```

> [accordion] mavenConfig full type
>
> ```ts theme={null}
> {
>   allowSnapshotOverwrites?: boolean,
>   versionPolicy?: VERSION_POLICY_UNSPECIFIED | RELEASE | SNAPSHOT
> }
> ```

> [accordion] vulnerabilityScanningConfig full type
>
> ```ts theme={null}
> {
>   enablementConfig?: ENABLEMENT_CONFIG_UNSPECIFIED | INHERITED | DISABLED
> }
> ```

> [accordion] platformLogsConfig full type
>
> ```ts theme={null}
> {
>   severityLevel?: SEVERITY_LEVEL_UNSPECIFIED | DEBUG | INFO | NOTICE | WARNING | ERROR | CRITICAL | ALERT | EMERGENCY,
>   loggingState?: LOGGING_STATE_UNSPECIFIED | ENABLED | DISABLED
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | The user-provided description of the repository. |
| `virtualRepositoryConfig` | `object \| null` | No | Virtual repository configuration. |
| `dockerConfig` | `object \| null` | No | DockerRepositoryConfig is docker related repository details. Provides additional configuration details for repositories of the docker format type. |
| `format` | `string \| null` | No | Optional. The format of packages that are stored in the repository. |
| `name` | `string \| null` | No | The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. For each location in a project, repository names must be unique. |
| `remoteRepositoryConfig` | `object \| null` | No | Remote repository configuration. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. Whether or not this repository satisfies PZI. |
| `sizeBytes` | `string \| number \| null` | No | Output only. The size, in bytes, of all artifact storage in this repository. Repositories that are generally available or in public preview use this to calculate storage costs. |
| `createTime` | `string \| null` | No | Output only. The time when the repository was created. |
| `updateTime` | `string \| null` | No | Output only. The time when the repository was last updated. |
| `kmsKeyName` | `string \| null` | No | The Cloud KMS resource name of the customer managed encryption key that's used to encrypt the contents of the Repository. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. This value may not be changed after the Repository has been created. |
| `mode` | `string \| null` | No | Optional. The mode of the repository. |
| `cleanupPolicyDryRun` | `boolean \| null` | No | Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. |
| `cleanupPolicies` | `object \| null` | No | Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. |
| `registryUri` | `string \| null` | No | Output only. The repository endpoint, for example: `us-docker.pkg.dev/my-proj/my-repo`. |
| `disallowUnspecifiedMode` | `boolean \| null` | No | Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard. |
| `mavenConfig` | `object \| null` | No | MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. |
| `vulnerabilityScanningConfig` | `object \| null` | No | Config on whether to perform vulnerability scanning for resources in this repository, as well as output fields describing current state. |
| `platformLogsConfig` | `object \| null` | No | The platform logs config for a project or a repository. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Whether or not this repository satisfies PZS. |
| `labels` | `Record<string, string> \| null` | No | Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes. |

> [accordion] virtualRepositoryConfig full type
>
> ```ts theme={null}
> {
>   upstreamPolicies?: {
>     id?: string | null,
>     repository?: string | null,
>     priority?: number | null
>   }[] | null
> } | null
> ```

> [accordion] dockerConfig full type
>
> ```ts theme={null}
> {
>   immutableTags?: boolean | null
> } | null
> ```

> [accordion] remoteRepositoryConfig full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   pythonRepository?: {
>     publicRepository?: string | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   npmRepository?: {
>     publicRepository?: string | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   upstreamCredentials?: {
>     usernamePasswordCredentials?: {
>       username?: string | null,
>       passwordSecretVersion?: string | null
>     } | null
>   } | null,
>   commonRepository?: {
>     uri?: string | null
>   } | null,
>   disableUpstreamValidation?: boolean | null,
>   aptRepository?: {
>     publicRepository?: {
>       repositoryBase?: string | null,
>       repositoryPath?: string | null
>     } | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   noCache?: {
>   } | null,
>   yumRepository?: {
>     publicRepository?: {
>       repositoryBase?: string | null,
>       repositoryPath?: string | null
>     } | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   mavenRepository?: {
>     publicRepository?: string | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null,
>   dockerRepository?: {
>     publicRepository?: string | null,
>     customRepository?: {
>       uri?: string | null
>     } | null
>   } | null
> } | null
> ```

> [accordion] cleanupPolicies full type
>
> ```ts theme={null}
> Record<string, {
>   mostRecentVersions?: {
>     keepCount?: number | null,
>     packageNamePrefixes?: string[] | null
>   } | null,
>   id?: string | null,
>   condition?: {
>     olderThan?: string | null,
>     packageNamePrefixes?: string[] | null,
>     newerThan?: string | null,
>     tagState?: string | null,
>     tagPrefixes?: string[] | null,
>     versionNamePrefixes?: string[] | null
>   } | null,
>   action?: string | null
> }> | null
> ```

> [accordion] mavenConfig full type
>
> ```ts theme={null}
> {
>   allowSnapshotOverwrites?: boolean | null,
>   versionPolicy?: string | null
> } | null
> ```

> [accordion] vulnerabilityScanningConfig full type
>
> ```ts theme={null}
> {
>   lastEnableTime?: string | null,
>   enablementState?: string | null,
>   enablementConfig?: string | null,
>   enablementStateReason?: string | null
> } | null
> ```

> [accordion] platformLogsConfig full type
>
> ```ts theme={null}
> {
>   severityLevel?: string | null,
>   loggingState?: string | null
> } | null
> ```

***

### locations.repositories.prewarmArtifact

`artifactRegistry.locations.repositories.prewarmArtifact`

Prewarms an artifact for streaming

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.prewarmArtifact({ repository: 'projects/demo-project/locations/us-central1/repositories/docker', tag: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/tags/v1', retentionDays: 7 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `repository` | `string` | Yes | Required. The repository name, for example: `projects/p1/locations/us-central1/repositories/repo1`. If the package or version ID parts contain slashes, the slashes are escaped. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `platform` | `object` | No | The platform (architecture and OS) of the image. This is a sub-message. |
| `force` | `boolean` | No | Optional. If true, old artifact will be evicted to make room for the new artifact. |
| `streamLocation` | `string` | No | Optional. The location to cache the artifact in. If not specified, the artifact will be cached in the same location as the artifact. multi-region is not supported for this field. |
| `version` | `string` | No | Optional. The artifact version Format: projects/\{project}/locations/\{location}/repositories/\{repository}/packages/\{package}/versions/\{version} |
| `tag` | `string` | No | Optional. The artifact tag Format:projects/\{project}/locations/\{location}/repositories/\{repository}/packages/\{package}/tags/\{tag} |
| `retentionDays` | `string \| number` | No | Optional. The retention days of the prewarmed artifact. If not specified, the artifact will be cached for 3 days. |

> [accordion] platform full type
>
> ```ts theme={null}
> {
>   architecture?: string,
>   os?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.prewarmedArtifacts.list

`artifactRegistry.locations.repositories.prewarmedArtifacts.list`

Lists all streamed artifacts in a repository (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.prewarmedArtifacts.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. The next\_page\_token value returned from a previous list request, if any. |
| `parent` | `string` | Yes | Required. The repository of the artifact to list. Format: projects/\{project}/locations/\{location}/repositories/\{repository} Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `filter` | `string` | No | Optional. Filter should only support The location of the prewarmed artifacts. multi-region is not supported for this field. |
| `pageSize` | `number` | No | Optional. The maximum number of prewarmed artifacts to return. Maximum page size is 1,000. Default page size is 100. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `prewarmedArtifacts` | `object[] \| null` | No | The prewarmed artifacts. |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of prewarmed artifacts, or empty if there are no more streamings to return. |

> [accordion] prewarmedArtifacts full type
>
> ```ts theme={null}
> {
>   expirationTime?: string | null,
>   uri?: string | null,
>   errorMessage?: string | null,
>   location?: string | null,
>   state?: string | null,
>   createTime?: string | null,
>   sizeBytes?: string | number | null
> }[] | null
> ```

***

### locations.repositories.pythonPackages.get

`artifactRegistry.locations.repositories.pythonPackages.get`

Gets a python package

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.pythonPackages.get({ name: 'projects/demo-project/locations/us-central1/repositories/python/pythonPackages/app@1.2.0' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the python package. Format: `projects/<id>/locations/<id>/repositories/<id>/pythonPackages/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packageName` | `string \| null` | No | Package for the artifact. |
| `updateTime` | `string \| null` | No | Output only. Time the package was updated. |
| `createTime` | `string \| null` | No | Output only. Time the package was created. |
| `name` | `string \| null` | No | Required. registry\_location, project\_id, repository\_name and python\_package forms a unique package name:`projects//locations//repository//pythonPackages/`. For example, "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ python\_package:1.0.0", where "us-west4" is the registry\_location, "test-project" is the project\_id, "test-repo" is the repository\_name and python\_package:1.0.0" is the python package. |
| `version` | `string \| null` | No | Version of this package. |
| `uri` | `string \| null` | No | Required. URL to access the package. Example: us-west4-python.pkg.dev/test-project/test-repo/python\_package/file-name-1.0.0.tar.gz |

***

### locations.repositories.pythonPackages.list

`artifactRegistry.locations.repositories.pythonPackages.list`

Lists python packages (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.pythonPackages.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the parent resource whose python packages will be listed. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |
| `pageSize` | `number` | No | The maximum number of artifacts to return. Maximum page size is 1,000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pythonPackages` | `object[] \| null` | No | The python packages returned. |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of artifacts, or empty if there are no more artifacts to return. |

> [accordion] pythonPackages full type
>
> ```ts theme={null}
> {
>   packageName?: string | null,
>   updateTime?: string | null,
>   createTime?: string | null,
>   name?: string | null,
>   version?: string | null,
>   uri?: string | null
> }[] | null
> ```

***

### locations.repositories.removePrewarmedArtifact

`artifactRegistry.locations.repositories.removePrewarmedArtifact`

Removes an artifact from streaming

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.removePrewarmedArtifact({ repository: 'projects/demo-project/locations/us-central1/repositories/docker', tag: 'projects/demo-project/locations/us-central1/repositories/docker/packages/api/tags/v1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `repository` | `string` | Yes | Required. The repository name, for example: `projects/p1/locations/us-central1/repositories/repo1`. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `version` | `string` | No | Optional. The artifact version Format: projects/\{project}/locations/\{location}/repositories/\{repository}/packages/\{package}/versions/\{version} |
| `streamLocation` | `string` | No | Optional. The location of the prewarmed artifact. multi-region is not supported for this field. |
| `tag` | `string` | No | Optional. The artifact tag Format:projects/\{project}/locations/\{location}/repositories/\{repository}/packages/\{package}/tags/\{tag} |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `prewarmedArtifact` | `object \| null` | No | PrewarmedArtifact represents a streamed artifact. |

> [accordion] prewarmedArtifact full type
>
> ```ts theme={null}
> {
>   expirationTime?: string | null,
>   uri?: string | null,
>   errorMessage?: string | null,
>   location?: string | null,
>   state?: string | null,
>   createTime?: string | null,
>   sizeBytes?: string | number | null
> } | null
> ```

***

### locations.repositories.rules.create

`artifactRegistry.locations.repositories.rules.create`

Creates a rule

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.rules.create({
	parent: 'projects/demo-project/locations/us-central1/repositories/docker',
	ruleId: 'block-latest',
	action: 'DENY',
	operation: 'DOWNLOAD',
	packageId: 'api',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ruleId` | `string` | No | The rule id to use for this repository. |
| `parent` | `string` | Yes | Required. The name of the parent resource where the rule will be created. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `packageId` | `string` | No | The package ID the rule applies to. If empty, this rule applies to all packages inside the repository. |
| `action` | `ACTION_UNSPECIFIED \| ALLOW \| DENY` | No | The action this rule takes. |
| `operation` | `OPERATION_UNSPECIFIED \| DOWNLOAD` | No | — |
| `name` | `string` | No | The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. |
| `condition` | `object` | No | Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at [https://github.com/google/cel-spec](https://github.com/google/cel-spec). |

> [accordion] condition full type
>
> ```ts theme={null}
> {
>   location?: string,
>   description?: string,
>   title?: string,
>   expression?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packageId` | `string \| null` | No | The package ID the rule applies to. If empty, this rule applies to all packages inside the repository. |
| `action` | `string \| null` | No | The action this rule takes. |
| `operation` | `string \| null` | No | — |
| `name` | `string \| null` | No | The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. |
| `condition` | `object \| null` | No | Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at [https://github.com/google/cel-spec](https://github.com/google/cel-spec). |

> [accordion] condition full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   description?: string | null,
>   title?: string | null,
>   expression?: string | null
> } | null
> ```

***

### locations.repositories.rules.delete

`artifactRegistry.locations.repositories.rules.delete`

Deletes a rule

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.rules.delete({ name: 'projects/demo-project/locations/us-central1/repositories/docker/rules/rule-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the rule to delete. Format: `projects/<id>/locations/<id>/repositories/<id>/rules/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.repositories.rules.get

`artifactRegistry.locations.repositories.rules.get`

Gets a rule

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.rules.get({ name: 'projects/demo-project/locations/us-central1/repositories/docker/rules/rule-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the rule to retrieve. Format: `projects/<id>/locations/<id>/repositories/<id>/rules/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packageId` | `string \| null` | No | The package ID the rule applies to. If empty, this rule applies to all packages inside the repository. |
| `action` | `string \| null` | No | The action this rule takes. |
| `operation` | `string \| null` | No | — |
| `name` | `string \| null` | No | The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. |
| `condition` | `object \| null` | No | Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at [https://github.com/google/cel-spec](https://github.com/google/cel-spec). |

> [accordion] condition full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   description?: string | null,
>   title?: string | null,
>   expression?: string | null
> } | null
> ```

***

### locations.repositories.rules.list

`artifactRegistry.locations.repositories.rules.list`

Lists rules (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.rules.list({ parent: 'projects/demo-project/locations/us-central1/repositories/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the parent repository whose rules will be listed. For example: `projects/p1/locations/us-central1/repositories/repo1`. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `pageSize` | `number` | No | The maximum number of rules to return. Maximum page size is 1,000. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous list request, if any. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rules` | `object[] \| null` | No | The rules returned. |
| `nextPageToken` | `string \| null` | No | The token to retrieve the next page of rules, or empty if there are no more rules to return. |

> [accordion] rules full type
>
> ```ts theme={null}
> {
>   packageId?: string | null,
>   action?: string | null,
>   operation?: string | null,
>   name?: string | null,
>   condition?: {
>     location?: string | null,
>     description?: string | null,
>     title?: string | null,
>     expression?: string | null
>   } | null
> }[] | null
> ```

***

### locations.repositories.rules.patch

`artifactRegistry.locations.repositories.rules.patch`

Updates a rule

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.rules.patch({ name: 'projects/demo-project/locations/us-central1/repositories/docker/rules/rule-1', updateMask: 'action', action: 'ALLOW' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. Format: `projects/<id>/locations/<id>/repositories/<id>/rules/<id>`. |
| `updateMask` | `string` | No | The update mask applies to the resource. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `packageId` | `string` | No | The package ID the rule applies to. If empty, this rule applies to all packages inside the repository. |
| `action` | `ACTION_UNSPECIFIED \| ALLOW \| DENY` | No | The action this rule takes. |
| `operation` | `OPERATION_UNSPECIFIED \| DOWNLOAD` | No | — |
| `body_name` | `string` | No | The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. |
| `condition` | `object` | No | Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at [https://github.com/google/cel-spec](https://github.com/google/cel-spec). |

> [accordion] condition full type
>
> ```ts theme={null}
> {
>   location?: string,
>   description?: string,
>   title?: string,
>   expression?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packageId` | `string \| null` | No | The package ID the rule applies to. If empty, this rule applies to all packages inside the repository. |
| `action` | `string \| null` | No | The action this rule takes. |
| `operation` | `string \| null` | No | — |
| `name` | `string \| null` | No | The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. |
| `condition` | `object \| null` | No | Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at [https://github.com/google/cel-spec](https://github.com/google/cel-spec). |

> [accordion] condition full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   description?: string | null,
>   title?: string | null,
>   expression?: string | null
> } | null
> ```

***

### locations.repositories.setIamPolicy

`artifactRegistry.locations.repositories.setIamPolicy`

Updates the IAM policy for a given resource

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.setIamPolicy({
	resource: 'projects/demo-project/locations/us-central1/repositories/docker',
	policy: {
		bindings: [{
			role: 'roles/artifactregistry.reader',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   etag?: string,
>   bindings?: {
>     condition?: {
>       location?: string,
>       description?: string,
>       title?: string,
>       expression?: string
>     },
>     members?: string[],
>     role?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     location?: string | null,
>     description?: string | null,
>     title?: string | null,
>     expression?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### locations.repositories.testIamPermissions

`artifactRegistry.locations.repositories.testIamPermissions`

Tests if the caller has a list of permissions on a resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.testIamPermissions({
	resource: 'projects/demo-project/locations/us-central1/repositories/docker',
	permissions: ['artifactregistry.repositories.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### locations.repositories.yumArtifacts.import

`artifactRegistry.locations.repositories.yumArtifacts.import`

Imports Yum (RPM) artifacts. The returned Operation will complete once the resources are imported

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.yumArtifacts.import({
	parent: 'projects/demo-project/locations/us-central1/repositories/rpm',
	gcsSource: {
		uris: ['gs://demo-bucket/hello-1.0-1.noarch.rpm'],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the parent resource where the artifacts will be imported. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `gcsSource` | `object` | No | Google Cloud Storage location where the artifacts currently reside. |

> [accordion] gcsSource full type
>
> ```ts theme={null}
> {
>   uris?: string[],
>   useWildcards?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.repositories.yumArtifacts.upload

`artifactRegistry.locations.repositories.yumArtifacts.upload`

Directly uploads a Yum artifact. The returned Operation will complete once the resources are uploaded; pass the bytes in `file` (body fields go up with them in one multipart request)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.repositories.yumArtifacts.upload({
	parent: 'projects/demo-project/locations/us-central1/repositories/rpm',
	file: { url: 'https://github.com/cli/cli/releases/download/v2.60.0/gh_2.60.0_linux_amd64.rpm', filename: 'gh_2.60.0_linux_amd64.rpm', contentType: 'application/x-rpm' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the parent resource where the artifacts will be uploaded. Format: `projects/<id>/locations/<id>/repositories/<id>`. |
| `body` | `object` | No | The request to upload an artifact. |
| `file` | `string \| object \| custom` | Yes | The bytes to upload (a URL, `{ base64 }` or a Blob). Body fields sent with it go up in the same multipart request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `object \| null` | No | This resource represents a long-running operation that is the result of a network API call. |

> [accordion] operation full type
>
> ```ts theme={null}
> {
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   response?: Record<string, any> | null,
>   done?: boolean | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null
> } | null
> ```

***

### locations.updateProjectConfig

`artifactRegistry.locations.updateProjectConfig`

Updates the project configuration

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.updateProjectConfig({
	name: 'projects/demo-project/locations/us-central1/projectConfig',
	updateMask: 'platformLogsConfig',
	platformLogsConfig: { loggingState: 'ENABLED' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. Field mask to support partial updates. See [https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask) for more details. |
| `name` | `string` | Yes | Identifier. The name of the project's configuration. Always of the form: projects/\{project}/locations/\{location}/projectConfig Format: `projects/<id>/locations/<id>/projectConfig`. |
| `body_name` | `string` | No | Identifier. The name of the project's configuration. Always of the form: projects/\{project}/locations/\{location}/projectConfig |
| `platformLogsConfig` | `object` | No | The platform logs config for a project or a repository. |

> [accordion] platformLogsConfig full type
>
> ```ts theme={null}
> {
>   severityLevel?: SEVERITY_LEVEL_UNSPECIFIED | DEBUG | INFO | NOTICE | WARNING | ERROR | CRITICAL | ALERT | EMERGENCY,
>   loggingState?: LOGGING_STATE_UNSPECIFIED | ENABLED | DISABLED
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The name of the project's configuration. Always of the form: projects/\{project}/locations/\{location}/projectConfig |
| `platformLogsConfig` | `object \| null` | No | The platform logs config for a project or a repository. |

> [accordion] platformLogsConfig full type
>
> ```ts theme={null}
> {
>   severityLevel?: string | null,
>   loggingState?: string | null
> } | null
> ```

***

### locations.updateVpcscConfig

`artifactRegistry.locations.updateVpcscConfig`

Updates the VPCSC Config for the Project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.locations.updateVpcscConfig({ name: 'projects/demo-project/locations/us-central1/vpcscConfig', updateMask: 'vpcscPolicy', vpcscPolicy: 'DENY' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Field mask to support partial updates. |
| `name` | `string` | Yes | The name of the project's VPC SC Config. Always of the form: projects/\{projectID}/locations/\{location}/vpcscConfig In update request: never set In response: always set Format: `projects/<id>/locations/<id>/vpcscConfig`. |
| `vpcscPolicy` | `VPCSC_POLICY_UNSPECIFIED \| DENY \| ALLOW` | No | The project per location VPC SC policy that defines the VPC SC behavior for the Remote Repository (Allow/Deny). |
| `body_name` | `string` | No | The name of the project's VPC SC Config. Always of the form: projects/\{projectID}/locations/\{location}/vpcscConfig In update request: never set In response: always set |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `vpcscPolicy` | `string \| null` | No | The project per location VPC SC policy that defines the VPC SC behavior for the Remote Repository (Allow/Deny). |
| `name` | `string \| null` | No | The name of the project's VPC SC Config. Always of the form: projects/\{projectID}/locations/\{location}/vpcscConfig In update request: never set In response: always set |

***

### projects.getProjectSettings

`artifactRegistry.projects.getProjectSettings`

Retrieves the Settings for the Project

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.projects.getProjectSettings({ name: 'projects/demo-project/projectSettings' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the projectSettings resource. Format: `projects/<id>/projectSettings`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pullPercent` | `number \| null` | No | The percentage of pull traffic to redirect from GCR to AR when using partial redirection. |
| `name` | `string \| null` | No | The name of the project's settings. Always of the form: projects/\{project-id}/projectSettings In update request: never set In response: always set |
| `legacyRedirectionState` | `string \| null` | No | The redirection state of the legacy repositories in this project. |

***

### projects.updateProjectSettings

`artifactRegistry.projects.updateProjectSettings`

Updates the Settings for the Project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.artifactRegistry.projects.updateProjectSettings({ name: 'projects/demo-project/projectSettings', updateMask: 'legacyRedirectionState', legacyRedirectionState: 'REDIRECTION_FROM_GCR_IO_ENABLED' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Field mask to support partial updates. |
| `name` | `string` | Yes | The name of the project's settings. Always of the form: projects/\{project-id}/projectSettings In update request: never set In response: always set Format: `projects/<id>/projectSettings`. |
| `pullPercent` | `number` | No | The percentage of pull traffic to redirect from GCR to AR when using partial redirection. |
| `body_name` | `string` | No | The name of the project's settings. Always of the form: projects/\{project-id}/projectSettings In update request: never set In response: always set |
| `legacyRedirectionState` | `REDIRECTION_STATE_UNSPECIFIED \| REDIRECTION_FROM_GCR_IO_DISABLED \| REDIRECTION_FROM_GCR_IO_ENABLED \| REDIRECTION_FROM_GCR_IO_FINALIZED \| REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING \| REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING` | No | The redirection state of the legacy repositories in this project. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pullPercent` | `number \| null` | No | The percentage of pull traffic to redirect from GCR to AR when using partial redirection. |
| `name` | `string \| null` | No | The name of the project's settings. Always of the form: projects/\{project-id}/projectSettings In update request: never set In response: always set |
| `legacyRedirectionState` | `string \| null` | No | The redirection state of the legacy repositories in this project. |

***

## Billing

### billingAccounts.create

`billing.billingAccounts.create`

This method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloud resellers should use the Channel Services APIs, [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) and...

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.create({ displayName: 'Acme', masterBillingAccount: 'billingAccounts/000000-000000-000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | No | Optional. The parent to create a billing account from. Format: - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |
| `masterBillingAccount` | `string` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `currencyCode` | `string` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `displayName` | `string` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `masterBillingAccount` | `string \| null` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `open` | `boolean \| null` | No | Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it are unable to use paid services. |
| `currencyCode` | `string \| null` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `name` | `string \| null` | No | Output only. The resource name of the billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF` would be the resource name for billing account `012345-567890-ABCDEF`. |
| `parent` | `string \| null` | No | Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |
| `displayName` | `string \| null` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

***

### billingAccounts.get

`billing.billingAccounts.get`

Gets information about a billing account. The current authenticated user must be a [viewer of the billing account](https://cloud.google.com/billing/docs/how-to/billing-access)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.get({ name: 'billingAccounts/000000-000000-000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the billing account to retrieve. For example, `billingAccounts/012345-567890-ABCDEF`. Format: `billingAccounts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `masterBillingAccount` | `string \| null` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `open` | `boolean \| null` | No | Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it are unable to use paid services. |
| `currencyCode` | `string \| null` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `name` | `string \| null` | No | Output only. The resource name of the billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF` would be the resource name for billing account `012345-567890-ABCDEF`. |
| `parent` | `string \| null` | No | Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |
| `displayName` | `string \| null` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

***

### billingAccounts.getIamPolicy

`billing.billingAccounts.getIamPolicy`

Gets the access control policy for a billing account. The caller must have the `billing.accounts.getIamPolicy` permission on the account, which is often given to billing account [viewers](https://cloud.google.com/billing/docs/how-to/billing-access)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.getIamPolicy({ resource: 'billingAccounts/000000-000000-000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `billingAccounts/<id>`. |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     title?: string | null,
>     description?: string | null,
>     location?: string | null
>   } | null,
>   role?: string | null,
>   members?: string[] | null
> }[] | null
> ```

***

### billingAccounts.list

`billing.billingAccounts.list`

Lists the billing accounts that the current authenticated user has permission to [view](https://cloud.google.com/billing/docs/how-to/billing-access) (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListBillingAccounts` call. If unspecified, the first page of results is returned. |
| `filter` | `string` | No | Options for how to filter the returned billing accounts. This only supports filtering for [subaccounts](https://cloud.google.com/billing/docs/concepts) under a single provided parent billing account. (for example, `master_billing_account=billingAccounts/012345-678901-ABCDEF`). Boolean algebra and other fields are not currently supported. |
| `parent` | `string` | No | Optional. The parent resource to list billing accounts from. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |
| `pageSize` | `number` | No | Requested page size. The maximum page size is 100; this is also the default. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `billingAccounts` | `object[] \| null` | No | A list of billing accounts. |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. To retrieve the next page, call `ListBillingAccounts` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve. |

> [accordion] billingAccounts full type
>
> ```ts theme={null}
> {
>   masterBillingAccount?: string | null,
>   open?: boolean | null,
>   currencyCode?: string | null,
>   name?: string | null,
>   parent?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### billingAccounts.move

`billing.billingAccounts.move`

Changes which parent organization a billing account belongs to

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.move({ name: 'billingAccounts/000000-000000-000000', destinationParent: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the billing account to move. Must be of the form `billingAccounts/{billing_account_id}`. The specified billing account cannot be a subaccount, since a subaccount always belongs to the same organization as its parent account. Format: `billingAccounts/<id>`. |
| `destinationParent` | `string` | No | Required. The resource name of the Organization to move the billing account under. Must be of the form `organizations/{organization_id}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `masterBillingAccount` | `string \| null` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `open` | `boolean \| null` | No | Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it are unable to use paid services. |
| `currencyCode` | `string \| null` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `name` | `string \| null` | No | Output only. The resource name of the billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF` would be the resource name for billing account `012345-567890-ABCDEF`. |
| `parent` | `string \| null` | No | Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |
| `displayName` | `string \| null` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

***

### billingAccounts.patch

`billing.billingAccounts.patch`

Updates a billing account's fields. Currently the only field that can be edited is `display_name`

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.patch({ name: 'billingAccounts/000000-000000-000000', updateMask: 'displayName', displayName: 'Acme' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | The update mask applied to the resource. Only "display\_name" is currently supported. |
| `name` | `string` | Yes | Required. The name of the billing account resource to be updated. Format: `billingAccounts/<id>`. |
| `masterBillingAccount` | `string` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `currencyCode` | `string` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `displayName` | `string` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `masterBillingAccount` | `string \| null` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `open` | `boolean \| null` | No | Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it are unable to use paid services. |
| `currencyCode` | `string \| null` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `name` | `string \| null` | No | Output only. The resource name of the billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF` would be the resource name for billing account `012345-567890-ABCDEF`. |
| `parent` | `string \| null` | No | Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |
| `displayName` | `string \| null` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

***

### billingAccounts.projects.list

`billing.billingAccounts.projects.list`

Lists the projects associated with a billing account. The current authenticated user must have the `billing.resourceAssociations.list` IAM permission, which is often given to billing account [viewers](https://cloud.google.com/billing/docs/how-to/billing-access) (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.projects.list({ name: 'billingAccounts/000000-000000-000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous `ListProjectBillingInfo` call. If unspecified, the first page of results is returned. |
| `name` | `string` | Yes | Required. The resource name of the billing account associated with the projects that you want to list. For example, `billingAccounts/012345-567890-ABCDEF`. Format: `billingAccounts/<id>`. |
| `pageSize` | `number` | No | Requested page size. The maximum page size is 100; this is also the default. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectBillingInfo` | `object[] \| null` | No | A list of `ProjectBillingInfo` resources representing the projects associated with the billing account. |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. To retrieve the next page, call `ListProjectBillingInfo` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve. |

> [accordion] projectBillingInfo full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   billingEnabled?: boolean | null,
>   billingAccountName?: string | null,
>   projectId?: string | null
> }[] | null
> ```

***

### billingAccounts.setIamPolicy

`billing.billingAccounts.setIamPolicy`

Sets the access control policy for a billing account. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.setIamPolicy({
	resource: 'billingAccounts/000000-000000-000000',
	policy: {
		bindings: [{
			role: 'roles/billing.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `billingAccounts/<id>`. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   etag?: string,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[]
>   }[],
>   bindings?: {
>     condition?: {
>       expression?: string,
>       title?: string,
>       description?: string,
>       location?: string
>     },
>     role?: string,
>     members?: string[]
>   }[],
>   version?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     title?: string | null,
>     description?: string | null,
>     location?: string | null
>   } | null,
>   role?: string | null,
>   members?: string[] | null
> }[] | null
> ```

***

### billingAccounts.subAccounts.create

`billing.billingAccounts.subAccounts.create`

This method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloud resellers should use the Channel Services APIs, [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) and...

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.subAccounts.create({ parent: 'billingAccounts/000000-000000-000000', displayName: 'Acme team' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Optional. The parent to create a billing account from. Format: - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` Format: `billingAccounts/<id>`. |
| `masterBillingAccount` | `string` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `currencyCode` | `string` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `displayName` | `string` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `masterBillingAccount` | `string \| null` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `open` | `boolean \| null` | No | Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it are unable to use paid services. |
| `currencyCode` | `string \| null` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `name` | `string \| null` | No | Output only. The resource name of the billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF` would be the resource name for billing account `012345-567890-ABCDEF`. |
| `parent` | `string \| null` | No | Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |
| `displayName` | `string \| null` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

***

### billingAccounts.subAccounts.list

`billing.billingAccounts.subAccounts.list`

Lists the billing accounts that the current authenticated user has permission to [view](https://cloud.google.com/billing/docs/how-to/billing-access) (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.subAccounts.list({ parent: 'billingAccounts/000000-000000-000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Requested page size. The maximum page size is 100; this is also the default. |
| `parent` | `string` | Yes | Optional. The parent resource to list billing accounts from. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` Format: `billingAccounts/<id>`. |
| `filter` | `string` | No | Options for how to filter the returned billing accounts. This only supports filtering for [subaccounts](https://cloud.google.com/billing/docs/concepts) under a single provided parent billing account. (for example, `master_billing_account=billingAccounts/012345-678901-ABCDEF`). Boolean algebra and other fields are not currently supported. |
| `pageToken` | `string` | No | A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListBillingAccounts` call. If unspecified, the first page of results is returned. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `billingAccounts` | `object[] \| null` | No | A list of billing accounts. |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. To retrieve the next page, call `ListBillingAccounts` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve. |

> [accordion] billingAccounts full type
>
> ```ts theme={null}
> {
>   masterBillingAccount?: string | null,
>   open?: boolean | null,
>   currencyCode?: string | null,
>   name?: string | null,
>   parent?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### billingAccounts.testIamPermissions

`billing.billingAccounts.testIamPermissions`

Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.billingAccounts.testIamPermissions({
	resource: 'billingAccounts/000000-000000-000000',
	permissions: ['billing.accounts.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `billingAccounts/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### organizations.billingAccounts.create

`billing.organizations.billingAccounts.create`

This method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloud resellers should use the Channel Services APIs, [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) and...

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.billing.organizations.billingAccounts.create({ parent: 'organizations/123456789012', displayName: 'Acme', masterBillingAccount: 'billingAccounts/000000-000000-000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Optional. The parent to create a billing account from. Format: - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` Format: `organizations/<id>`. |
| `masterBillingAccount` | `string` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `currencyCode` | `string` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `displayName` | `string` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `masterBillingAccount` | `string \| null` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `open` | `boolean \| null` | No | Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it are unable to use paid services. |
| `currencyCode` | `string \| null` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `name` | `string \| null` | No | Output only. The resource name of the billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF` would be the resource name for billing account `012345-567890-ABCDEF`. |
| `parent` | `string \| null` | No | Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |
| `displayName` | `string \| null` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

***

### organizations.billingAccounts.list

`billing.organizations.billingAccounts.list`

Lists the billing accounts that the current authenticated user has permission to [view](https://cloud.google.com/billing/docs/how-to/billing-access) (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.organizations.billingAccounts.list({ parent: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListBillingAccounts` call. If unspecified, the first page of results is returned. |
| `pageSize` | `number` | No | Requested page size. The maximum page size is 100; this is also the default. |
| `parent` | `string` | Yes | Optional. The parent resource to list billing accounts from. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` Format: `organizations/<id>`. |
| `filter` | `string` | No | Options for how to filter the returned billing accounts. This only supports filtering for [subaccounts](https://cloud.google.com/billing/docs/concepts) under a single provided parent billing account. (for example, `master_billing_account=billingAccounts/012345-678901-ABCDEF`). Boolean algebra and other fields are not currently supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `billingAccounts` | `object[] \| null` | No | A list of billing accounts. |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. To retrieve the next page, call `ListBillingAccounts` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve. |

> [accordion] billingAccounts full type
>
> ```ts theme={null}
> {
>   masterBillingAccount?: string | null,
>   open?: boolean | null,
>   currencyCode?: string | null,
>   name?: string | null,
>   parent?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### organizations.billingAccounts.move

`billing.organizations.billingAccounts.move`

Changes which parent organization a billing account belongs to

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.billing.organizations.billingAccounts.move({ destinationParent: 'organizations/123456789012', name: 'billingAccounts/000000-000000-000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `destinationParent` | `string` | Yes | Required. The resource name of the Organization to move the billing account under. Must be of the form `organizations/{organization_id}`. Format: `organizations/<id>`. |
| `name` | `string` | Yes | Required. The resource name of the billing account to move. Must be of the form `billingAccounts/{billing_account_id}`. The specified billing account cannot be a subaccount, since a subaccount always belongs to the same organization as its parent account. Format: `billingAccounts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `masterBillingAccount` | `string \| null` | No | If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. |
| `open` | `boolean \| null` | No | Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it are unable to use paid services. |
| `currencyCode` | `string \| null` | No | Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account. |
| `name` | `string \| null` | No | Output only. The resource name of the billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF` would be the resource name for billing account `012345-567890-ABCDEF`. |
| `parent` | `string \| null` | No | Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |
| `displayName` | `string \| null` | No | The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console. |

***

### projects.getBillingInfo

`billing.projects.getBillingInfo`

Gets the billing information for a project. The current authenticated user must have the `resourcemanager.projects.get` permission for the project, which can be granted by assigning the [Project Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) role

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.projects.getBillingInfo({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the project for which billing information is retrieved. For example, `projects/tokyo-rain-123`. Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The resource name for the `ProjectBillingInfo`; has the form `projects/{project_id}/billingInfo`. For example, the resource name for the billing information for project `tokyo-rain-123` would be `projects/tokyo-rain-123/billingInfo`. |
| `billingEnabled` | `boolean \| null` | No | Output only. True if the project is associated with an open billing account, to which usage on the project is charged. False if the project is associated with a closed billing account, or no billing account at all, and therefore cannot use paid services. |
| `billingAccountName` | `string \| null` | No | The resource name of the billing account associated with the project, if any. For example, `billingAccounts/012345-567890-ABCDEF`. |
| `projectId` | `string \| null` | No | Output only. The ID of the project that this `ProjectBillingInfo` represents, such as `tokyo-rain-123`. This is a convenience field so that you don't need to parse the `name` field to obtain a project ID. |

***

### projects.updateBillingInfo

`billing.projects.updateBillingInfo`

Sets or updates the billing account associated with a project. You specify the new billing account by setting the `billing_account_name` in the `ProjectBillingInfo` resource to the resource name of a billing account

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.billing.projects.updateBillingInfo({ name: 'projects/demo-project', billingAccountName: 'billingAccounts/000000-000000-000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the project associated with the billing information that you want to update. For example, `projects/tokyo-rain-123`. Format: `projects/<id>`. |
| `billingAccountName` | `string` | No | The resource name of the billing account associated with the project, if any. For example, `billingAccounts/012345-567890-ABCDEF`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The resource name for the `ProjectBillingInfo`; has the form `projects/{project_id}/billingInfo`. For example, the resource name for the billing information for project `tokyo-rain-123` would be `projects/tokyo-rain-123/billingInfo`. |
| `billingEnabled` | `boolean \| null` | No | Output only. True if the project is associated with an open billing account, to which usage on the project is charged. False if the project is associated with a closed billing account, or no billing account at all, and therefore cannot use paid services. |
| `billingAccountName` | `string \| null` | No | The resource name of the billing account associated with the project, if any. For example, `billingAccounts/012345-567890-ABCDEF`. |
| `projectId` | `string \| null` | No | Output only. The ID of the project that this `ProjectBillingInfo` represents, such as `tokyo-rain-123`. This is a convenience field so that you don't need to parse the `name` field to obtain a project ID. |

***

### services.list

`billing.services.list`

Lists all public cloud services (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.services.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Requested page size. Defaults to 5000. |
| `pageToken` | `string` | No | A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListServices` call. If unspecified, the first page of results is returned. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. To retrieve the next page, call `ListServices` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve. |
| `services` | `object[] \| null` | No | A list of services. |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   serviceId?: string | null,
>   displayName?: string | null,
>   businessEntityName?: string | null
> }[] | null
> ```

***

### services.skus.list

`billing.services.skus.list`

Lists all publicly available SKUs for a given cloud service (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.billing.services.skus.list({ parent: 'services/6F81-5844-456A' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the service. Example: "services/6F81-5844-456A" Format: `services/<id>`. |
| `startTime` | `string` | No | Optional inclusive start time of the time range for which the pricing versions will be returned. Timestamps in the future are not allowed. The time range has to be within a single calendar month in America/Los\_Angeles timezone. Time range as a whole is optional. If not specified, the latest pricing will be returned (up to 12 hours old at most). |
| `endTime` | `string` | No | Optional exclusive end time of the time range for which the pricing versions will be returned. Timestamps in the future are not allowed. The time range has to be within a single calendar month in America/Los\_Angeles timezone. Time range as a whole is optional. If not specified, the latest pricing will be returned (up to 12 hours old at most). |
| `pageSize` | `number` | No | Requested page size. Defaults to 5000. |
| `currencyCode` | `string` | No | The ISO 4217 currency code for the pricing info in the response proto. Will use the conversion rate as of start\_time. Optional. If not specified USD will be used. |
| `pageToken` | `string` | No | A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListSkus` call. If unspecified, the first page of results is returned. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. To retrieve the next page, call `ListSkus` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve. |
| `skus` | `object[] \| null` | No | The list of public SKUs of the given service. |

> [accordion] skus full type
>
> ```ts theme={null}
> {
>   pricingInfo?: {
>     pricingExpression?: {
>       baseUnit?: string | null,
>       usageUnit?: string | null,
>       baseUnitConversionFactor?: number | null,
>       baseUnitDescription?: string | null,
>       tieredRates?: {
>         startUsageAmount?: number | null,
>         unitPrice?: {
>           currencyCode?: string | null,
>           nanos?: number | null,
>           units?: string | number | null
>         } | null
>       }[] | null,
>       displayQuantity?: number | null,
>       usageUnitDescription?: string | null
>     } | null,
>     aggregationInfo?: {
>       aggregationCount?: number | null,
>       aggregationLevel?: string | null,
>       aggregationInterval?: string | null
>     } | null,
>     effectiveTime?: string | null,
>     summary?: string | null,
>     currencyConversionRate?: number | null
>   }[] | null,
>   geoTaxonomy?: {
>     regions?: string[] | null,
>     type?: string | null
>   } | null,
>   category?: {
>     resourceFamily?: string | null,
>     usageType?: string | null,
>     serviceDisplayName?: string | null,
>     resourceGroup?: string | null
>   } | null,
>   description?: string | null,
>   serviceProviderName?: string | null,
>   skuId?: string | null,
>   serviceRegions?: string[] | null,
>   name?: string | null
> }[] | null
> ```

***

## Budgets

### billingAccounts.budgets.create

`budgets.billingAccounts.budgets.create`

Creates a new budget. See [Quotas and limits](https://cloud.google.com/billing/quotas) for more information on the limits of the number of budgets you can create

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.budgets.billingAccounts.budgets.create({
	parent: 'billingAccounts/000000-000000-000000',
	displayName: 'Monthly',
	amount: {
		specifiedAmount: { currencyCode: 'USD', units: '500' },
	},
	thresholdRules: [{ thresholdPercent: 0.9 }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the billing account to create the budget in. Values are of the form `billingAccounts/{billingAccountId}`. Format: `billingAccounts/<id>`. |
| `spendCap` | `object` | No | SpendCap defines the spend cap configuration and state. |
| `etag` | `string` | No | Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag causes an update to overwrite other changes. |
| `thresholdRules` | `object[]` | No | Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications. Must be set when `spend_cap` is set. Spend caps must have exactly three `CURRENT_SPEND` threshold rules with `threshold_percent` values of `0.5`, `0.8`, and `1.0` (50%, 80%, and 100%). `FORECASTED_SPEND` threshold rules are not supported for spend caps. |
| `budgetFilter` | `object` | No | A filter for a budget, limiting the scope of the cost to calculate. |
| `ownershipScope` | `OWNERSHIP_SCOPE_UNSPECIFIED \| ALL_USERS \| BILLING_ACCOUNT` | No | Optional. When `spend_cap` is set, must be `OWNERSHIP_SCOPE_UNSPECIFIED` or `ALL_USERS`. `BILLING_ACCOUNT` is not supported for spend caps. |
| `amount` | `object` | No | The budgeted amount for each usage period. |
| `notificationsRule` | `object` | No | NotificationsRule defines notifications that are sent based on budget spend and thresholds. |
| `displayName` | `string` | No | User data for display name in UI. The name must be less than or equal to 60 characters. |

> [accordion] spendCap full type
>
> ```ts theme={null}
> {
>   inputState?: STATE_UNSPECIFIED | CONFIGURED | ENFORCED | AWAITING_NEXT_PERIOD
> }
> ```

> [accordion] thresholdRules full type
>
> ```ts theme={null}
> {
>   spendBasis?: BASIS_UNSPECIFIED | CURRENT_SPEND | FORECASTED_SPEND,
>   thresholdPercent?: number
> }[]
> ```

> [accordion] budgetFilter full type
>
> ```ts theme={null}
> {
>   calendarPeriod?: CALENDAR_PERIOD_UNSPECIFIED | MONTH | QUARTER | YEAR,
>   resourceAncestors?: string[],
>   customPeriod?: {
>     startDate?: {
>       day?: number,
>       year?: number,
>       month?: number
>     },
>     endDate?: {
>       day?: number,
>       year?: number,
>       month?: number
>     }
>   },
>   subaccounts?: string[],
>   creditTypesTreatment?: CREDIT_TYPES_TREATMENT_UNSPECIFIED | INCLUDE_ALL_CREDITS | EXCLUDE_ALL_CREDITS | INCLUDE_SPECIFIED_CREDITS,
>   projects?: string[],
>   creditTypes?: string[],
>   labels?: Record<string, any[]>,
>   services?: string[]
> }
> ```

> [accordion] amount full type
>
> ```ts theme={null}
> {
>   lastPeriodAmount?: {
>   },
>   specifiedAmount?: {
>     units?: string | number,
>     currencyCode?: string,
>     nanos?: number
>   }
> }
> ```

> [accordion] notificationsRule full type
>
> ```ts theme={null}
> {
>   schemaVersion?: string,
>   pubsubTopic?: string,
>   enableProjectLevelRecipients?: boolean,
>   monitoringNotificationChannels?: string[],
>   disableDefaultIamRecipients?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `spendCap` | `object \| null` | No | SpendCap defines the spend cap configuration and state. |
| `etag` | `string \| null` | No | Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag causes an update to overwrite other changes. |
| `thresholdRules` | `object[] \| null` | No | Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications. Must be set when `spend_cap` is set. Spend caps must have exactly three `CURRENT_SPEND` threshold rules with `threshold_percent` values of `0.5`, `0.8`, and `1.0` (50%, 80%, and 100%). `FORECASTED_SPEND` threshold rules are not supported for spend caps. |
| `budgetFilter` | `object \| null` | No | A filter for a budget, limiting the scope of the cost to calculate. |
| `ownershipScope` | `string \| null` | No | Optional. When `spend_cap` is set, must be `OWNERSHIP_SCOPE_UNSPECIFIED` or `ALL_USERS`. `BILLING_ACCOUNT` is not supported for spend caps. |
| `amount` | `object \| null` | No | The budgeted amount for each usage period. |
| `notificationsRule` | `object \| null` | No | NotificationsRule defines notifications that are sent based on budget spend and thresholds. |
| `displayName` | `string \| null` | No | User data for display name in UI. The name must be less than or equal to 60 characters. |

> [accordion] spendCap full type
>
> ```ts theme={null}
> {
>   outputState?: string | null,
>   inputState?: string | null,
>   reconciling?: boolean | null
> } | null
> ```

> [accordion] thresholdRules full type
>
> ```ts theme={null}
> {
>   spendBasis?: string | null,
>   thresholdPercent?: number | null
> }[] | null
> ```

> [accordion] budgetFilter full type
>
> ```ts theme={null}
> {
>   calendarPeriod?: string | null,
>   resourceAncestors?: string[] | null,
>   customPeriod?: {
>     startDate?: {
>       day?: number | null,
>       year?: number | null,
>       month?: number | null
>     } | null,
>     endDate?: {
>       day?: number | null,
>       year?: number | null,
>       month?: number | null
>     } | null
>   } | null,
>   subaccounts?: string[] | null,
>   creditTypesTreatment?: string | null,
>   projects?: string[] | null,
>   creditTypes?: string[] | null,
>   labels?: Record<string, any[]> | null,
>   services?: string[] | null
> } | null
> ```

> [accordion] amount full type
>
> ```ts theme={null}
> {
>   lastPeriodAmount?: {
>   } | null,
>   specifiedAmount?: {
>     units?: string | number | null,
>     currencyCode?: string | null,
>     nanos?: number | null
>   } | null
> } | null
> ```

> [accordion] notificationsRule full type
>
> ```ts theme={null}
> {
>   schemaVersion?: string | null,
>   pubsubTopic?: string | null,
>   enableProjectLevelRecipients?: boolean | null,
>   monitoringNotificationChannels?: string[] | null,
>   disableDefaultIamRecipients?: boolean | null
> } | null
> ```

***

### billingAccounts.budgets.delete

`budgets.billingAccounts.budgets.delete`

Deletes a budget. Returns successfully if already deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.budgets.billingAccounts.budgets.delete({ name: 'billingAccounts/000000-000000-000000/budgets/monthly' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Format: `billingAccounts/<id>/budgets/<id>`. |

**Output:** *empty object*

***

### billingAccounts.budgets.get

`budgets.billingAccounts.budgets.get`

Returns a budget. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.budgets.billingAccounts.budgets.get({ name: 'billingAccounts/000000-000000-000000/budgets/monthly' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Format: `billingAccounts/<id>/budgets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `spendCap` | `object \| null` | No | SpendCap defines the spend cap configuration and state. |
| `etag` | `string \| null` | No | Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag causes an update to overwrite other changes. |
| `thresholdRules` | `object[] \| null` | No | Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications. Must be set when `spend_cap` is set. Spend caps must have exactly three `CURRENT_SPEND` threshold rules with `threshold_percent` values of `0.5`, `0.8`, and `1.0` (50%, 80%, and 100%). `FORECASTED_SPEND` threshold rules are not supported for spend caps. |
| `budgetFilter` | `object \| null` | No | A filter for a budget, limiting the scope of the cost to calculate. |
| `ownershipScope` | `string \| null` | No | Optional. When `spend_cap` is set, must be `OWNERSHIP_SCOPE_UNSPECIFIED` or `ALL_USERS`. `BILLING_ACCOUNT` is not supported for spend caps. |
| `amount` | `object \| null` | No | The budgeted amount for each usage period. |
| `notificationsRule` | `object \| null` | No | NotificationsRule defines notifications that are sent based on budget spend and thresholds. |
| `displayName` | `string \| null` | No | User data for display name in UI. The name must be less than or equal to 60 characters. |

> [accordion] spendCap full type
>
> ```ts theme={null}
> {
>   outputState?: string | null,
>   inputState?: string | null,
>   reconciling?: boolean | null
> } | null
> ```

> [accordion] thresholdRules full type
>
> ```ts theme={null}
> {
>   spendBasis?: string | null,
>   thresholdPercent?: number | null
> }[] | null
> ```

> [accordion] budgetFilter full type
>
> ```ts theme={null}
> {
>   calendarPeriod?: string | null,
>   resourceAncestors?: string[] | null,
>   customPeriod?: {
>     startDate?: {
>       day?: number | null,
>       year?: number | null,
>       month?: number | null
>     } | null,
>     endDate?: {
>       day?: number | null,
>       year?: number | null,
>       month?: number | null
>     } | null
>   } | null,
>   subaccounts?: string[] | null,
>   creditTypesTreatment?: string | null,
>   projects?: string[] | null,
>   creditTypes?: string[] | null,
>   labels?: Record<string, any[]> | null,
>   services?: string[] | null
> } | null
> ```

> [accordion] amount full type
>
> ```ts theme={null}
> {
>   lastPeriodAmount?: {
>   } | null,
>   specifiedAmount?: {
>     units?: string | number | null,
>     currencyCode?: string | null,
>     nanos?: number | null
>   } | null
> } | null
> ```

> [accordion] notificationsRule full type
>
> ```ts theme={null}
> {
>   schemaVersion?: string | null,
>   pubsubTopic?: string | null,
>   enableProjectLevelRecipients?: boolean | null,
>   monitoringNotificationChannels?: string[] | null,
>   disableDefaultIamRecipients?: boolean | null
> } | null
> ```

***

### billingAccounts.budgets.list

`budgets.billingAccounts.budgets.list`

Returns a list of budgets for a billing account. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.budgets.billingAccounts.budgets.list({ parent: 'billingAccounts/000000-000000-000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `scope` | `string` | No | Optional. Set the scope of the budgets to be returned, in the format of the resource name. The scope of a budget is the cost that it tracks, such as costs for a single project, or the costs for all projects in a folder. Only project scope (in the format of "projects/project-id" or "projects/123") is supported in this field. When this field is set to a project's resource name, the budgets returned are tracking the costs for that project. |
| `pageToken` | `string` | No | Optional. The value returned by the last `ListBudgetsResponse` which indicates that this is a continuation of a prior `ListBudgets` call, and that the system should return the next page of data. |
| `pageSize` | `number` | No | Optional. The maximum number of budgets to return per page. The default and maximum value are 100. |
| `parent` | `string` | Yes | Required. Name of billing account to list budgets under. Values are of the form `billingAccounts/{billingAccountId}`. Format: `billingAccounts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If not empty, indicates that there may be more budgets that match the request; this value should be passed in a new `ListBudgetsRequest`. |
| `budgets` | `object[] \| null` | No | List of the budgets owned by the requested billing account. |

> [accordion] budgets full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   spendCap?: {
>     outputState?: string | null,
>     inputState?: string | null,
>     reconciling?: boolean | null
>   } | null,
>   etag?: string | null,
>   thresholdRules?: {
>     spendBasis?: string | null,
>     thresholdPercent?: number | null
>   }[] | null,
>   budgetFilter?: {
>     calendarPeriod?: string | null,
>     resourceAncestors?: string[] | null,
>     customPeriod?: {
>       startDate?: {
>         day?: number | null,
>         year?: number | null,
>         month?: number | null
>       } | null,
>       endDate?: {
>         day?: number | null,
>         year?: number | null,
>         month?: number | null
>       } | null
>     } | null,
>     subaccounts?: string[] | null,
>     creditTypesTreatment?: string | null,
>     projects?: string[] | null,
>     creditTypes?: string[] | null,
>     labels?: Record<string, any[]> | null,
>     services?: string[] | null
>   } | null,
>   ownershipScope?: string | null,
>   amount?: {
>     lastPeriodAmount?: {
>     } | null,
>     specifiedAmount?: {
>       units?: string | number | null,
>       currencyCode?: string | null,
>       nanos?: number | null
>     } | null
>   } | null,
>   notificationsRule?: {
>     schemaVersion?: string | null,
>     pubsubTopic?: string | null,
>     enableProjectLevelRecipients?: boolean | null,
>     monitoringNotificationChannels?: string[] | null,
>     disableDefaultIamRecipients?: boolean | null
>   } | null,
>   displayName?: string | null
> }[] | null
> ```

***

### billingAccounts.budgets.patch

`budgets.billingAccounts.budgets.patch`

Updates a budget and returns the updated budget. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.budgets.billingAccounts.budgets.patch({ name: 'billingAccounts/000000-000000-000000/budgets/monthly', updateMask: 'displayName', displayName: 'Monthly' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. Indicates which fields in the provided budget to update. Read-only fields (such as `name`) cannot be changed. If this is not provided, then only fields with non-default values from the request are updated. See [https://developers.google.com/protocol-buffers/docs/proto3#default](https://developers.google.com/protocol-buffers/docs/proto3#default) for more details about default values. |
| `name` | `string` | Yes | Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Format: `billingAccounts/<id>/budgets/<id>`. |
| `spendCap` | `object` | No | SpendCap defines the spend cap configuration and state. |
| `etag` | `string` | No | Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag causes an update to overwrite other changes. |
| `thresholdRules` | `object[]` | No | Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications. Must be set when `spend_cap` is set. Spend caps must have exactly three `CURRENT_SPEND` threshold rules with `threshold_percent` values of `0.5`, `0.8`, and `1.0` (50%, 80%, and 100%). `FORECASTED_SPEND` threshold rules are not supported for spend caps. |
| `budgetFilter` | `object` | No | A filter for a budget, limiting the scope of the cost to calculate. |
| `ownershipScope` | `OWNERSHIP_SCOPE_UNSPECIFIED \| ALL_USERS \| BILLING_ACCOUNT` | No | Optional. When `spend_cap` is set, must be `OWNERSHIP_SCOPE_UNSPECIFIED` or `ALL_USERS`. `BILLING_ACCOUNT` is not supported for spend caps. |
| `amount` | `object` | No | The budgeted amount for each usage period. |
| `notificationsRule` | `object` | No | NotificationsRule defines notifications that are sent based on budget spend and thresholds. |
| `displayName` | `string` | No | User data for display name in UI. The name must be less than or equal to 60 characters. |

> [accordion] spendCap full type
>
> ```ts theme={null}
> {
>   inputState?: STATE_UNSPECIFIED | CONFIGURED | ENFORCED | AWAITING_NEXT_PERIOD
> }
> ```

> [accordion] thresholdRules full type
>
> ```ts theme={null}
> {
>   spendBasis?: BASIS_UNSPECIFIED | CURRENT_SPEND | FORECASTED_SPEND,
>   thresholdPercent?: number
> }[]
> ```

> [accordion] budgetFilter full type
>
> ```ts theme={null}
> {
>   calendarPeriod?: CALENDAR_PERIOD_UNSPECIFIED | MONTH | QUARTER | YEAR,
>   resourceAncestors?: string[],
>   customPeriod?: {
>     startDate?: {
>       day?: number,
>       year?: number,
>       month?: number
>     },
>     endDate?: {
>       day?: number,
>       year?: number,
>       month?: number
>     }
>   },
>   subaccounts?: string[],
>   creditTypesTreatment?: CREDIT_TYPES_TREATMENT_UNSPECIFIED | INCLUDE_ALL_CREDITS | EXCLUDE_ALL_CREDITS | INCLUDE_SPECIFIED_CREDITS,
>   projects?: string[],
>   creditTypes?: string[],
>   labels?: Record<string, any[]>,
>   services?: string[]
> }
> ```

> [accordion] amount full type
>
> ```ts theme={null}
> {
>   lastPeriodAmount?: {
>   },
>   specifiedAmount?: {
>     units?: string | number,
>     currencyCode?: string,
>     nanos?: number
>   }
> }
> ```

> [accordion] notificationsRule full type
>
> ```ts theme={null}
> {
>   schemaVersion?: string,
>   pubsubTopic?: string,
>   enableProjectLevelRecipients?: boolean,
>   monitoringNotificationChannels?: string[],
>   disableDefaultIamRecipients?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `spendCap` | `object \| null` | No | SpendCap defines the spend cap configuration and state. |
| `etag` | `string \| null` | No | Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag causes an update to overwrite other changes. |
| `thresholdRules` | `object[] \| null` | No | Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications. Must be set when `spend_cap` is set. Spend caps must have exactly three `CURRENT_SPEND` threshold rules with `threshold_percent` values of `0.5`, `0.8`, and `1.0` (50%, 80%, and 100%). `FORECASTED_SPEND` threshold rules are not supported for spend caps. |
| `budgetFilter` | `object \| null` | No | A filter for a budget, limiting the scope of the cost to calculate. |
| `ownershipScope` | `string \| null` | No | Optional. When `spend_cap` is set, must be `OWNERSHIP_SCOPE_UNSPECIFIED` or `ALL_USERS`. `BILLING_ACCOUNT` is not supported for spend caps. |
| `amount` | `object \| null` | No | The budgeted amount for each usage period. |
| `notificationsRule` | `object \| null` | No | NotificationsRule defines notifications that are sent based on budget spend and thresholds. |
| `displayName` | `string \| null` | No | User data for display name in UI. The name must be less than or equal to 60 characters. |

> [accordion] spendCap full type
>
> ```ts theme={null}
> {
>   outputState?: string | null,
>   inputState?: string | null,
>   reconciling?: boolean | null
> } | null
> ```

> [accordion] thresholdRules full type
>
> ```ts theme={null}
> {
>   spendBasis?: string | null,
>   thresholdPercent?: number | null
> }[] | null
> ```

> [accordion] budgetFilter full type
>
> ```ts theme={null}
> {
>   calendarPeriod?: string | null,
>   resourceAncestors?: string[] | null,
>   customPeriod?: {
>     startDate?: {
>       day?: number | null,
>       year?: number | null,
>       month?: number | null
>     } | null,
>     endDate?: {
>       day?: number | null,
>       year?: number | null,
>       month?: number | null
>     } | null
>   } | null,
>   subaccounts?: string[] | null,
>   creditTypesTreatment?: string | null,
>   projects?: string[] | null,
>   creditTypes?: string[] | null,
>   labels?: Record<string, any[]> | null,
>   services?: string[] | null
> } | null
> ```

> [accordion] amount full type
>
> ```ts theme={null}
> {
>   lastPeriodAmount?: {
>   } | null,
>   specifiedAmount?: {
>     units?: string | number | null,
>     currencyCode?: string | null,
>     nanos?: number | null
>   } | null
> } | null
> ```

> [accordion] notificationsRule full type
>
> ```ts theme={null}
> {
>   schemaVersion?: string | null,
>   pubsubTopic?: string | null,
>   enableProjectLevelRecipients?: boolean | null,
>   monitoringNotificationChannels?: string[] | null,
>   disableDefaultIamRecipients?: boolean | null
> } | null
> ```

***

## Build

### builds.approve

`build.builds.approve`

Approves or rejects a pending build. If approved, the returned long-running operation (LRO) will be analogous to the LRO returned from a CreateBuild call

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.builds.approve({
	name: 'projects/demo-project/builds/b1a2c3',
	approvalResult: { decision: 'APPROVED', comment: 'Ship it' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Name of the target build. For example: "projects/\{$project_id&#125;/builds/&#123;$build\_id}" Format: `projects/<id>/builds/<id>`. |
| `approvalResult` | `object` | No | ApprovalResult describes the decision and associated metadata of a manual approval of a build. |

> [accordion] approvalResult full type
>
> ```ts theme={null}
> {
>   decision?: DECISION_UNSPECIFIED | APPROVED | REJECTED,
>   url?: string,
>   comment?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### builds.cancel

`build.builds.cancel`

Cancels a build in progress. Note: This method only cancels builds in the "global" region when using the legacy resource path projects/\{project\_id}/builds/\{id}:cancel

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.builds.cancel({ projectId: 'demo-project', id: 'b1a2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Required. ID of the project. |
| `id` | `string` | Yes | Required. ID of the build. |
| `body_id` | `string` | No | Required. ID of the build. |
| `name` | `string` | No | The name of the `Build` to cancel. Format: `projects/{project}/locations/{location}/builds/{build}` |
| `body_projectId` | `string` | No | Required. ID of the project. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createTime` | `string \| null` | No | Output only. Time at which the request to create the build was received. |
| `finishTime` | `string \| null` | No | Output only. Time at which execution of the build was finished. The difference between finish\_time and start\_time is the duration of the build's execution. |
| `source` | `object \| null` | No | Location of the source in a supported storage service. |
| `logUrl` | `string \| null` | No | Output only. URL to logs for this build in Google Cloud Console. |
| `options` | `object \| null` | No | Optional arguments to enable specific features of builds. |
| `statusDetail` | `string \| null` | No | Output only. Customer-readable message about the current status. |
| `secrets` | `object[] \| null` | No | Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: [https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets](https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets) |
| `status` | `string \| null` | No | Output only. Status of the build. |
| `projectId` | `string \| null` | No | Output only. ID of the project. |
| `artifacts` | `object \| null` | No | Artifacts produced by a build that should be uploaded upon successful completion of all build steps. |
| `warnings` | `object[] \| null` | No | Output only. Non-fatal problems encountered during the execution of the build. |
| `steps` | `object[] \| null` | No | Required. The operations to be performed on the workspace. |
| `approval` | `object \| null` | No | BuildApproval describes a build's approval configuration, state, and result. |
| `startTime` | `string \| null` | No | Output only. Time at which execution of the build was started. |
| `buildTriggerId` | `string \| null` | No | Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions data for `Build` resource. |
| `results` | `object \| null` | No | Artifacts created by the build pipeline. |
| `id` | `string \| null` | No | Output only. Unique identifier of the build. |
| `serviceAccount` | `string \| null` | No | IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. |
| `images` | `string[] \| null` | No | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. |
| `timing` | `object \| null` | No | Output only. Stores timing information for phases of the build. Valid keys are: \* BUILD: time to execute all build steps. \* PUSH: time to push all artifacts including docker images and non docker artifacts. \* FETCHSOURCE: time to fetch source. \* SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included. |
| `tags` | `string[] \| null` | No | Tags for annotation of a `Build`. These are not docker tags. |
| `gitConfig` | `object \| null` | No | GitConfig is a configuration for git operations. |
| `timeout` | `string \| null` | No | Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes. |
| `sourceProvenance` | `object \| null` | No | Provenance of the source. Ways to find the original source, or verify that some source was used for this build. |
| `availableSecrets` | `object \| null` | No | Secrets and secret environment variables. |
| `queueTtl` | `string \| null` | No | TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create\_time. |
| `failureInfo` | `object \| null` | No | A fatal problem encountered during the execution of the build. |
| `logsBucket` | `string \| null` | No | Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| `dependencies` | `object[] \| null` | No | Optional. Dependencies that the Cloud Build worker will fetch before executing user steps. |
| `name` | `string \| null` | No | Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where \{build} is a unique identifier generated by the service. |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   repoSource?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   connectedRepository?: {
>     repository?: string | null,
>     revision?: string | null,
>     dir?: string | null
>   } | null,
>   storageSource?: {
>     object?: string | null,
>     sourceFetcher?: string | null,
>     generation?: string | number | null,
>     bucket?: string | null
>   } | null,
>   gitSource?: {
>     dir?: string | null,
>     url?: string | null,
>     revision?: string | null
>   } | null,
>   developerConnectConfig?: {
>     dir?: string | null,
>     gitRepositoryLink?: string | null,
>     revision?: string | null
>   } | null,
>   storageSourceManifest?: {
>     object?: string | null,
>     bucket?: string | null,
>     generation?: string | number | null
>   } | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   resolvedWorkerRelease?: string | null,
>   diskSizeGb?: string | number | null,
>   defaultLogsBucketBehavior?: string | null,
>   rankedMachineSeries?: string[] | null,
>   pubsubTopic?: string | null,
>   workerPool?: string | null,
>   workerRelease?: string | null,
>   logging?: string | null,
>   pool?: {
>     name?: string | null,
>     resolvedWorkerRelease?: string | null,
>     workerRelease?: string | null
>   } | null,
>   sourceProvenanceHash?: string[] | null,
>   enableStructuredLogging?: boolean | null,
>   logStreamingOption?: string | null,
>   volumes?: {
>     name?: string | null,
>     path?: string | null
>   }[] | null,
>   secretEnv?: string[] | null,
>   automapSubstitutions?: boolean | null,
>   dynamicSubstitutions?: boolean | null,
>   machineType?: string | null,
>   env?: string[] | null,
>   requestedVerifyOption?: string | null,
>   substitutionOption?: string | null
> } | null
> ```

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   secretEnv?: Record<string, string> | null,
>   kmsKeyName?: string | null
> }[] | null
> ```

> [accordion] artifacts full type
>
> ```ts theme={null}
> {
>   images?: string[] | null,
>   npmPackages?: {
>     packagePath?: string | null,
>     repository?: string | null
>   }[] | null,
>   objects?: {
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     location?: string | null,
>     paths?: string[] | null
>   } | null,
>   pythonPackages?: {
>     repository?: string | null,
>     paths?: string[] | null
>   }[] | null,
>   oci?: {
>     registryPath?: string | null,
>     file?: string | null,
>     tags?: string[] | null
>   }[] | null,
>   goModules?: {
>     sourcePath?: string | null,
>     modulePath?: string | null,
>     repositoryName?: string | null,
>     repositoryLocation?: string | null,
>     repositoryProjectId?: string | null,
>     moduleVersion?: string | null
>   }[] | null,
>   genericArtifacts?: {
>     folder?: string | null,
>     registryPath?: string | null
>   }[] | null,
>   mavenArtifacts?: {
>     groupId?: string | null,
>     version?: string | null,
>     deployFolder?: string | null,
>     path?: string | null,
>     artifactId?: string | null,
>     repository?: string | null
>   }[] | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   priority?: string | null,
>   text?: string | null
> }[] | null
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   exitCode?: number | null,
>   entrypoint?: string | null,
>   name?: string | null,
>   env?: string[] | null,
>   results?: {
>     name?: string | null,
>     attestationType?: string | null,
>     attestationContent?: string | null
>   }[] | null,
>   waitFor?: string[] | null,
>   secretEnv?: string[] | null,
>   allowFailure?: boolean | null,
>   automapSubstitutions?: boolean | null,
>   args?: string[] | null,
>   volumes?: {
>     name?: string | null,
>     path?: string | null
>   }[] | null,
>   timing?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   status?: string | null,
>   pullTiming?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   timeout?: string | null,
>   script?: string | null,
>   id?: string | null,
>   allowExitCodes?: number[] | null,
>   dir?: string | null
> }[] | null
> ```

> [accordion] approval full type
>
> ```ts theme={null}
> {
>   config?: {
>     approvalRequired?: boolean | null
>   } | null,
>   result?: {
>     decision?: string | null,
>     approverAccount?: string | null,
>     approvalTime?: string | null,
>     url?: string | null,
>     comment?: string | null
>   } | null,
>   state?: string | null
> } | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   goModules?: {
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     uri?: string | null
>   }[] | null,
>   buildStepImages?: string[] | null,
>   genericArtifacts?: {
>     artifactFingerprint?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     artifactRegistryPackage?: string | null,
>     uri?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null
>   }[] | null,
>   npmPackages?: {
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     uri?: string | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null
>   }[] | null,
>   buildStepOutputs?: string[] | null,
>   artifactTiming?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   artifactManifest?: string | null,
>   images?: {
>     ociMediaType?: string | null,
>     name?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactRegistryPackage?: string | null,
>     digest?: string | null
>   }[] | null,
>   numArtifacts?: string | number | null,
>   buildStepResults?: Record<string, {
>     results?: Record<string, string> | null
>   }> | null,
>   resourceUsage?: {
>     peakCpuUtilization?: number | null,
>     averageMemoryUtilization?: number | null,
>     totalCpuDuration?: string | null,
>     peakMemoryUtilization?: number | null,
>     averageCpuUtilization?: number | null
>   } | null,
>   pythonPackages?: {
>     uri?: string | null,
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactRegistryPackage?: string | null
>   }[] | null,
>   mavenArtifacts?: {
>     uri?: string | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] timing full type
>
> ```ts theme={null}
> Record<string, {
>   startTime?: string | null,
>   endTime?: string | null
> }> | null
> ```

> [accordion] gitConfig full type
>
> ```ts theme={null}
> {
>   http?: {
>     proxySecretVersionName?: string | null
>   } | null
> } | null
> ```

> [accordion] sourceProvenance full type
>
> ```ts theme={null}
> {
>   resolvedStorageSource?: {
>     object?: string | null,
>     sourceFetcher?: string | null,
>     generation?: string | number | null,
>     bucket?: string | null
>   } | null,
>   fileHashes?: Record<string, {
>     fileHash?: {
>       type?: string | null,
>       value?: string | null
>     }[] | null
>   }> | null,
>   resolvedConnectedRepository?: {
>     repository?: string | null,
>     revision?: string | null,
>     dir?: string | null
>   } | null,
>   resolvedGitSource?: {
>     dir?: string | null,
>     url?: string | null,
>     revision?: string | null
>   } | null,
>   resolvedRepoSource?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   resolvedStorageSourceManifest?: {
>     object?: string | null,
>     bucket?: string | null,
>     generation?: string | number | null
>   } | null
> } | null
> ```

> [accordion] availableSecrets full type
>
> ```ts theme={null}
> {
>   secretManager?: {
>     versionName?: string | null,
>     env?: string | null
>   }[] | null,
>   inline?: {
>     kmsKeyName?: string | null,
>     envMap?: Record<string, string> | null
>   }[] | null
> } | null
> ```

> [accordion] failureInfo full type
>
> ```ts theme={null}
> {
>   detail?: string | null,
>   type?: string | null
> } | null
> ```

> [accordion] dependencies full type
>
> ```ts theme={null}
> {
>   gitSource?: {
>     fetchTags?: boolean | null,
>     destPath?: string | null,
>     depth?: string | number | null,
>     revision?: string | null,
>     recurseSubmodules?: boolean | null,
>     repository?: {
>       url?: string | null,
>       developerConnect?: string | null
>     } | null
>   } | null,
>   genericArtifact?: {
>     resource?: string | null,
>     destPath?: string | null
>   } | null,
>   empty?: boolean | null
> }[] | null
> ```

***

### builds.create

`build.builds.create`

Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.build.builds.create({
	projectId: 'demo-project',
	steps: [{
		name: 'gcr.io/cloud-builders/docker',
		args: ['build', '-t', 'us-central1-docker.pkg.dev/demo-project/docker/api:v1', '.'],
	}],
	images: ['us-central1-docker.pkg.dev/demo-project/docker/api:v1'],
	source: {
		storageSource: { bucket: 'demo-bucket', object: 'source.tgz' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Required. ID of the project. |
| `parent` | `string` | No | The parent resource where this build will be created. Format: `projects/{project}/locations/{location}` |
| `source` | `object` | No | Location of the source in a supported storage service. |
| `options` | `object` | No | Optional arguments to enable specific features of builds. |
| `secrets` | `object[]` | No | Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: [https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets](https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets) |
| `artifacts` | `object` | No | Artifacts produced by a build that should be uploaded upon successful completion of all build steps. |
| `steps` | `object[]` | No | Required. The operations to be performed on the workspace. |
| `substitutions` | `Record<string, string>` | No | Substitutions data for `Build` resource. |
| `serviceAccount` | `string` | No | IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. |
| `images` | `string[]` | No | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. |
| `tags` | `string[]` | No | Tags for annotation of a `Build`. These are not docker tags. |
| `gitConfig` | `object` | No | GitConfig is a configuration for git operations. |
| `timeout` | `string` | No | Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes. |
| `availableSecrets` | `object` | No | Secrets and secret environment variables. |
| `queueTtl` | `string` | No | TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create\_time. |
| `logsBucket` | `string` | No | Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| `dependencies` | `object[]` | No | Optional. Dependencies that the Cloud Build worker will fetch before executing user steps. |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   repoSource?: {
>     projectId?: string,
>     dir?: string,
>     branchName?: string,
>     invertRegex?: boolean,
>     repoName?: string,
>     commitSha?: string,
>     substitutions?: Record<string, string>,
>     tagName?: string
>   },
>   connectedRepository?: {
>     repository?: string,
>     revision?: string,
>     dir?: string
>   },
>   storageSource?: {
>     object?: string,
>     sourceFetcher?: SOURCE_FETCHER_UNSPECIFIED | GSUTIL | GCS_FETCHER,
>     generation?: string | number,
>     bucket?: string
>   },
>   gitSource?: {
>     dir?: string,
>     url?: string,
>     revision?: string
>   },
>   developerConnectConfig?: {
>     dir?: string,
>     gitRepositoryLink?: string,
>     revision?: string
>   },
>   storageSourceManifest?: {
>     object?: string,
>     bucket?: string,
>     generation?: string | number
>   }
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   diskSizeGb?: string | number,
>   defaultLogsBucketBehavior?: DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED | REGIONAL_USER_OWNED_BUCKET | LEGACY_BUCKET,
>   rankedMachineSeries?: (MACHINE_SERIES_UNSPECIFIED | MACHINE_SERIES_E | MACHINE_SERIES_N | MACHINE_SERIES_C)[],
>   pubsubTopic?: string,
>   workerPool?: string,
>   workerRelease?: string,
>   logging?: LOGGING_UNSPECIFIED | LEGACY | GCS_ONLY | STACKDRIVER_ONLY | CLOUD_LOGGING_ONLY | NONE,
>   pool?: {
>     name?: string
>   },
>   sourceProvenanceHash?: (NONE | SHA256 | MD5 | GO_MODULE_H1 | SHA512 | DIRSUM_SHA256)[],
>   enableStructuredLogging?: boolean,
>   logStreamingOption?: STREAM_DEFAULT | STREAM_ON | STREAM_OFF,
>   volumes?: {
>     name?: string,
>     path?: string
>   }[],
>   secretEnv?: string[],
>   automapSubstitutions?: boolean,
>   dynamicSubstitutions?: boolean,
>   machineType?: UNSPECIFIED | N1_HIGHCPU_8 | N1_HIGHCPU_32 | E2_HIGHCPU_8 | E2_HIGHCPU_32 | E2_MEDIUM | E2_STANDARD_2,
>   env?: string[],
>   requestedVerifyOption?: NOT_VERIFIED | VERIFIED | BEST_EFFORT,
>   substitutionOption?: MUST_MATCH | ALLOW_LOOSE
> }
> ```

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   secretEnv?: Record<string, string>,
>   kmsKeyName?: string
> }[]
> ```

> [accordion] artifacts full type
>
> ```ts theme={null}
> {
>   images?: string[],
>   npmPackages?: {
>     packagePath?: string,
>     repository?: string
>   }[],
>   objects?: {
>     location?: string,
>     paths?: string[]
>   },
>   pythonPackages?: {
>     repository?: string,
>     paths?: string[]
>   }[],
>   oci?: {
>     registryPath?: string,
>     file?: string,
>     tags?: string[]
>   }[],
>   goModules?: {
>     sourcePath?: string,
>     modulePath?: string,
>     repositoryName?: string,
>     repositoryLocation?: string,
>     repositoryProjectId?: string,
>     moduleVersion?: string
>   }[],
>   genericArtifacts?: {
>     folder?: string,
>     registryPath?: string
>   }[],
>   mavenArtifacts?: {
>     groupId?: string,
>     version?: string,
>     deployFolder?: string,
>     path?: string,
>     artifactId?: string,
>     repository?: string
>   }[]
> }
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   entrypoint?: string,
>   name?: string,
>   env?: string[],
>   results?: {
>     name?: string,
>     attestationType?: string,
>     attestationContent?: string
>   }[],
>   waitFor?: string[],
>   secretEnv?: string[],
>   allowFailure?: boolean,
>   automapSubstitutions?: boolean,
>   args?: string[],
>   volumes?: {
>     name?: string,
>     path?: string
>   }[],
>   timeout?: string,
>   script?: string,
>   id?: string,
>   allowExitCodes?: number[],
>   dir?: string
> }[]
> ```

> [accordion] gitConfig full type
>
> ```ts theme={null}
> {
>   http?: {
>     proxySecretVersionName?: string
>   }
> }
> ```

> [accordion] availableSecrets full type
>
> ```ts theme={null}
> {
>   secretManager?: {
>     versionName?: string,
>     env?: string
>   }[],
>   inline?: {
>     kmsKeyName?: string,
>     envMap?: Record<string, string>
>   }[]
> }
> ```

> [accordion] dependencies full type
>
> ```ts theme={null}
> {
>   gitSource?: {
>     fetchTags?: boolean,
>     destPath?: string,
>     depth?: string | number,
>     revision?: string,
>     recurseSubmodules?: boolean,
>     repository?: {
>       url?: string,
>       developerConnect?: string
>     }
>   },
>   genericArtifact?: {
>     resource?: string,
>     destPath?: string
>   },
>   empty?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### builds.get

`build.builds.get`

Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.builds.get({ projectId: 'demo-project', id: 'b1a2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Required. ID of the project. |
| `id` | `string` | Yes | Required. ID of the build. |
| `name` | `string` | No | The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createTime` | `string \| null` | No | Output only. Time at which the request to create the build was received. |
| `finishTime` | `string \| null` | No | Output only. Time at which execution of the build was finished. The difference between finish\_time and start\_time is the duration of the build's execution. |
| `source` | `object \| null` | No | Location of the source in a supported storage service. |
| `logUrl` | `string \| null` | No | Output only. URL to logs for this build in Google Cloud Console. |
| `options` | `object \| null` | No | Optional arguments to enable specific features of builds. |
| `statusDetail` | `string \| null` | No | Output only. Customer-readable message about the current status. |
| `secrets` | `object[] \| null` | No | Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: [https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets](https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets) |
| `status` | `string \| null` | No | Output only. Status of the build. |
| `projectId` | `string \| null` | No | Output only. ID of the project. |
| `artifacts` | `object \| null` | No | Artifacts produced by a build that should be uploaded upon successful completion of all build steps. |
| `warnings` | `object[] \| null` | No | Output only. Non-fatal problems encountered during the execution of the build. |
| `steps` | `object[] \| null` | No | Required. The operations to be performed on the workspace. |
| `approval` | `object \| null` | No | BuildApproval describes a build's approval configuration, state, and result. |
| `startTime` | `string \| null` | No | Output only. Time at which execution of the build was started. |
| `buildTriggerId` | `string \| null` | No | Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions data for `Build` resource. |
| `results` | `object \| null` | No | Artifacts created by the build pipeline. |
| `id` | `string \| null` | No | Output only. Unique identifier of the build. |
| `serviceAccount` | `string \| null` | No | IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. |
| `images` | `string[] \| null` | No | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. |
| `timing` | `object \| null` | No | Output only. Stores timing information for phases of the build. Valid keys are: \* BUILD: time to execute all build steps. \* PUSH: time to push all artifacts including docker images and non docker artifacts. \* FETCHSOURCE: time to fetch source. \* SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included. |
| `tags` | `string[] \| null` | No | Tags for annotation of a `Build`. These are not docker tags. |
| `gitConfig` | `object \| null` | No | GitConfig is a configuration for git operations. |
| `timeout` | `string \| null` | No | Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes. |
| `sourceProvenance` | `object \| null` | No | Provenance of the source. Ways to find the original source, or verify that some source was used for this build. |
| `availableSecrets` | `object \| null` | No | Secrets and secret environment variables. |
| `queueTtl` | `string \| null` | No | TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create\_time. |
| `failureInfo` | `object \| null` | No | A fatal problem encountered during the execution of the build. |
| `logsBucket` | `string \| null` | No | Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| `dependencies` | `object[] \| null` | No | Optional. Dependencies that the Cloud Build worker will fetch before executing user steps. |
| `name` | `string \| null` | No | Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where \{build} is a unique identifier generated by the service. |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   repoSource?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   connectedRepository?: {
>     repository?: string | null,
>     revision?: string | null,
>     dir?: string | null
>   } | null,
>   storageSource?: {
>     object?: string | null,
>     sourceFetcher?: string | null,
>     generation?: string | number | null,
>     bucket?: string | null
>   } | null,
>   gitSource?: {
>     dir?: string | null,
>     url?: string | null,
>     revision?: string | null
>   } | null,
>   developerConnectConfig?: {
>     dir?: string | null,
>     gitRepositoryLink?: string | null,
>     revision?: string | null
>   } | null,
>   storageSourceManifest?: {
>     object?: string | null,
>     bucket?: string | null,
>     generation?: string | number | null
>   } | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   resolvedWorkerRelease?: string | null,
>   diskSizeGb?: string | number | null,
>   defaultLogsBucketBehavior?: string | null,
>   rankedMachineSeries?: string[] | null,
>   pubsubTopic?: string | null,
>   workerPool?: string | null,
>   workerRelease?: string | null,
>   logging?: string | null,
>   pool?: {
>     name?: string | null,
>     resolvedWorkerRelease?: string | null,
>     workerRelease?: string | null
>   } | null,
>   sourceProvenanceHash?: string[] | null,
>   enableStructuredLogging?: boolean | null,
>   logStreamingOption?: string | null,
>   volumes?: {
>     name?: string | null,
>     path?: string | null
>   }[] | null,
>   secretEnv?: string[] | null,
>   automapSubstitutions?: boolean | null,
>   dynamicSubstitutions?: boolean | null,
>   machineType?: string | null,
>   env?: string[] | null,
>   requestedVerifyOption?: string | null,
>   substitutionOption?: string | null
> } | null
> ```

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   secretEnv?: Record<string, string> | null,
>   kmsKeyName?: string | null
> }[] | null
> ```

> [accordion] artifacts full type
>
> ```ts theme={null}
> {
>   images?: string[] | null,
>   npmPackages?: {
>     packagePath?: string | null,
>     repository?: string | null
>   }[] | null,
>   objects?: {
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     location?: string | null,
>     paths?: string[] | null
>   } | null,
>   pythonPackages?: {
>     repository?: string | null,
>     paths?: string[] | null
>   }[] | null,
>   oci?: {
>     registryPath?: string | null,
>     file?: string | null,
>     tags?: string[] | null
>   }[] | null,
>   goModules?: {
>     sourcePath?: string | null,
>     modulePath?: string | null,
>     repositoryName?: string | null,
>     repositoryLocation?: string | null,
>     repositoryProjectId?: string | null,
>     moduleVersion?: string | null
>   }[] | null,
>   genericArtifacts?: {
>     folder?: string | null,
>     registryPath?: string | null
>   }[] | null,
>   mavenArtifacts?: {
>     groupId?: string | null,
>     version?: string | null,
>     deployFolder?: string | null,
>     path?: string | null,
>     artifactId?: string | null,
>     repository?: string | null
>   }[] | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   priority?: string | null,
>   text?: string | null
> }[] | null
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   exitCode?: number | null,
>   entrypoint?: string | null,
>   name?: string | null,
>   env?: string[] | null,
>   results?: {
>     name?: string | null,
>     attestationType?: string | null,
>     attestationContent?: string | null
>   }[] | null,
>   waitFor?: string[] | null,
>   secretEnv?: string[] | null,
>   allowFailure?: boolean | null,
>   automapSubstitutions?: boolean | null,
>   args?: string[] | null,
>   volumes?: {
>     name?: string | null,
>     path?: string | null
>   }[] | null,
>   timing?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   status?: string | null,
>   pullTiming?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   timeout?: string | null,
>   script?: string | null,
>   id?: string | null,
>   allowExitCodes?: number[] | null,
>   dir?: string | null
> }[] | null
> ```

> [accordion] approval full type
>
> ```ts theme={null}
> {
>   config?: {
>     approvalRequired?: boolean | null
>   } | null,
>   result?: {
>     decision?: string | null,
>     approverAccount?: string | null,
>     approvalTime?: string | null,
>     url?: string | null,
>     comment?: string | null
>   } | null,
>   state?: string | null
> } | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   goModules?: {
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     uri?: string | null
>   }[] | null,
>   buildStepImages?: string[] | null,
>   genericArtifacts?: {
>     artifactFingerprint?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     artifactRegistryPackage?: string | null,
>     uri?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null
>   }[] | null,
>   npmPackages?: {
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     uri?: string | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null
>   }[] | null,
>   buildStepOutputs?: string[] | null,
>   artifactTiming?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   artifactManifest?: string | null,
>   images?: {
>     ociMediaType?: string | null,
>     name?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactRegistryPackage?: string | null,
>     digest?: string | null
>   }[] | null,
>   numArtifacts?: string | number | null,
>   buildStepResults?: Record<string, {
>     results?: Record<string, string> | null
>   }> | null,
>   resourceUsage?: {
>     peakCpuUtilization?: number | null,
>     averageMemoryUtilization?: number | null,
>     totalCpuDuration?: string | null,
>     peakMemoryUtilization?: number | null,
>     averageCpuUtilization?: number | null
>   } | null,
>   pythonPackages?: {
>     uri?: string | null,
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactRegistryPackage?: string | null
>   }[] | null,
>   mavenArtifacts?: {
>     uri?: string | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] timing full type
>
> ```ts theme={null}
> Record<string, {
>   startTime?: string | null,
>   endTime?: string | null
> }> | null
> ```

> [accordion] gitConfig full type
>
> ```ts theme={null}
> {
>   http?: {
>     proxySecretVersionName?: string | null
>   } | null
> } | null
> ```

> [accordion] sourceProvenance full type
>
> ```ts theme={null}
> {
>   resolvedStorageSource?: {
>     object?: string | null,
>     sourceFetcher?: string | null,
>     generation?: string | number | null,
>     bucket?: string | null
>   } | null,
>   fileHashes?: Record<string, {
>     fileHash?: {
>       type?: string | null,
>       value?: string | null
>     }[] | null
>   }> | null,
>   resolvedConnectedRepository?: {
>     repository?: string | null,
>     revision?: string | null,
>     dir?: string | null
>   } | null,
>   resolvedGitSource?: {
>     dir?: string | null,
>     url?: string | null,
>     revision?: string | null
>   } | null,
>   resolvedRepoSource?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   resolvedStorageSourceManifest?: {
>     object?: string | null,
>     bucket?: string | null,
>     generation?: string | number | null
>   } | null
> } | null
> ```

> [accordion] availableSecrets full type
>
> ```ts theme={null}
> {
>   secretManager?: {
>     versionName?: string | null,
>     env?: string | null
>   }[] | null,
>   inline?: {
>     kmsKeyName?: string | null,
>     envMap?: Record<string, string> | null
>   }[] | null
> } | null
> ```

> [accordion] failureInfo full type
>
> ```ts theme={null}
> {
>   detail?: string | null,
>   type?: string | null
> } | null
> ```

> [accordion] dependencies full type
>
> ```ts theme={null}
> {
>   gitSource?: {
>     fetchTags?: boolean | null,
>     destPath?: string | null,
>     depth?: string | number | null,
>     revision?: string | null,
>     recurseSubmodules?: boolean | null,
>     repository?: {
>       url?: string | null,
>       developerConnect?: string | null
>     } | null
>   } | null,
>   genericArtifact?: {
>     resource?: string | null,
>     destPath?: string | null
>   } | null,
>   empty?: boolean | null
> }[] | null
> ```

***

### builds.list

`build.builds.list`

Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.builds.list({ projectId: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | The page token for the next page of Builds. If unspecified, the first page of results is returned. If the token is rejected for any reason, INVALID\_ARGUMENT will be thrown. In this case, the token should be discarded, and pagination should be restarted from the first page of results. See [https://google.aip.dev/158](https://google.aip.dev/158) for more. |
| `pageSize` | `number` | No | Number of results to return in the list. |
| `projectId` | `string` | Yes | Required. ID of the project. |
| `parent` | `string` | No | The parent of the collection of `Builds`. Format: `projects/{project}/locations/{location}` |
| `filter` | `string` | No | The raw filter text to constrain the results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `builds` | `object[] \| null` | No | Builds will be sorted by `create_time`, descending. |
| `nextPageToken` | `string \| null` | No | Token to receive the next page of results. This will be absent if the end of the response list has been reached. |

> [accordion] builds full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   finishTime?: string | null,
>   source?: {
>     repoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     connectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     storageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     gitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     developerConnectConfig?: {
>       dir?: string | null,
>       gitRepositoryLink?: string | null,
>       revision?: string | null
>     } | null,
>     storageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   logUrl?: string | null,
>   options?: {
>     resolvedWorkerRelease?: string | null,
>     diskSizeGb?: string | number | null,
>     defaultLogsBucketBehavior?: string | null,
>     rankedMachineSeries?: string[] | null,
>     pubsubTopic?: string | null,
>     workerPool?: string | null,
>     workerRelease?: string | null,
>     logging?: string | null,
>     pool?: {
>       name?: string | null,
>       resolvedWorkerRelease?: string | null,
>       workerRelease?: string | null
>     } | null,
>     sourceProvenanceHash?: string[] | null,
>     enableStructuredLogging?: boolean | null,
>     logStreamingOption?: string | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     secretEnv?: string[] | null,
>     automapSubstitutions?: boolean | null,
>     dynamicSubstitutions?: boolean | null,
>     machineType?: string | null,
>     env?: string[] | null,
>     requestedVerifyOption?: string | null,
>     substitutionOption?: string | null
>   } | null,
>   statusDetail?: string | null,
>   secrets?: {
>     secretEnv?: Record<string, string> | null,
>     kmsKeyName?: string | null
>   }[] | null,
>   status?: string | null,
>   projectId?: string | null,
>   artifacts?: {
>     images?: string[] | null,
>     npmPackages?: {
>       packagePath?: string | null,
>       repository?: string | null
>     }[] | null,
>     objects?: {
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       location?: string | null,
>       paths?: string[] | null
>     } | null,
>     pythonPackages?: {
>       repository?: string | null,
>       paths?: string[] | null
>     }[] | null,
>     oci?: {
>       registryPath?: string | null,
>       file?: string | null,
>       tags?: string[] | null
>     }[] | null,
>     goModules?: {
>       sourcePath?: string | null,
>       modulePath?: string | null,
>       repositoryName?: string | null,
>       repositoryLocation?: string | null,
>       repositoryProjectId?: string | null,
>       moduleVersion?: string | null
>     }[] | null,
>     genericArtifacts?: {
>       folder?: string | null,
>       registryPath?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       groupId?: string | null,
>       version?: string | null,
>       deployFolder?: string | null,
>       path?: string | null,
>       artifactId?: string | null,
>       repository?: string | null
>     }[] | null
>   } | null,
>   warnings?: {
>     priority?: string | null,
>     text?: string | null
>   }[] | null,
>   steps?: {
>     exitCode?: number | null,
>     entrypoint?: string | null,
>     name?: string | null,
>     env?: string[] | null,
>     results?: {
>       name?: string | null,
>       attestationType?: string | null,
>       attestationContent?: string | null
>     }[] | null,
>     waitFor?: string[] | null,
>     secretEnv?: string[] | null,
>     allowFailure?: boolean | null,
>     automapSubstitutions?: boolean | null,
>     args?: string[] | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     status?: string | null,
>     pullTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     timeout?: string | null,
>     script?: string | null,
>     id?: string | null,
>     allowExitCodes?: number[] | null,
>     dir?: string | null
>   }[] | null,
>   approval?: {
>     config?: {
>       approvalRequired?: boolean | null
>     } | null,
>     result?: {
>       decision?: string | null,
>       approverAccount?: string | null,
>       approvalTime?: string | null,
>       url?: string | null,
>       comment?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   startTime?: string | null,
>   buildTriggerId?: string | null,
>   substitutions?: Record<string, string> | null,
>   results?: {
>     goModules?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       uri?: string | null
>     }[] | null,
>     buildStepImages?: string[] | null,
>     genericArtifacts?: {
>       artifactFingerprint?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       artifactRegistryPackage?: string | null,
>       uri?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     npmPackages?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     buildStepOutputs?: string[] | null,
>     artifactTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactManifest?: string | null,
>     images?: {
>       ociMediaType?: string | null,
>       name?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       digest?: string | null
>     }[] | null,
>     numArtifacts?: string | number | null,
>     buildStepResults?: Record<string, {
>       results?: Record<string, string> | null
>     }> | null,
>     resourceUsage?: {
>       peakCpuUtilization?: number | null,
>       averageMemoryUtilization?: number | null,
>       totalCpuDuration?: string | null,
>       peakMemoryUtilization?: number | null,
>       averageCpuUtilization?: number | null
>     } | null,
>     pythonPackages?: {
>       uri?: string | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     }[] | null
>   } | null,
>   id?: string | null,
>   serviceAccount?: string | null,
>   images?: string[] | null,
>   timing?: Record<string, {
>     startTime?: string | null,
>     endTime?: string | null
>   }> | null,
>   tags?: string[] | null,
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string | null
>     } | null
>   } | null,
>   timeout?: string | null,
>   sourceProvenance?: {
>     resolvedStorageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     resolvedConnectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     resolvedGitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     resolvedRepoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     resolvedStorageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string | null,
>       env?: string | null
>     }[] | null,
>     inline?: {
>       kmsKeyName?: string | null,
>       envMap?: Record<string, string> | null
>     }[] | null
>   } | null,
>   queueTtl?: string | null,
>   failureInfo?: {
>     detail?: string | null,
>     type?: string | null
>   } | null,
>   logsBucket?: string | null,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean | null,
>       destPath?: string | null,
>       depth?: string | number | null,
>       revision?: string | null,
>       recurseSubmodules?: boolean | null,
>       repository?: {
>         url?: string | null,
>         developerConnect?: string | null
>       } | null
>     } | null,
>     genericArtifact?: {
>       resource?: string | null,
>       destPath?: string | null
>     } | null,
>     empty?: boolean | null
>   }[] | null,
>   name?: string | null
> }[] | null
> ```

***

### builds.retry

`build.builds.retry`

Creates a new build based on the specified build. Note: This method only creates builds in the "global" region when using the legacy resource path projects/\{project\_id}/builds/\{id}:retry

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.build.builds.retry({ id: 'b1a2c3', projectId: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Required. Build ID of the original build. |
| `projectId` | `string` | Yes | Required. ID of the project. |
| `body_id` | `string` | No | Required. Build ID of the original build. |
| `name` | `string` | No | The name of the `Build` to retry. Format: `projects/{project}/locations/{location}/builds/{build}` |
| `body_projectId` | `string` | No | Required. ID of the project. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### githubEnterpriseConfigs.create

`build.githubEnterpriseConfigs.create`

Create an association between a GCP project and a GitHub Enterprise server

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.githubEnterpriseConfigs.create({
	parent: 'projects/demo-project',
	gheConfigId: 'ghe',
	hostUrl: 'https://github.example.com',
	appId: '12345',
	displayName: 'GitHub Enterprise',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | No | ID of the project. |
| `parent` | `string` | Yes | Name of the parent project. For example: projects/\{$project_number&#125; or projects/&#123;$project\_id} Format: `projects/<id>`. |
| `gheConfigId` | `string` | No | Optional. The ID to use for the GithubEnterpriseConfig, which will become the final component of the GithubEnterpriseConfig's resource name. ghe\_config\_id must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character |
| `name` | `string` | No | Identifier. The full resource name for the GitHubEnterpriseConfig For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" |
| `peeredNetwork` | `string` | No | Optional. The network to be used when reaching out to the GitHub Enterprise server. The VPC network must be enabled for private service connection. This should be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the GitHub Enterprise server will be made over the public internet. Must be in the format `projects/{project}/global/networks/{network}`, where \{project} is a project number or id and \{network} is the name of a VPC network in the project. |
| `hostUrl` | `string` | No | The URL of the github enterprise host the configuration is for. |
| `secrets` | `object` | No | GitHubEnterpriseSecrets represents the names of all necessary secrets in Secret Manager for a GitHub Enterprise server. Format is: projects//secrets/. |
| `appId` | `string \| number` | No | Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise server. |
| `displayName` | `string` | No | Optional. Name to display for this config. |
| `webhookKey` | `string` | No | The key that should be attached to webhook calls to the ReceiveWebhook endpoint. |
| `sslCa` | `string` | No | Optional. SSL certificate to use for requests to GitHub Enterprise. |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   oauthClientIdVersionName?: string,
>   privateKeyName?: string,
>   oauthClientIdName?: string,
>   oauthSecretName?: string,
>   privateKeyVersionName?: string,
>   webhookSecretName?: string,
>   webhookSecretVersionName?: string,
>   oauthSecretVersionName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### githubEnterpriseConfigs.delete

`build.githubEnterpriseConfigs.delete`

Delete an association between a GCP project and a GitHub Enterprise server

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.build.githubEnterpriseConfigs.delete({ name: 'projects/demo-project/githubEnterpriseConfigs/ghe' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | This field should contain the name of the enterprise config resource. For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" Format: `projects/<id>/githubEnterpriseConfigs/<id>`. |
| `projectId` | `string` | No | ID of the project |
| `configId` | `string` | No | Unique identifier of the `GitHubEnterpriseConfig` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### githubEnterpriseConfigs.get

`build.githubEnterpriseConfigs.get`

Retrieve a GitHubEnterpriseConfig

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.githubEnterpriseConfigs.get({ name: 'projects/demo-project/githubEnterpriseConfigs/ghe' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | This field should contain the name of the enterprise config resource. For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" Format: `projects/<id>/githubEnterpriseConfigs/<id>`. |
| `configId` | `string` | No | Unique identifier of the `GitHubEnterpriseConfig` |
| `projectId` | `string` | No | ID of the project |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The full resource name for the GitHubEnterpriseConfig For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" |
| `peeredNetwork` | `string \| null` | No | Optional. The network to be used when reaching out to the GitHub Enterprise server. The VPC network must be enabled for private service connection. This should be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the GitHub Enterprise server will be made over the public internet. Must be in the format `projects/{project}/global/networks/{network}`, where \{project} is a project number or id and \{network} is the name of a VPC network in the project. |
| `hostUrl` | `string \| null` | No | The URL of the github enterprise host the configuration is for. |
| `createTime` | `string \| null` | No | Output only. Time when the installation was associated with the project. |
| `secrets` | `object \| null` | No | GitHubEnterpriseSecrets represents the names of all necessary secrets in Secret Manager for a GitHub Enterprise server. Format is: projects//secrets/. |
| `appId` | `string \| number \| null` | No | Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise server. |
| `displayName` | `string \| null` | No | Optional. Name to display for this config. |
| `webhookKey` | `string \| null` | No | The key that should be attached to webhook calls to the ReceiveWebhook endpoint. |
| `sslCa` | `string \| null` | No | Optional. SSL certificate to use for requests to GitHub Enterprise. |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   oauthClientIdVersionName?: string | null,
>   privateKeyName?: string | null,
>   oauthClientIdName?: string | null,
>   oauthSecretName?: string | null,
>   privateKeyVersionName?: string | null,
>   webhookSecretName?: string | null,
>   webhookSecretVersionName?: string | null,
>   oauthSecretVersionName?: string | null
> } | null
> ```

***

### githubEnterpriseConfigs.list

`build.githubEnterpriseConfigs.list`

List all GitHubEnterpriseConfigs for a given project

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.githubEnterpriseConfigs.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | No | ID of the project |
| `parent` | `string` | Yes | Name of the parent project. For example: projects/\{$project_number&#125; or projects/&#123;$project\_id} Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configs` | `object[] \| null` | No | A list of GitHubEnterpriseConfigs |

> [accordion] configs full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   peeredNetwork?: string | null,
>   hostUrl?: string | null,
>   createTime?: string | null,
>   secrets?: {
>     oauthClientIdVersionName?: string | null,
>     privateKeyName?: string | null,
>     oauthClientIdName?: string | null,
>     oauthSecretName?: string | null,
>     privateKeyVersionName?: string | null,
>     webhookSecretName?: string | null,
>     webhookSecretVersionName?: string | null,
>     oauthSecretVersionName?: string | null
>   } | null,
>   appId?: string | number | null,
>   displayName?: string | null,
>   webhookKey?: string | null,
>   sslCa?: string | null
> }[] | null
> ```

***

### githubEnterpriseConfigs.patch

`build.githubEnterpriseConfigs.patch`

Update an association between a GCP project and a GitHub Enterprise server

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.githubEnterpriseConfigs.patch({ name: 'projects/demo-project/githubEnterpriseConfigs/ghe', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed. |
| `name` | `string` | Yes | Identifier. The full resource name for the GitHubEnterpriseConfig For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" Format: `projects/<id>/githubEnterpriseConfigs/<id>`. |
| `body_name` | `string` | No | Identifier. The full resource name for the GitHubEnterpriseConfig For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" |
| `peeredNetwork` | `string` | No | Optional. The network to be used when reaching out to the GitHub Enterprise server. The VPC network must be enabled for private service connection. This should be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the GitHub Enterprise server will be made over the public internet. Must be in the format `projects/{project}/global/networks/{network}`, where \{project} is a project number or id and \{network} is the name of a VPC network in the project. |
| `hostUrl` | `string` | No | The URL of the github enterprise host the configuration is for. |
| `secrets` | `object` | No | GitHubEnterpriseSecrets represents the names of all necessary secrets in Secret Manager for a GitHub Enterprise server. Format is: projects//secrets/. |
| `appId` | `string \| number` | No | Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise server. |
| `displayName` | `string` | No | Optional. Name to display for this config. |
| `webhookKey` | `string` | No | The key that should be attached to webhook calls to the ReceiveWebhook endpoint. |
| `sslCa` | `string` | No | Optional. SSL certificate to use for requests to GitHub Enterprise. |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   oauthClientIdVersionName?: string,
>   privateKeyName?: string,
>   oauthClientIdName?: string,
>   oauthSecretName?: string,
>   privateKeyVersionName?: string,
>   webhookSecretName?: string,
>   webhookSecretVersionName?: string,
>   oauthSecretVersionName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.bitbucketServerConfigs.connectedRepositories.batchCreate

`build.locations.bitbucketServerConfigs.connectedRepositories.batchCreate`

Batch connecting Bitbucket Server repositories to Cloud Build

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.bitbucketServerConfigs.connectedRepositories.batchCreate({
	parent: 'projects/demo-project/locations/us-central1/bitbucketServerConfigs/bbs',
	requests: [{
		parent: 'projects/demo-project/locations/us-central1/bitbucketServerConfigs/bbs',
		bitbucketServerConnectedRepository: {
			parent: 'projects/demo-project/locations/us-central1/bitbucketServerConfigs/bbs',
			repo: { projectKey: 'APP', repoSlug: 'api' },
		},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The name of the `BitbucketServerConfig` that added connected repository. Format: `projects/{project}/locations/{location}/bitbucketServerConfigs/{config}` Format: `projects/<id>/locations/<id>/bitbucketServerConfigs/<id>`. |
| `requests` | `object[]` | No | Required. Requests to connect Bitbucket Server repositories. |

> [accordion] requests full type
>
> ```ts theme={null}
> {
>   parent?: string,
>   bitbucketServerConnectedRepository?: {
>     repo?: {
>       repoSlug?: string,
>       projectKey?: string
>     },
>     parent?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.bitbucketServerConfigs.create

`build.locations.bitbucketServerConfigs.create`

Creates a new `BitbucketServerConfig`. This API is experimental

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.bitbucketServerConfigs.create({
	parent: 'projects/demo-project/locations/us-central1',
	bitbucketServerConfigId: 'bbs',
	hostUri: 'https://bitbucket.example.com',
	username: 'build-bot',
	apiKey: 'the API key linked to the host',
	secrets: { adminAccessTokenVersionName: 'projects/demo-project/secrets/bbs-admin/versions/1', readAccessTokenVersionName: 'projects/demo-project/secrets/bbs-read/versions/1', webhookSecretVersionName: 'projects/demo-project/secrets/bbs-hook/versions/1' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bitbucketServerConfigId` | `string` | No | Optional. The ID to use for the BitbucketServerConfig, which will become the final component of the BitbucketServerConfig's resource name. bitbucket\_server\_config\_id must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `parent` | `string` | Yes | Required. Name of the parent resource. Format: `projects/<id>/locations/<id>`. |
| `peeredNetworkIpRange` | `string` | No | Immutable. IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g. `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a 29 bit prefix size. `/16` would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of `/24` will be used. The field only has an effect if peered\_network is set. |
| `peeredNetwork` | `string` | No | Optional. The network to be used when reaching out to the Bitbucket Server instance. The VPC network must be enabled for private service connection. This should be set if the Bitbucket Server instance is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the Bitbucket Server instance will be made over the public internet. Must be in the format `projects/{project}/global/networks/{network}`, where \{project} is a project number or id and \{network} is the name of a VPC network in the project. |
| `username` | `string` | No | Username of the account Cloud Build will use on Bitbucket Server. |
| `secrets` | `object` | No | BitbucketServerSecrets represents the secrets in Secret Manager for a Bitbucket Server. |
| `createTime` | `string` | No | Time when the config was created. |
| `sslCa` | `string` | No | Optional. SSL certificate to use for requests to Bitbucket Server. The format should be PEM format but the extension can be one of .pem, .cer, or .crt. |
| `name` | `string` | No | Identifier. The resource name for the config. |
| `apiKey` | `string` | No | Required. Immutable. API Key that will be attached to webhook. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig. |
| `hostUri` | `string` | No | Required. Immutable. The URI of the Bitbucket Server host. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig. |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   webhookSecretVersionName?: string,
>   readAccessTokenVersionName?: string,
>   adminAccessTokenVersionName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.bitbucketServerConfigs.delete

`build.locations.bitbucketServerConfigs.delete`

Delete a `BitbucketServerConfig`. This API is experimental

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.build.locations.bitbucketServerConfigs.delete({ name: 'projects/demo-project/locations/us-central1/bitbucketServerConfigs/bbs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The config resource name. Format: `projects/<id>/locations/<id>/bitbucketServerConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.bitbucketServerConfigs.get

`build.locations.bitbucketServerConfigs.get`

Retrieve a `BitbucketServerConfig`. This API is experimental

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.bitbucketServerConfigs.get({ name: 'projects/demo-project/locations/us-central1/bitbucketServerConfigs/bbs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The config resource name. Format: `projects/<id>/locations/<id>/bitbucketServerConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `peeredNetworkIpRange` | `string \| null` | No | Immutable. IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g. `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a 29 bit prefix size. `/16` would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of `/24` will be used. The field only has an effect if peered\_network is set. |
| `peeredNetwork` | `string \| null` | No | Optional. The network to be used when reaching out to the Bitbucket Server instance. The VPC network must be enabled for private service connection. This should be set if the Bitbucket Server instance is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the Bitbucket Server instance will be made over the public internet. Must be in the format `projects/{project}/global/networks/{network}`, where \{project} is a project number or id and \{network} is the name of a VPC network in the project. |
| `connectedRepositories` | `object[] \| null` | No | Output only. Connected Bitbucket Server repositories for this config. |
| `username` | `string \| null` | No | Username of the account Cloud Build will use on Bitbucket Server. |
| `secrets` | `object \| null` | No | BitbucketServerSecrets represents the secrets in Secret Manager for a Bitbucket Server. |
| `createTime` | `string \| null` | No | Time when the config was created. |
| `webhookKey` | `string \| null` | No | Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config. |
| `sslCa` | `string \| null` | No | Optional. SSL certificate to use for requests to Bitbucket Server. The format should be PEM format but the extension can be one of .pem, .cer, or .crt. |
| `name` | `string \| null` | No | Identifier. The resource name for the config. |
| `apiKey` | `string \| null` | No | Required. Immutable. API Key that will be attached to webhook. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig. |
| `hostUri` | `string \| null` | No | Required. Immutable. The URI of the Bitbucket Server host. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig. |

> [accordion] connectedRepositories full type
>
> ```ts theme={null}
> {
>   repoSlug?: string | null,
>   webhookId?: number | null,
>   projectKey?: string | null
> }[] | null
> ```

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   webhookSecretVersionName?: string | null,
>   readAccessTokenVersionName?: string | null,
>   adminAccessTokenVersionName?: string | null
> } | null
> ```

***

### locations.bitbucketServerConfigs.list

`build.locations.bitbucketServerConfigs.list`

List all `BitbucketServerConfigs` for a given project. This API is experimental (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.bitbucketServerConfigs.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A page token, received from a previous `ListBitbucketServerConfigsRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBitbucketServerConfigsRequest` must match the call that provided the page token. |
| `parent` | `string` | Yes | Required. Name of the parent resource. Format: `projects/<id>/locations/<id>`. |
| `pageSize` | `number` | No | The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 50 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `bitbucketServerConfigs` | `object[] \| null` | No | A list of BitbucketServerConfigs |

> [accordion] bitbucketServerConfigs full type
>
> ```ts theme={null}
> {
>   peeredNetworkIpRange?: string | null,
>   peeredNetwork?: string | null,
>   connectedRepositories?: {
>     repoSlug?: string | null,
>     webhookId?: number | null,
>     projectKey?: string | null
>   }[] | null,
>   username?: string | null,
>   secrets?: {
>     webhookSecretVersionName?: string | null,
>     readAccessTokenVersionName?: string | null,
>     adminAccessTokenVersionName?: string | null
>   } | null,
>   createTime?: string | null,
>   webhookKey?: string | null,
>   sslCa?: string | null,
>   name?: string | null,
>   apiKey?: string | null,
>   hostUri?: string | null
> }[] | null
> ```

***

### locations.bitbucketServerConfigs.patch

`build.locations.bitbucketServerConfigs.patch`

Updates an existing `BitbucketServerConfig`. This API is experimental

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.bitbucketServerConfigs.patch({ name: 'projects/demo-project/locations/us-central1/bitbucketServerConfigs/bbs', updateMask: 'username', username: 'build-bot' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The resource name for the config. Format: `projects/<id>/locations/<id>/bitbucketServerConfigs/<id>`. |
| `updateMask` | `string` | No | Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed. |
| `peeredNetworkIpRange` | `string` | No | Immutable. IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g. `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a 29 bit prefix size. `/16` would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of `/24` will be used. The field only has an effect if peered\_network is set. |
| `peeredNetwork` | `string` | No | Optional. The network to be used when reaching out to the Bitbucket Server instance. The VPC network must be enabled for private service connection. This should be set if the Bitbucket Server instance is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the Bitbucket Server instance will be made over the public internet. Must be in the format `projects/{project}/global/networks/{network}`, where \{project} is a project number or id and \{network} is the name of a VPC network in the project. |
| `username` | `string` | No | Username of the account Cloud Build will use on Bitbucket Server. |
| `secrets` | `object` | No | BitbucketServerSecrets represents the secrets in Secret Manager for a Bitbucket Server. |
| `createTime` | `string` | No | Time when the config was created. |
| `sslCa` | `string` | No | Optional. SSL certificate to use for requests to Bitbucket Server. The format should be PEM format but the extension can be one of .pem, .cer, or .crt. |
| `body_name` | `string` | No | Identifier. The resource name for the config. |
| `apiKey` | `string` | No | Required. Immutable. API Key that will be attached to webhook. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig. |
| `hostUri` | `string` | No | Required. Immutable. The URI of the Bitbucket Server host. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig. |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   webhookSecretVersionName?: string,
>   readAccessTokenVersionName?: string,
>   adminAccessTokenVersionName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.bitbucketServerConfigs.removeBitbucketServerConnectedRepository

`build.locations.bitbucketServerConfigs.removeBitbucketServerConnectedRepository`

Remove a Bitbucket Server repository from a given BitbucketServerConfig's connected repositories. This API is experimental

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.build.locations.bitbucketServerConfigs.removeBitbucketServerConnectedRepository({
	config: 'projects/demo-project/locations/us-central1/bitbucketServerConfigs/bbs',
	connectedRepository: { projectKey: 'APP', repoSlug: 'api' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `config` | `string` | Yes | Required. The name of the `BitbucketServerConfig` to remove a connected repository. Format: `projects/{project}/locations/{location}/bitbucketServerConfigs/{config}` Format: `projects/<id>/locations/<id>/bitbucketServerConfigs/<id>`. |
| `connectedRepository` | `object` | No | BitbucketServerRepositoryId identifies a specific repository hosted on a Bitbucket Server. |

> [accordion] connectedRepository full type
>
> ```ts theme={null}
> {
>   repoSlug?: string,
>   projectKey?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.bitbucketServerConfigs.repos.list

`build.locations.bitbucketServerConfigs.repos.list`

List all repositories for a given `BitbucketServerConfig`. This API is experimental (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.bitbucketServerConfigs.repos.list({ parent: 'projects/demo-project/locations/us-central1/bitbucketServerConfigs/bbs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. Name of the parent resource. Format: `projects/<id>/locations/<id>/bitbucketServerConfigs/<id>`. |
| `pageSize` | `number` | No | The maximum number of configs to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `pageToken` | `string` | No | A page token, received from a previous `ListBitbucketServerRepositoriesRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBitbucketServerConfigsRequest` must match the call that provided the page token. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bitbucketServerRepositories` | `object[] \| null` | No | List of Bitbucket Server repositories. |
| `nextPageToken` | `string \| null` | No | A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

> [accordion] bitbucketServerRepositories full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   description?: string | null,
>   repoId?: {
>     repoSlug?: string | null,
>     webhookId?: number | null,
>     projectKey?: string | null
>   } | null,
>   browseUri?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.builds.approve

`build.locations.builds.approve`

Approves or rejects a pending build. If approved, the returned long-running operation (LRO) will be analogous to the LRO returned from a CreateBuild call

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.builds.approve({
	name: 'projects/demo-project/locations/us-central1/builds/b1a2c3',
	approvalResult: { decision: 'APPROVED', comment: 'Ship it' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Name of the target build. For example: "projects/\{$project_id&#125;/builds/&#123;$build\_id}" Format: `projects/<id>/locations/<id>/builds/<id>`. |
| `approvalResult` | `object` | No | ApprovalResult describes the decision and associated metadata of a manual approval of a build. |

> [accordion] approvalResult full type
>
> ```ts theme={null}
> {
>   decision?: DECISION_UNSPECIFIED | APPROVED | REJECTED,
>   url?: string,
>   comment?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.builds.cancel

`build.locations.builds.cancel`

Cancels a build in progress. Note: This method only cancels builds in the "global" region when using the legacy resource path projects/\{project\_id}/builds/\{id}:cancel

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.builds.cancel({ name: 'projects/demo-project/locations/us-central1/builds/b1a2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the `Build` to cancel. Format: `projects/{project}/locations/{location}/builds/{build}` Format: `projects/<id>/locations/<id>/builds/<id>`. |
| `id` | `string` | No | Required. ID of the build. |
| `body_name` | `string` | No | The name of the `Build` to cancel. Format: `projects/{project}/locations/{location}/builds/{build}` |
| `projectId` | `string` | No | Required. ID of the project. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createTime` | `string \| null` | No | Output only. Time at which the request to create the build was received. |
| `finishTime` | `string \| null` | No | Output only. Time at which execution of the build was finished. The difference between finish\_time and start\_time is the duration of the build's execution. |
| `source` | `object \| null` | No | Location of the source in a supported storage service. |
| `logUrl` | `string \| null` | No | Output only. URL to logs for this build in Google Cloud Console. |
| `options` | `object \| null` | No | Optional arguments to enable specific features of builds. |
| `statusDetail` | `string \| null` | No | Output only. Customer-readable message about the current status. |
| `secrets` | `object[] \| null` | No | Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: [https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets](https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets) |
| `status` | `string \| null` | No | Output only. Status of the build. |
| `projectId` | `string \| null` | No | Output only. ID of the project. |
| `artifacts` | `object \| null` | No | Artifacts produced by a build that should be uploaded upon successful completion of all build steps. |
| `warnings` | `object[] \| null` | No | Output only. Non-fatal problems encountered during the execution of the build. |
| `steps` | `object[] \| null` | No | Required. The operations to be performed on the workspace. |
| `approval` | `object \| null` | No | BuildApproval describes a build's approval configuration, state, and result. |
| `startTime` | `string \| null` | No | Output only. Time at which execution of the build was started. |
| `buildTriggerId` | `string \| null` | No | Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions data for `Build` resource. |
| `results` | `object \| null` | No | Artifacts created by the build pipeline. |
| `id` | `string \| null` | No | Output only. Unique identifier of the build. |
| `serviceAccount` | `string \| null` | No | IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. |
| `images` | `string[] \| null` | No | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. |
| `timing` | `object \| null` | No | Output only. Stores timing information for phases of the build. Valid keys are: \* BUILD: time to execute all build steps. \* PUSH: time to push all artifacts including docker images and non docker artifacts. \* FETCHSOURCE: time to fetch source. \* SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included. |
| `tags` | `string[] \| null` | No | Tags for annotation of a `Build`. These are not docker tags. |
| `gitConfig` | `object \| null` | No | GitConfig is a configuration for git operations. |
| `timeout` | `string \| null` | No | Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes. |
| `sourceProvenance` | `object \| null` | No | Provenance of the source. Ways to find the original source, or verify that some source was used for this build. |
| `availableSecrets` | `object \| null` | No | Secrets and secret environment variables. |
| `queueTtl` | `string \| null` | No | TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create\_time. |
| `failureInfo` | `object \| null` | No | A fatal problem encountered during the execution of the build. |
| `logsBucket` | `string \| null` | No | Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| `dependencies` | `object[] \| null` | No | Optional. Dependencies that the Cloud Build worker will fetch before executing user steps. |
| `name` | `string \| null` | No | Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where \{build} is a unique identifier generated by the service. |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   repoSource?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   connectedRepository?: {
>     repository?: string | null,
>     revision?: string | null,
>     dir?: string | null
>   } | null,
>   storageSource?: {
>     object?: string | null,
>     sourceFetcher?: string | null,
>     generation?: string | number | null,
>     bucket?: string | null
>   } | null,
>   gitSource?: {
>     dir?: string | null,
>     url?: string | null,
>     revision?: string | null
>   } | null,
>   developerConnectConfig?: {
>     dir?: string | null,
>     gitRepositoryLink?: string | null,
>     revision?: string | null
>   } | null,
>   storageSourceManifest?: {
>     object?: string | null,
>     bucket?: string | null,
>     generation?: string | number | null
>   } | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   resolvedWorkerRelease?: string | null,
>   diskSizeGb?: string | number | null,
>   defaultLogsBucketBehavior?: string | null,
>   rankedMachineSeries?: string[] | null,
>   pubsubTopic?: string | null,
>   workerPool?: string | null,
>   workerRelease?: string | null,
>   logging?: string | null,
>   pool?: {
>     name?: string | null,
>     resolvedWorkerRelease?: string | null,
>     workerRelease?: string | null
>   } | null,
>   sourceProvenanceHash?: string[] | null,
>   enableStructuredLogging?: boolean | null,
>   logStreamingOption?: string | null,
>   volumes?: {
>     name?: string | null,
>     path?: string | null
>   }[] | null,
>   secretEnv?: string[] | null,
>   automapSubstitutions?: boolean | null,
>   dynamicSubstitutions?: boolean | null,
>   machineType?: string | null,
>   env?: string[] | null,
>   requestedVerifyOption?: string | null,
>   substitutionOption?: string | null
> } | null
> ```

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   secretEnv?: Record<string, string> | null,
>   kmsKeyName?: string | null
> }[] | null
> ```

> [accordion] artifacts full type
>
> ```ts theme={null}
> {
>   images?: string[] | null,
>   npmPackages?: {
>     packagePath?: string | null,
>     repository?: string | null
>   }[] | null,
>   objects?: {
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     location?: string | null,
>     paths?: string[] | null
>   } | null,
>   pythonPackages?: {
>     repository?: string | null,
>     paths?: string[] | null
>   }[] | null,
>   oci?: {
>     registryPath?: string | null,
>     file?: string | null,
>     tags?: string[] | null
>   }[] | null,
>   goModules?: {
>     sourcePath?: string | null,
>     modulePath?: string | null,
>     repositoryName?: string | null,
>     repositoryLocation?: string | null,
>     repositoryProjectId?: string | null,
>     moduleVersion?: string | null
>   }[] | null,
>   genericArtifacts?: {
>     folder?: string | null,
>     registryPath?: string | null
>   }[] | null,
>   mavenArtifacts?: {
>     groupId?: string | null,
>     version?: string | null,
>     deployFolder?: string | null,
>     path?: string | null,
>     artifactId?: string | null,
>     repository?: string | null
>   }[] | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   priority?: string | null,
>   text?: string | null
> }[] | null
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   exitCode?: number | null,
>   entrypoint?: string | null,
>   name?: string | null,
>   env?: string[] | null,
>   results?: {
>     name?: string | null,
>     attestationType?: string | null,
>     attestationContent?: string | null
>   }[] | null,
>   waitFor?: string[] | null,
>   secretEnv?: string[] | null,
>   allowFailure?: boolean | null,
>   automapSubstitutions?: boolean | null,
>   args?: string[] | null,
>   volumes?: {
>     name?: string | null,
>     path?: string | null
>   }[] | null,
>   timing?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   status?: string | null,
>   pullTiming?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   timeout?: string | null,
>   script?: string | null,
>   id?: string | null,
>   allowExitCodes?: number[] | null,
>   dir?: string | null
> }[] | null
> ```

> [accordion] approval full type
>
> ```ts theme={null}
> {
>   config?: {
>     approvalRequired?: boolean | null
>   } | null,
>   result?: {
>     decision?: string | null,
>     approverAccount?: string | null,
>     approvalTime?: string | null,
>     url?: string | null,
>     comment?: string | null
>   } | null,
>   state?: string | null
> } | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   goModules?: {
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     uri?: string | null
>   }[] | null,
>   buildStepImages?: string[] | null,
>   genericArtifacts?: {
>     artifactFingerprint?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     artifactRegistryPackage?: string | null,
>     uri?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null
>   }[] | null,
>   npmPackages?: {
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     uri?: string | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null
>   }[] | null,
>   buildStepOutputs?: string[] | null,
>   artifactTiming?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   artifactManifest?: string | null,
>   images?: {
>     ociMediaType?: string | null,
>     name?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactRegistryPackage?: string | null,
>     digest?: string | null
>   }[] | null,
>   numArtifacts?: string | number | null,
>   buildStepResults?: Record<string, {
>     results?: Record<string, string> | null
>   }> | null,
>   resourceUsage?: {
>     peakCpuUtilization?: number | null,
>     averageMemoryUtilization?: number | null,
>     totalCpuDuration?: string | null,
>     peakMemoryUtilization?: number | null,
>     averageCpuUtilization?: number | null
>   } | null,
>   pythonPackages?: {
>     uri?: string | null,
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactRegistryPackage?: string | null
>   }[] | null,
>   mavenArtifacts?: {
>     uri?: string | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] timing full type
>
> ```ts theme={null}
> Record<string, {
>   startTime?: string | null,
>   endTime?: string | null
> }> | null
> ```

> [accordion] gitConfig full type
>
> ```ts theme={null}
> {
>   http?: {
>     proxySecretVersionName?: string | null
>   } | null
> } | null
> ```

> [accordion] sourceProvenance full type
>
> ```ts theme={null}
> {
>   resolvedStorageSource?: {
>     object?: string | null,
>     sourceFetcher?: string | null,
>     generation?: string | number | null,
>     bucket?: string | null
>   } | null,
>   fileHashes?: Record<string, {
>     fileHash?: {
>       type?: string | null,
>       value?: string | null
>     }[] | null
>   }> | null,
>   resolvedConnectedRepository?: {
>     repository?: string | null,
>     revision?: string | null,
>     dir?: string | null
>   } | null,
>   resolvedGitSource?: {
>     dir?: string | null,
>     url?: string | null,
>     revision?: string | null
>   } | null,
>   resolvedRepoSource?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   resolvedStorageSourceManifest?: {
>     object?: string | null,
>     bucket?: string | null,
>     generation?: string | number | null
>   } | null
> } | null
> ```

> [accordion] availableSecrets full type
>
> ```ts theme={null}
> {
>   secretManager?: {
>     versionName?: string | null,
>     env?: string | null
>   }[] | null,
>   inline?: {
>     kmsKeyName?: string | null,
>     envMap?: Record<string, string> | null
>   }[] | null
> } | null
> ```

> [accordion] failureInfo full type
>
> ```ts theme={null}
> {
>   detail?: string | null,
>   type?: string | null
> } | null
> ```

> [accordion] dependencies full type
>
> ```ts theme={null}
> {
>   gitSource?: {
>     fetchTags?: boolean | null,
>     destPath?: string | null,
>     depth?: string | number | null,
>     revision?: string | null,
>     recurseSubmodules?: boolean | null,
>     repository?: {
>       url?: string | null,
>       developerConnect?: string | null
>     } | null
>   } | null,
>   genericArtifact?: {
>     resource?: string | null,
>     destPath?: string | null
>   } | null,
>   empty?: boolean | null
> }[] | null
> ```

***

### locations.builds.create

`build.locations.builds.create`

Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.build.locations.builds.create({
	parent: 'projects/demo-project/locations/us-central1',
	steps: [{
		name: 'gcr.io/cloud-builders/docker',
		args: ['build', '-t', 'us-central1-docker.pkg.dev/demo-project/docker/api:v1', '.'],
	}],
	images: ['us-central1-docker.pkg.dev/demo-project/docker/api:v1'],
	source: {
		storageSource: { bucket: 'demo-bucket', object: 'source.tgz' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent resource where this build will be created. Format: `projects/{project}/locations/{location}` Format: `projects/<id>/locations/<id>`. |
| `projectId` | `string` | No | Required. ID of the project. |
| `source` | `object` | No | Location of the source in a supported storage service. |
| `options` | `object` | No | Optional arguments to enable specific features of builds. |
| `secrets` | `object[]` | No | Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: [https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets](https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets) |
| `artifacts` | `object` | No | Artifacts produced by a build that should be uploaded upon successful completion of all build steps. |
| `steps` | `object[]` | No | Required. The operations to be performed on the workspace. |
| `substitutions` | `Record<string, string>` | No | Substitutions data for `Build` resource. |
| `serviceAccount` | `string` | No | IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. |
| `images` | `string[]` | No | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. |
| `tags` | `string[]` | No | Tags for annotation of a `Build`. These are not docker tags. |
| `gitConfig` | `object` | No | GitConfig is a configuration for git operations. |
| `timeout` | `string` | No | Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes. |
| `availableSecrets` | `object` | No | Secrets and secret environment variables. |
| `queueTtl` | `string` | No | TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create\_time. |
| `logsBucket` | `string` | No | Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| `dependencies` | `object[]` | No | Optional. Dependencies that the Cloud Build worker will fetch before executing user steps. |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   repoSource?: {
>     projectId?: string,
>     dir?: string,
>     branchName?: string,
>     invertRegex?: boolean,
>     repoName?: string,
>     commitSha?: string,
>     substitutions?: Record<string, string>,
>     tagName?: string
>   },
>   connectedRepository?: {
>     repository?: string,
>     revision?: string,
>     dir?: string
>   },
>   storageSource?: {
>     object?: string,
>     sourceFetcher?: SOURCE_FETCHER_UNSPECIFIED | GSUTIL | GCS_FETCHER,
>     generation?: string | number,
>     bucket?: string
>   },
>   gitSource?: {
>     dir?: string,
>     url?: string,
>     revision?: string
>   },
>   developerConnectConfig?: {
>     dir?: string,
>     gitRepositoryLink?: string,
>     revision?: string
>   },
>   storageSourceManifest?: {
>     object?: string,
>     bucket?: string,
>     generation?: string | number
>   }
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   diskSizeGb?: string | number,
>   defaultLogsBucketBehavior?: DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED | REGIONAL_USER_OWNED_BUCKET | LEGACY_BUCKET,
>   rankedMachineSeries?: (MACHINE_SERIES_UNSPECIFIED | MACHINE_SERIES_E | MACHINE_SERIES_N | MACHINE_SERIES_C)[],
>   pubsubTopic?: string,
>   workerPool?: string,
>   workerRelease?: string,
>   logging?: LOGGING_UNSPECIFIED | LEGACY | GCS_ONLY | STACKDRIVER_ONLY | CLOUD_LOGGING_ONLY | NONE,
>   pool?: {
>     name?: string
>   },
>   sourceProvenanceHash?: (NONE | SHA256 | MD5 | GO_MODULE_H1 | SHA512 | DIRSUM_SHA256)[],
>   enableStructuredLogging?: boolean,
>   logStreamingOption?: STREAM_DEFAULT | STREAM_ON | STREAM_OFF,
>   volumes?: {
>     name?: string,
>     path?: string
>   }[],
>   secretEnv?: string[],
>   automapSubstitutions?: boolean,
>   dynamicSubstitutions?: boolean,
>   machineType?: UNSPECIFIED | N1_HIGHCPU_8 | N1_HIGHCPU_32 | E2_HIGHCPU_8 | E2_HIGHCPU_32 | E2_MEDIUM | E2_STANDARD_2,
>   env?: string[],
>   requestedVerifyOption?: NOT_VERIFIED | VERIFIED | BEST_EFFORT,
>   substitutionOption?: MUST_MATCH | ALLOW_LOOSE
> }
> ```

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   secretEnv?: Record<string, string>,
>   kmsKeyName?: string
> }[]
> ```

> [accordion] artifacts full type
>
> ```ts theme={null}
> {
>   images?: string[],
>   npmPackages?: {
>     packagePath?: string,
>     repository?: string
>   }[],
>   objects?: {
>     location?: string,
>     paths?: string[]
>   },
>   pythonPackages?: {
>     repository?: string,
>     paths?: string[]
>   }[],
>   oci?: {
>     registryPath?: string,
>     file?: string,
>     tags?: string[]
>   }[],
>   goModules?: {
>     sourcePath?: string,
>     modulePath?: string,
>     repositoryName?: string,
>     repositoryLocation?: string,
>     repositoryProjectId?: string,
>     moduleVersion?: string
>   }[],
>   genericArtifacts?: {
>     folder?: string,
>     registryPath?: string
>   }[],
>   mavenArtifacts?: {
>     groupId?: string,
>     version?: string,
>     deployFolder?: string,
>     path?: string,
>     artifactId?: string,
>     repository?: string
>   }[]
> }
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   entrypoint?: string,
>   name?: string,
>   env?: string[],
>   results?: {
>     name?: string,
>     attestationType?: string,
>     attestationContent?: string
>   }[],
>   waitFor?: string[],
>   secretEnv?: string[],
>   allowFailure?: boolean,
>   automapSubstitutions?: boolean,
>   args?: string[],
>   volumes?: {
>     name?: string,
>     path?: string
>   }[],
>   timeout?: string,
>   script?: string,
>   id?: string,
>   allowExitCodes?: number[],
>   dir?: string
> }[]
> ```

> [accordion] gitConfig full type
>
> ```ts theme={null}
> {
>   http?: {
>     proxySecretVersionName?: string
>   }
> }
> ```

> [accordion] availableSecrets full type
>
> ```ts theme={null}
> {
>   secretManager?: {
>     versionName?: string,
>     env?: string
>   }[],
>   inline?: {
>     kmsKeyName?: string,
>     envMap?: Record<string, string>
>   }[]
> }
> ```

> [accordion] dependencies full type
>
> ```ts theme={null}
> {
>   gitSource?: {
>     fetchTags?: boolean,
>     destPath?: string,
>     depth?: string | number,
>     revision?: string,
>     recurseSubmodules?: boolean,
>     repository?: {
>       url?: string,
>       developerConnect?: string
>     }
>   },
>   genericArtifact?: {
>     resource?: string,
>     destPath?: string
>   },
>   empty?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.builds.get

`build.locations.builds.get`

Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.builds.get({ name: 'projects/demo-project/locations/us-central1/builds/b1a2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}` Format: `projects/<id>/locations/<id>/builds/<id>`. |
| `projectId` | `string` | No | Required. ID of the project. |
| `id` | `string` | No | Required. ID of the build. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createTime` | `string \| null` | No | Output only. Time at which the request to create the build was received. |
| `finishTime` | `string \| null` | No | Output only. Time at which execution of the build was finished. The difference between finish\_time and start\_time is the duration of the build's execution. |
| `source` | `object \| null` | No | Location of the source in a supported storage service. |
| `logUrl` | `string \| null` | No | Output only. URL to logs for this build in Google Cloud Console. |
| `options` | `object \| null` | No | Optional arguments to enable specific features of builds. |
| `statusDetail` | `string \| null` | No | Output only. Customer-readable message about the current status. |
| `secrets` | `object[] \| null` | No | Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: [https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets](https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets) |
| `status` | `string \| null` | No | Output only. Status of the build. |
| `projectId` | `string \| null` | No | Output only. ID of the project. |
| `artifacts` | `object \| null` | No | Artifacts produced by a build that should be uploaded upon successful completion of all build steps. |
| `warnings` | `object[] \| null` | No | Output only. Non-fatal problems encountered during the execution of the build. |
| `steps` | `object[] \| null` | No | Required. The operations to be performed on the workspace. |
| `approval` | `object \| null` | No | BuildApproval describes a build's approval configuration, state, and result. |
| `startTime` | `string \| null` | No | Output only. Time at which execution of the build was started. |
| `buildTriggerId` | `string \| null` | No | Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions data for `Build` resource. |
| `results` | `object \| null` | No | Artifacts created by the build pipeline. |
| `id` | `string \| null` | No | Output only. Unique identifier of the build. |
| `serviceAccount` | `string \| null` | No | IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. |
| `images` | `string[] \| null` | No | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. |
| `timing` | `object \| null` | No | Output only. Stores timing information for phases of the build. Valid keys are: \* BUILD: time to execute all build steps. \* PUSH: time to push all artifacts including docker images and non docker artifacts. \* FETCHSOURCE: time to fetch source. \* SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included. |
| `tags` | `string[] \| null` | No | Tags for annotation of a `Build`. These are not docker tags. |
| `gitConfig` | `object \| null` | No | GitConfig is a configuration for git operations. |
| `timeout` | `string \| null` | No | Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes. |
| `sourceProvenance` | `object \| null` | No | Provenance of the source. Ways to find the original source, or verify that some source was used for this build. |
| `availableSecrets` | `object \| null` | No | Secrets and secret environment variables. |
| `queueTtl` | `string \| null` | No | TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create\_time. |
| `failureInfo` | `object \| null` | No | A fatal problem encountered during the execution of the build. |
| `logsBucket` | `string \| null` | No | Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| `dependencies` | `object[] \| null` | No | Optional. Dependencies that the Cloud Build worker will fetch before executing user steps. |
| `name` | `string \| null` | No | Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where \{build} is a unique identifier generated by the service. |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   repoSource?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   connectedRepository?: {
>     repository?: string | null,
>     revision?: string | null,
>     dir?: string | null
>   } | null,
>   storageSource?: {
>     object?: string | null,
>     sourceFetcher?: string | null,
>     generation?: string | number | null,
>     bucket?: string | null
>   } | null,
>   gitSource?: {
>     dir?: string | null,
>     url?: string | null,
>     revision?: string | null
>   } | null,
>   developerConnectConfig?: {
>     dir?: string | null,
>     gitRepositoryLink?: string | null,
>     revision?: string | null
>   } | null,
>   storageSourceManifest?: {
>     object?: string | null,
>     bucket?: string | null,
>     generation?: string | number | null
>   } | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   resolvedWorkerRelease?: string | null,
>   diskSizeGb?: string | number | null,
>   defaultLogsBucketBehavior?: string | null,
>   rankedMachineSeries?: string[] | null,
>   pubsubTopic?: string | null,
>   workerPool?: string | null,
>   workerRelease?: string | null,
>   logging?: string | null,
>   pool?: {
>     name?: string | null,
>     resolvedWorkerRelease?: string | null,
>     workerRelease?: string | null
>   } | null,
>   sourceProvenanceHash?: string[] | null,
>   enableStructuredLogging?: boolean | null,
>   logStreamingOption?: string | null,
>   volumes?: {
>     name?: string | null,
>     path?: string | null
>   }[] | null,
>   secretEnv?: string[] | null,
>   automapSubstitutions?: boolean | null,
>   dynamicSubstitutions?: boolean | null,
>   machineType?: string | null,
>   env?: string[] | null,
>   requestedVerifyOption?: string | null,
>   substitutionOption?: string | null
> } | null
> ```

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   secretEnv?: Record<string, string> | null,
>   kmsKeyName?: string | null
> }[] | null
> ```

> [accordion] artifacts full type
>
> ```ts theme={null}
> {
>   images?: string[] | null,
>   npmPackages?: {
>     packagePath?: string | null,
>     repository?: string | null
>   }[] | null,
>   objects?: {
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     location?: string | null,
>     paths?: string[] | null
>   } | null,
>   pythonPackages?: {
>     repository?: string | null,
>     paths?: string[] | null
>   }[] | null,
>   oci?: {
>     registryPath?: string | null,
>     file?: string | null,
>     tags?: string[] | null
>   }[] | null,
>   goModules?: {
>     sourcePath?: string | null,
>     modulePath?: string | null,
>     repositoryName?: string | null,
>     repositoryLocation?: string | null,
>     repositoryProjectId?: string | null,
>     moduleVersion?: string | null
>   }[] | null,
>   genericArtifacts?: {
>     folder?: string | null,
>     registryPath?: string | null
>   }[] | null,
>   mavenArtifacts?: {
>     groupId?: string | null,
>     version?: string | null,
>     deployFolder?: string | null,
>     path?: string | null,
>     artifactId?: string | null,
>     repository?: string | null
>   }[] | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   priority?: string | null,
>   text?: string | null
> }[] | null
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   exitCode?: number | null,
>   entrypoint?: string | null,
>   name?: string | null,
>   env?: string[] | null,
>   results?: {
>     name?: string | null,
>     attestationType?: string | null,
>     attestationContent?: string | null
>   }[] | null,
>   waitFor?: string[] | null,
>   secretEnv?: string[] | null,
>   allowFailure?: boolean | null,
>   automapSubstitutions?: boolean | null,
>   args?: string[] | null,
>   volumes?: {
>     name?: string | null,
>     path?: string | null
>   }[] | null,
>   timing?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   status?: string | null,
>   pullTiming?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   timeout?: string | null,
>   script?: string | null,
>   id?: string | null,
>   allowExitCodes?: number[] | null,
>   dir?: string | null
> }[] | null
> ```

> [accordion] approval full type
>
> ```ts theme={null}
> {
>   config?: {
>     approvalRequired?: boolean | null
>   } | null,
>   result?: {
>     decision?: string | null,
>     approverAccount?: string | null,
>     approvalTime?: string | null,
>     url?: string | null,
>     comment?: string | null
>   } | null,
>   state?: string | null
> } | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   goModules?: {
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     uri?: string | null
>   }[] | null,
>   buildStepImages?: string[] | null,
>   genericArtifacts?: {
>     artifactFingerprint?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     artifactRegistryPackage?: string | null,
>     uri?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null
>   }[] | null,
>   npmPackages?: {
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     uri?: string | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null
>   }[] | null,
>   buildStepOutputs?: string[] | null,
>   artifactTiming?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   artifactManifest?: string | null,
>   images?: {
>     ociMediaType?: string | null,
>     name?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactRegistryPackage?: string | null,
>     digest?: string | null
>   }[] | null,
>   numArtifacts?: string | number | null,
>   buildStepResults?: Record<string, {
>     results?: Record<string, string> | null
>   }> | null,
>   resourceUsage?: {
>     peakCpuUtilization?: number | null,
>     averageMemoryUtilization?: number | null,
>     totalCpuDuration?: string | null,
>     peakMemoryUtilization?: number | null,
>     averageCpuUtilization?: number | null
>   } | null,
>   pythonPackages?: {
>     uri?: string | null,
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactRegistryPackage?: string | null
>   }[] | null,
>   mavenArtifacts?: {
>     uri?: string | null,
>     artifactRegistryPackage?: string | null,
>     pushTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     fileHashes?: {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] timing full type
>
> ```ts theme={null}
> Record<string, {
>   startTime?: string | null,
>   endTime?: string | null
> }> | null
> ```

> [accordion] gitConfig full type
>
> ```ts theme={null}
> {
>   http?: {
>     proxySecretVersionName?: string | null
>   } | null
> } | null
> ```

> [accordion] sourceProvenance full type
>
> ```ts theme={null}
> {
>   resolvedStorageSource?: {
>     object?: string | null,
>     sourceFetcher?: string | null,
>     generation?: string | number | null,
>     bucket?: string | null
>   } | null,
>   fileHashes?: Record<string, {
>     fileHash?: {
>       type?: string | null,
>       value?: string | null
>     }[] | null
>   }> | null,
>   resolvedConnectedRepository?: {
>     repository?: string | null,
>     revision?: string | null,
>     dir?: string | null
>   } | null,
>   resolvedGitSource?: {
>     dir?: string | null,
>     url?: string | null,
>     revision?: string | null
>   } | null,
>   resolvedRepoSource?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   resolvedStorageSourceManifest?: {
>     object?: string | null,
>     bucket?: string | null,
>     generation?: string | number | null
>   } | null
> } | null
> ```

> [accordion] availableSecrets full type
>
> ```ts theme={null}
> {
>   secretManager?: {
>     versionName?: string | null,
>     env?: string | null
>   }[] | null,
>   inline?: {
>     kmsKeyName?: string | null,
>     envMap?: Record<string, string> | null
>   }[] | null
> } | null
> ```

> [accordion] failureInfo full type
>
> ```ts theme={null}
> {
>   detail?: string | null,
>   type?: string | null
> } | null
> ```

> [accordion] dependencies full type
>
> ```ts theme={null}
> {
>   gitSource?: {
>     fetchTags?: boolean | null,
>     destPath?: string | null,
>     depth?: string | number | null,
>     revision?: string | null,
>     recurseSubmodules?: boolean | null,
>     repository?: {
>       url?: string | null,
>       developerConnect?: string | null
>     } | null
>   } | null,
>   genericArtifact?: {
>     resource?: string | null,
>     destPath?: string | null
>   } | null,
>   empty?: boolean | null
> }[] | null
> ```

***

### locations.builds.list

`build.locations.builds.list`

Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.builds.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent of the collection of `Builds`. Format: `projects/{project}/locations/{location}` Format: `projects/<id>/locations/<id>`. |
| `pageSize` | `number` | No | Number of results to return in the list. |
| `filter` | `string` | No | The raw filter text to constrain the results. |
| `projectId` | `string` | No | Required. ID of the project. |
| `pageToken` | `string` | No | The page token for the next page of Builds. If unspecified, the first page of results is returned. If the token is rejected for any reason, INVALID\_ARGUMENT will be thrown. In this case, the token should be discarded, and pagination should be restarted from the first page of results. See [https://google.aip.dev/158](https://google.aip.dev/158) for more. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `builds` | `object[] \| null` | No | Builds will be sorted by `create_time`, descending. |
| `nextPageToken` | `string \| null` | No | Token to receive the next page of results. This will be absent if the end of the response list has been reached. |

> [accordion] builds full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   finishTime?: string | null,
>   source?: {
>     repoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     connectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     storageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     gitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     developerConnectConfig?: {
>       dir?: string | null,
>       gitRepositoryLink?: string | null,
>       revision?: string | null
>     } | null,
>     storageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   logUrl?: string | null,
>   options?: {
>     resolvedWorkerRelease?: string | null,
>     diskSizeGb?: string | number | null,
>     defaultLogsBucketBehavior?: string | null,
>     rankedMachineSeries?: string[] | null,
>     pubsubTopic?: string | null,
>     workerPool?: string | null,
>     workerRelease?: string | null,
>     logging?: string | null,
>     pool?: {
>       name?: string | null,
>       resolvedWorkerRelease?: string | null,
>       workerRelease?: string | null
>     } | null,
>     sourceProvenanceHash?: string[] | null,
>     enableStructuredLogging?: boolean | null,
>     logStreamingOption?: string | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     secretEnv?: string[] | null,
>     automapSubstitutions?: boolean | null,
>     dynamicSubstitutions?: boolean | null,
>     machineType?: string | null,
>     env?: string[] | null,
>     requestedVerifyOption?: string | null,
>     substitutionOption?: string | null
>   } | null,
>   statusDetail?: string | null,
>   secrets?: {
>     secretEnv?: Record<string, string> | null,
>     kmsKeyName?: string | null
>   }[] | null,
>   status?: string | null,
>   projectId?: string | null,
>   artifacts?: {
>     images?: string[] | null,
>     npmPackages?: {
>       packagePath?: string | null,
>       repository?: string | null
>     }[] | null,
>     objects?: {
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       location?: string | null,
>       paths?: string[] | null
>     } | null,
>     pythonPackages?: {
>       repository?: string | null,
>       paths?: string[] | null
>     }[] | null,
>     oci?: {
>       registryPath?: string | null,
>       file?: string | null,
>       tags?: string[] | null
>     }[] | null,
>     goModules?: {
>       sourcePath?: string | null,
>       modulePath?: string | null,
>       repositoryName?: string | null,
>       repositoryLocation?: string | null,
>       repositoryProjectId?: string | null,
>       moduleVersion?: string | null
>     }[] | null,
>     genericArtifacts?: {
>       folder?: string | null,
>       registryPath?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       groupId?: string | null,
>       version?: string | null,
>       deployFolder?: string | null,
>       path?: string | null,
>       artifactId?: string | null,
>       repository?: string | null
>     }[] | null
>   } | null,
>   warnings?: {
>     priority?: string | null,
>     text?: string | null
>   }[] | null,
>   steps?: {
>     exitCode?: number | null,
>     entrypoint?: string | null,
>     name?: string | null,
>     env?: string[] | null,
>     results?: {
>       name?: string | null,
>       attestationType?: string | null,
>       attestationContent?: string | null
>     }[] | null,
>     waitFor?: string[] | null,
>     secretEnv?: string[] | null,
>     allowFailure?: boolean | null,
>     automapSubstitutions?: boolean | null,
>     args?: string[] | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     status?: string | null,
>     pullTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     timeout?: string | null,
>     script?: string | null,
>     id?: string | null,
>     allowExitCodes?: number[] | null,
>     dir?: string | null
>   }[] | null,
>   approval?: {
>     config?: {
>       approvalRequired?: boolean | null
>     } | null,
>     result?: {
>       decision?: string | null,
>       approverAccount?: string | null,
>       approvalTime?: string | null,
>       url?: string | null,
>       comment?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   startTime?: string | null,
>   buildTriggerId?: string | null,
>   substitutions?: Record<string, string> | null,
>   results?: {
>     goModules?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       uri?: string | null
>     }[] | null,
>     buildStepImages?: string[] | null,
>     genericArtifacts?: {
>       artifactFingerprint?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       artifactRegistryPackage?: string | null,
>       uri?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     npmPackages?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     buildStepOutputs?: string[] | null,
>     artifactTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactManifest?: string | null,
>     images?: {
>       ociMediaType?: string | null,
>       name?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       digest?: string | null
>     }[] | null,
>     numArtifacts?: string | number | null,
>     buildStepResults?: Record<string, {
>       results?: Record<string, string> | null
>     }> | null,
>     resourceUsage?: {
>       peakCpuUtilization?: number | null,
>       averageMemoryUtilization?: number | null,
>       totalCpuDuration?: string | null,
>       peakMemoryUtilization?: number | null,
>       averageCpuUtilization?: number | null
>     } | null,
>     pythonPackages?: {
>       uri?: string | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     }[] | null
>   } | null,
>   id?: string | null,
>   serviceAccount?: string | null,
>   images?: string[] | null,
>   timing?: Record<string, {
>     startTime?: string | null,
>     endTime?: string | null
>   }> | null,
>   tags?: string[] | null,
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string | null
>     } | null
>   } | null,
>   timeout?: string | null,
>   sourceProvenance?: {
>     resolvedStorageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     resolvedConnectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     resolvedGitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     resolvedRepoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     resolvedStorageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string | null,
>       env?: string | null
>     }[] | null,
>     inline?: {
>       kmsKeyName?: string | null,
>       envMap?: Record<string, string> | null
>     }[] | null
>   } | null,
>   queueTtl?: string | null,
>   failureInfo?: {
>     detail?: string | null,
>     type?: string | null
>   } | null,
>   logsBucket?: string | null,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean | null,
>       destPath?: string | null,
>       depth?: string | number | null,
>       revision?: string | null,
>       recurseSubmodules?: boolean | null,
>       repository?: {
>         url?: string | null,
>         developerConnect?: string | null
>       } | null
>     } | null,
>     genericArtifact?: {
>       resource?: string | null,
>       destPath?: string | null
>     } | null,
>     empty?: boolean | null
>   }[] | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.builds.retry

`build.locations.builds.retry`

Creates a new build based on the specified build. Note: This method only creates builds in the "global" region when using the legacy resource path projects/\{project\_id}/builds/\{id}:retry

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.build.locations.builds.retry({ name: 'projects/demo-project/locations/us-central1/builds/b1a2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the `Build` to retry. Format: `projects/{project}/locations/{location}/builds/{build}` Format: `projects/<id>/locations/<id>/builds/<id>`. |
| `id` | `string` | No | Required. Build ID of the original build. |
| `body_name` | `string` | No | The name of the `Build` to retry. Format: `projects/{project}/locations/{location}/builds/{build}` |
| `projectId` | `string` | No | Required. ID of the project. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.getDefaultServiceAccount

`build.locations.getDefaultServiceAccount`

Returns the `DefaultServiceAccount` used by the project

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.getDefaultServiceAccount({ name: 'projects/demo-project/locations/us-central1/defaultServiceAccount' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the `DefaultServiceAccount` to retrieve. Format: `projects/{project}/locations/{location}/defaultServiceAccount` Format: `projects/<id>/locations/<id>/defaultServiceAccount`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. Format: `projects/{project}/locations/{location}/defaultServiceAccount`. |
| `serviceAccountEmail` | `string \| null` | No | Output only. The email address of the service account identity that will be used for a build by default. This is returned in the format `projects/{project}/serviceAccounts/{service_account}` where `{service_account}` could be the legacy Cloud Build SA, in the format \[PROJECT\_NUMBER]@cloudbuild.gserviceaccount.com or the Compute SA, in the format \[PROJECT\_NUMBER][-compute@developer.gserviceaccount.com](mailto:-compute@developer.gserviceaccount.com). If no service account will be used by default, this will be empty. |

***

### locations.githubEnterpriseConfigs.create

`build.locations.githubEnterpriseConfigs.create`

Create an association between a GCP project and a GitHub Enterprise server

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.githubEnterpriseConfigs.create({
	parent: 'projects/demo-project/locations/us-central1',
	gheConfigId: 'ghe',
	hostUrl: 'https://github.example.com',
	appId: '12345',
	displayName: 'GitHub Enterprise',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | No | ID of the project. |
| `parent` | `string` | Yes | Name of the parent project. For example: projects/\{$project_number&#125; or projects/&#123;$project\_id} Format: `projects/<id>/locations/<id>`. |
| `gheConfigId` | `string` | No | Optional. The ID to use for the GithubEnterpriseConfig, which will become the final component of the GithubEnterpriseConfig's resource name. ghe\_config\_id must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character |
| `name` | `string` | No | Identifier. The full resource name for the GitHubEnterpriseConfig For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" |
| `peeredNetwork` | `string` | No | Optional. The network to be used when reaching out to the GitHub Enterprise server. The VPC network must be enabled for private service connection. This should be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the GitHub Enterprise server will be made over the public internet. Must be in the format `projects/{project}/global/networks/{network}`, where \{project} is a project number or id and \{network} is the name of a VPC network in the project. |
| `hostUrl` | `string` | No | The URL of the github enterprise host the configuration is for. |
| `secrets` | `object` | No | GitHubEnterpriseSecrets represents the names of all necessary secrets in Secret Manager for a GitHub Enterprise server. Format is: projects//secrets/. |
| `appId` | `string \| number` | No | Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise server. |
| `displayName` | `string` | No | Optional. Name to display for this config. |
| `webhookKey` | `string` | No | The key that should be attached to webhook calls to the ReceiveWebhook endpoint. |
| `sslCa` | `string` | No | Optional. SSL certificate to use for requests to GitHub Enterprise. |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   oauthClientIdVersionName?: string,
>   privateKeyName?: string,
>   oauthClientIdName?: string,
>   oauthSecretName?: string,
>   privateKeyVersionName?: string,
>   webhookSecretName?: string,
>   webhookSecretVersionName?: string,
>   oauthSecretVersionName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.githubEnterpriseConfigs.delete

`build.locations.githubEnterpriseConfigs.delete`

Delete an association between a GCP project and a GitHub Enterprise server

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.build.locations.githubEnterpriseConfigs.delete({ name: 'projects/demo-project/locations/us-central1/githubEnterpriseConfigs/ghe' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | No | ID of the project |
| `name` | `string` | Yes | This field should contain the name of the enterprise config resource. For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" Format: `projects/<id>/locations/<id>/githubEnterpriseConfigs/<id>`. |
| `configId` | `string` | No | Unique identifier of the `GitHubEnterpriseConfig` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.githubEnterpriseConfigs.get

`build.locations.githubEnterpriseConfigs.get`

Retrieve a GitHubEnterpriseConfig

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.githubEnterpriseConfigs.get({ name: 'projects/demo-project/locations/us-central1/githubEnterpriseConfigs/ghe' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | This field should contain the name of the enterprise config resource. For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" Format: `projects/<id>/locations/<id>/githubEnterpriseConfigs/<id>`. |
| `configId` | `string` | No | Unique identifier of the `GitHubEnterpriseConfig` |
| `projectId` | `string` | No | ID of the project |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The full resource name for the GitHubEnterpriseConfig For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" |
| `peeredNetwork` | `string \| null` | No | Optional. The network to be used when reaching out to the GitHub Enterprise server. The VPC network must be enabled for private service connection. This should be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the GitHub Enterprise server will be made over the public internet. Must be in the format `projects/{project}/global/networks/{network}`, where \{project} is a project number or id and \{network} is the name of a VPC network in the project. |
| `hostUrl` | `string \| null` | No | The URL of the github enterprise host the configuration is for. |
| `createTime` | `string \| null` | No | Output only. Time when the installation was associated with the project. |
| `secrets` | `object \| null` | No | GitHubEnterpriseSecrets represents the names of all necessary secrets in Secret Manager for a GitHub Enterprise server. Format is: projects//secrets/. |
| `appId` | `string \| number \| null` | No | Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise server. |
| `displayName` | `string \| null` | No | Optional. Name to display for this config. |
| `webhookKey` | `string \| null` | No | The key that should be attached to webhook calls to the ReceiveWebhook endpoint. |
| `sslCa` | `string \| null` | No | Optional. SSL certificate to use for requests to GitHub Enterprise. |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   oauthClientIdVersionName?: string | null,
>   privateKeyName?: string | null,
>   oauthClientIdName?: string | null,
>   oauthSecretName?: string | null,
>   privateKeyVersionName?: string | null,
>   webhookSecretName?: string | null,
>   webhookSecretVersionName?: string | null,
>   oauthSecretVersionName?: string | null
> } | null
> ```

***

### locations.githubEnterpriseConfigs.list

`build.locations.githubEnterpriseConfigs.list`

List all GitHubEnterpriseConfigs for a given project

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.githubEnterpriseConfigs.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Name of the parent project. For example: projects/\{$project_number&#125; or projects/&#123;$project\_id} Format: `projects/<id>/locations/<id>`. |
| `projectId` | `string` | No | ID of the project |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configs` | `object[] \| null` | No | A list of GitHubEnterpriseConfigs |

> [accordion] configs full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   peeredNetwork?: string | null,
>   hostUrl?: string | null,
>   createTime?: string | null,
>   secrets?: {
>     oauthClientIdVersionName?: string | null,
>     privateKeyName?: string | null,
>     oauthClientIdName?: string | null,
>     oauthSecretName?: string | null,
>     privateKeyVersionName?: string | null,
>     webhookSecretName?: string | null,
>     webhookSecretVersionName?: string | null,
>     oauthSecretVersionName?: string | null
>   } | null,
>   appId?: string | number | null,
>   displayName?: string | null,
>   webhookKey?: string | null,
>   sslCa?: string | null
> }[] | null
> ```

***

### locations.githubEnterpriseConfigs.patch

`build.locations.githubEnterpriseConfigs.patch`

Update an association between a GCP project and a GitHub Enterprise server

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.githubEnterpriseConfigs.patch({ name: 'projects/demo-project/locations/us-central1/githubEnterpriseConfigs/ghe', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The full resource name for the GitHubEnterpriseConfig For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" Format: `projects/<id>/locations/<id>/githubEnterpriseConfigs/<id>`. |
| `updateMask` | `string` | No | Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed. |
| `body_name` | `string` | No | Identifier. The full resource name for the GitHubEnterpriseConfig For example: "projects/\{$project_id&#125;/locations/&#123;$location\_id}/githubEnterpriseConfigs/\{\$config\_id}" |
| `peeredNetwork` | `string` | No | Optional. The network to be used when reaching out to the GitHub Enterprise server. The VPC network must be enabled for private service connection. This should be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the GitHub Enterprise server will be made over the public internet. Must be in the format `projects/{project}/global/networks/{network}`, where \{project} is a project number or id and \{network} is the name of a VPC network in the project. |
| `hostUrl` | `string` | No | The URL of the github enterprise host the configuration is for. |
| `secrets` | `object` | No | GitHubEnterpriseSecrets represents the names of all necessary secrets in Secret Manager for a GitHub Enterprise server. Format is: projects//secrets/. |
| `appId` | `string \| number` | No | Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise server. |
| `displayName` | `string` | No | Optional. Name to display for this config. |
| `webhookKey` | `string` | No | The key that should be attached to webhook calls to the ReceiveWebhook endpoint. |
| `sslCa` | `string` | No | Optional. SSL certificate to use for requests to GitHub Enterprise. |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   oauthClientIdVersionName?: string,
>   privateKeyName?: string,
>   oauthClientIdName?: string,
>   oauthSecretName?: string,
>   privateKeyVersionName?: string,
>   webhookSecretName?: string,
>   webhookSecretVersionName?: string,
>   oauthSecretVersionName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.operations.cancel

`build.locations.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.operations.cancel({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be cancelled. Format: `projects/<id>/locations/<id>/operations/<id>`. |
| `body` | `object` | No | The request message for Operations.CancelOperation. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.operations.get

`build.locations.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.operations.get({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.triggers.create

`build.locations.triggers.create`

Creates a new `BuildTrigger`. Note: This method only creates triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.triggers.create({
	parent: 'projects/demo-project/locations/us-central1',
	name: 'deploy-main',
	filename: 'cloudbuild.yaml',
	github: {
		owner: 'acme',
		name: 'api',
		push: { branch: '^main$' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent resource where this trigger will be created. Format: `projects/{project}/locations/{location}` Format: `projects/<id>/locations/<id>`. |
| `projectId` | `string` | No | Required. ID of the project for which to configure automatic builds. |
| `bitbucketServerTriggerConfig` | `object` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object` | No | GitRepoSource describes a repo and ref of a code repository. |
| `resourceName` | `string` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string` | No | A Common Expression Language string. |
| `filename` | `string` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[]` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[]` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `developerConnectEventConfig` | `object` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string>` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `EVENT_TYPE_UNSPECIFIED \| REPO \| WEBHOOK \| PUBSUB \| MANUAL` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `autodetect` | `boolean` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[]` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `INCLUDE_BUILD_LOGS_UNSPECIFIED \| INCLUDE_BUILD_LOGS_WITH_STATUS` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   repoSlug?: string,
>   bitbucketServerConfigResource?: string,
>   projectKey?: string,
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   }
> }
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   repository?: string
> }
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string,
>   repository?: string,
>   bitbucketServerConfig?: string,
>   githubEnterpriseConfig?: string,
>   ref?: string,
>   repoType?: UNKNOWN | CLOUD_SOURCE_REPOSITORIES | GITHUB | BITBUCKET_SERVER | GITLAB | BITBUCKET_CLOUD
> }
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string,
>   state?: STATE_UNSPECIFIED | OK | SECRET_DELETED
> }
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string,
>   dir?: string,
>   branchName?: string,
>   invertRegex?: boolean,
>   repoName?: string,
>   commitSha?: string,
>   substitutions?: Record<string, string>,
>   tagName?: string
> }
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string,
>   revision?: string,
>   repository?: string,
>   bitbucketServerConfig?: string,
>   repoType?: UNKNOWN | CLOUD_SOURCE_REPOSITORIES | GITHUB | BITBUCKET_SERVER | GITLAB | BITBUCKET_CLOUD,
>   githubEnterpriseConfig?: string,
>   uri?: string
> }
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   gitRepositoryLink?: string
> }
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean
> }
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: STATE_UNSPECIFIED | OK | SUBSCRIPTION_DELETED | TOPIC_DELETED | SUBSCRIPTION_MISCONFIGURED,
>   topic?: string,
>   serviceAccountEmail?: string
> }
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   source?: {
>     repoSource?: {
>       projectId?: string,
>       dir?: string,
>       branchName?: string,
>       invertRegex?: boolean,
>       repoName?: string,
>       commitSha?: string,
>       substitutions?: Record<string, string>,
>       tagName?: string
>     },
>     connectedRepository?: {
>       repository?: string,
>       revision?: string,
>       dir?: string
>     },
>     storageSource?: {
>       object?: string,
>       sourceFetcher?: SOURCE_FETCHER_UNSPECIFIED | GSUTIL | GCS_FETCHER,
>       generation?: string | number,
>       bucket?: string
>     },
>     gitSource?: {
>       dir?: string,
>       url?: string,
>       revision?: string
>     },
>     developerConnectConfig?: {
>       dir?: string,
>       gitRepositoryLink?: string,
>       revision?: string
>     },
>     storageSourceManifest?: {
>       object?: string,
>       bucket?: string,
>       generation?: string | number
>     }
>   },
>   options?: {
>     diskSizeGb?: string | number,
>     defaultLogsBucketBehavior?: DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED | REGIONAL_USER_OWNED_BUCKET | LEGACY_BUCKET,
>     rankedMachineSeries?: (MACHINE_SERIES_UNSPECIFIED | MACHINE_SERIES_E | MACHINE_SERIES_N | MACHINE_SERIES_C)[],
>     pubsubTopic?: string,
>     workerPool?: string,
>     workerRelease?: string,
>     logging?: LOGGING_UNSPECIFIED | LEGACY | GCS_ONLY | STACKDRIVER_ONLY | CLOUD_LOGGING_ONLY | NONE,
>     pool?: {
>       name?: string
>     },
>     sourceProvenanceHash?: (NONE | SHA256 | MD5 | GO_MODULE_H1 | SHA512 | DIRSUM_SHA256)[],
>     enableStructuredLogging?: boolean,
>     logStreamingOption?: STREAM_DEFAULT | STREAM_ON | STREAM_OFF,
>     volumes?: {
>       name?: string,
>       path?: string
>     }[],
>     secretEnv?: string[],
>     automapSubstitutions?: boolean,
>     dynamicSubstitutions?: boolean,
>     machineType?: UNSPECIFIED | N1_HIGHCPU_8 | N1_HIGHCPU_32 | E2_HIGHCPU_8 | E2_HIGHCPU_32 | E2_MEDIUM | E2_STANDARD_2,
>     env?: string[],
>     requestedVerifyOption?: NOT_VERIFIED | VERIFIED | BEST_EFFORT,
>     substitutionOption?: MUST_MATCH | ALLOW_LOOSE
>   },
>   secrets?: {
>     secretEnv?: Record<string, string>,
>     kmsKeyName?: string
>   }[],
>   artifacts?: {
>     images?: string[],
>     npmPackages?: {
>       packagePath?: string,
>       repository?: string
>     }[],
>     objects?: {
>       location?: string,
>       paths?: string[]
>     },
>     pythonPackages?: {
>       repository?: string,
>       paths?: string[]
>     }[],
>     oci?: {
>       registryPath?: string,
>       file?: string,
>       tags?: string[]
>     }[],
>     goModules?: {
>       sourcePath?: string,
>       modulePath?: string,
>       repositoryName?: string,
>       repositoryLocation?: string,
>       repositoryProjectId?: string,
>       moduleVersion?: string
>     }[],
>     genericArtifacts?: {
>       folder?: string,
>       registryPath?: string
>     }[],
>     mavenArtifacts?: {
>       groupId?: string,
>       version?: string,
>       deployFolder?: string,
>       path?: string,
>       artifactId?: string,
>       repository?: string
>     }[]
>   },
>   steps?: {
>     entrypoint?: string,
>     name?: string,
>     env?: string[],
>     results?: {
>       name?: string,
>       attestationType?: string,
>       attestationContent?: string
>     }[],
>     waitFor?: string[],
>     secretEnv?: string[],
>     allowFailure?: boolean,
>     automapSubstitutions?: boolean,
>     args?: string[],
>     volumes?: {
>       name?: string,
>       path?: string
>     }[],
>     timeout?: string,
>     script?: string,
>     id?: string,
>     allowExitCodes?: number[],
>     dir?: string
>   }[],
>   substitutions?: Record<string, string>,
>   serviceAccount?: string,
>   images?: string[],
>   tags?: string[],
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string
>     }
>   },
>   timeout?: string,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string,
>       env?: string
>     }[],
>     inline?: {
>       kmsKeyName?: string,
>       envMap?: Record<string, string>
>     }[]
>   },
>   queueTtl?: string,
>   logsBucket?: string,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean,
>       destPath?: string,
>       depth?: string | number,
>       revision?: string,
>       recurseSubmodules?: boolean,
>       repository?: {
>         url?: string,
>         developerConnect?: string
>       }
>     },
>     genericArtifact?: {
>       resource?: string,
>       destPath?: string
>     },
>     empty?: boolean
>   }[]
> }
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   owner?: string,
>   enterpriseConfigResourceName?: string,
>   installationId?: string | number,
>   name?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bitbucketServerTriggerConfig` | `object \| null` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object \| null` | No | GitRepoSource describes a repo and ref of a code repository. |
| `resourceName` | `string \| null` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string \| null` | No | A Common Expression Language string. |
| `filename` | `string \| null` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[] \| null` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string \| null` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[] \| null` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object \| null` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean \| null` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string \| null` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object \| null` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object \| null` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `createTime` | `string \| null` | No | Output only. Time when the trigger was created. |
| `developerConnectEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string \| null` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object \| null` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `string \| null` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `id` | `string \| null` | No | Output only. Unique identifier of the trigger. |
| `autodetect` | `boolean \| null` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[] \| null` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object \| null` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `string \| null` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object \| null` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object \| null` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repoSlug?: string | null,
>   bitbucketServerConfigResource?: string | null,
>   bitbucketServerConfig?: {
>     peeredNetworkIpRange?: string | null,
>     peeredNetwork?: string | null,
>     connectedRepositories?: {
>       repoSlug?: string | null,
>       webhookId?: number | null,
>       projectKey?: string | null
>     }[] | null,
>     username?: string | null,
>     secrets?: {
>       webhookSecretVersionName?: string | null,
>       readAccessTokenVersionName?: string | null,
>       adminAccessTokenVersionName?: string | null
>     } | null,
>     createTime?: string | null,
>     webhookKey?: string | null,
>     sslCa?: string | null,
>     name?: string | null,
>     apiKey?: string | null,
>     hostUri?: string | null
>   } | null,
>   projectKey?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null
> } | null
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   repositoryType?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repository?: string | null
> } | null
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   githubEnterpriseConfig?: string | null,
>   ref?: string | null,
>   repoType?: string | null
> } | null
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string | null,
>   dir?: string | null,
>   branchName?: string | null,
>   invertRegex?: boolean | null,
>   repoName?: string | null,
>   commitSha?: string | null,
>   substitutions?: Record<string, string> | null,
>   tagName?: string | null
> } | null
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string | null,
>   revision?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   repoType?: string | null,
>   githubEnterpriseConfig?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   gitRepositoryLinkType?: string | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   gitRepositoryLink?: string | null
> } | null
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean | null
> } | null
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   topic?: string | null,
>   serviceAccountEmail?: string | null,
>   subscription?: string | null
> } | null
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   finishTime?: string | null,
>   source?: {
>     repoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     connectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     storageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     gitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     developerConnectConfig?: {
>       dir?: string | null,
>       gitRepositoryLink?: string | null,
>       revision?: string | null
>     } | null,
>     storageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   logUrl?: string | null,
>   options?: {
>     resolvedWorkerRelease?: string | null,
>     diskSizeGb?: string | number | null,
>     defaultLogsBucketBehavior?: string | null,
>     rankedMachineSeries?: string[] | null,
>     pubsubTopic?: string | null,
>     workerPool?: string | null,
>     workerRelease?: string | null,
>     logging?: string | null,
>     pool?: {
>       name?: string | null,
>       resolvedWorkerRelease?: string | null,
>       workerRelease?: string | null
>     } | null,
>     sourceProvenanceHash?: string[] | null,
>     enableStructuredLogging?: boolean | null,
>     logStreamingOption?: string | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     secretEnv?: string[] | null,
>     automapSubstitutions?: boolean | null,
>     dynamicSubstitutions?: boolean | null,
>     machineType?: string | null,
>     env?: string[] | null,
>     requestedVerifyOption?: string | null,
>     substitutionOption?: string | null
>   } | null,
>   statusDetail?: string | null,
>   secrets?: {
>     secretEnv?: Record<string, string> | null,
>     kmsKeyName?: string | null
>   }[] | null,
>   status?: string | null,
>   projectId?: string | null,
>   artifacts?: {
>     images?: string[] | null,
>     npmPackages?: {
>       packagePath?: string | null,
>       repository?: string | null
>     }[] | null,
>     objects?: {
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       location?: string | null,
>       paths?: string[] | null
>     } | null,
>     pythonPackages?: {
>       repository?: string | null,
>       paths?: string[] | null
>     }[] | null,
>     oci?: {
>       registryPath?: string | null,
>       file?: string | null,
>       tags?: string[] | null
>     }[] | null,
>     goModules?: {
>       sourcePath?: string | null,
>       modulePath?: string | null,
>       repositoryName?: string | null,
>       repositoryLocation?: string | null,
>       repositoryProjectId?: string | null,
>       moduleVersion?: string | null
>     }[] | null,
>     genericArtifacts?: {
>       folder?: string | null,
>       registryPath?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       groupId?: string | null,
>       version?: string | null,
>       deployFolder?: string | null,
>       path?: string | null,
>       artifactId?: string | null,
>       repository?: string | null
>     }[] | null
>   } | null,
>   warnings?: {
>     priority?: string | null,
>     text?: string | null
>   }[] | null,
>   steps?: {
>     exitCode?: number | null,
>     entrypoint?: string | null,
>     name?: string | null,
>     env?: string[] | null,
>     results?: {
>       name?: string | null,
>       attestationType?: string | null,
>       attestationContent?: string | null
>     }[] | null,
>     waitFor?: string[] | null,
>     secretEnv?: string[] | null,
>     allowFailure?: boolean | null,
>     automapSubstitutions?: boolean | null,
>     args?: string[] | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     status?: string | null,
>     pullTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     timeout?: string | null,
>     script?: string | null,
>     id?: string | null,
>     allowExitCodes?: number[] | null,
>     dir?: string | null
>   }[] | null,
>   approval?: {
>     config?: {
>       approvalRequired?: boolean | null
>     } | null,
>     result?: {
>       decision?: string | null,
>       approverAccount?: string | null,
>       approvalTime?: string | null,
>       url?: string | null,
>       comment?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   startTime?: string | null,
>   buildTriggerId?: string | null,
>   substitutions?: Record<string, string> | null,
>   results?: {
>     goModules?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       uri?: string | null
>     }[] | null,
>     buildStepImages?: string[] | null,
>     genericArtifacts?: {
>       artifactFingerprint?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       artifactRegistryPackage?: string | null,
>       uri?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     npmPackages?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     buildStepOutputs?: string[] | null,
>     artifactTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactManifest?: string | null,
>     images?: {
>       ociMediaType?: string | null,
>       name?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       digest?: string | null
>     }[] | null,
>     numArtifacts?: string | number | null,
>     buildStepResults?: Record<string, {
>       results?: Record<string, string> | null
>     }> | null,
>     resourceUsage?: {
>       peakCpuUtilization?: number | null,
>       averageMemoryUtilization?: number | null,
>       totalCpuDuration?: string | null,
>       peakMemoryUtilization?: number | null,
>       averageCpuUtilization?: number | null
>     } | null,
>     pythonPackages?: {
>       uri?: string | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     }[] | null
>   } | null,
>   id?: string | null,
>   serviceAccount?: string | null,
>   images?: string[] | null,
>   timing?: Record<string, {
>     startTime?: string | null,
>     endTime?: string | null
>   }> | null,
>   tags?: string[] | null,
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string | null
>     } | null
>   } | null,
>   timeout?: string | null,
>   sourceProvenance?: {
>     resolvedStorageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     resolvedConnectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     resolvedGitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     resolvedRepoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     resolvedStorageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string | null,
>       env?: string | null
>     }[] | null,
>     inline?: {
>       kmsKeyName?: string | null,
>       envMap?: Record<string, string> | null
>     }[] | null
>   } | null,
>   queueTtl?: string | null,
>   failureInfo?: {
>     detail?: string | null,
>     type?: string | null
>   } | null,
>   logsBucket?: string | null,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean | null,
>       destPath?: string | null,
>       depth?: string | number | null,
>       revision?: string | null,
>       recurseSubmodules?: boolean | null,
>       repository?: {
>         url?: string | null,
>         developerConnect?: string | null
>       } | null
>     } | null,
>     genericArtifact?: {
>       resource?: string | null,
>       destPath?: string | null
>     } | null,
>     empty?: boolean | null
>   }[] | null,
>   name?: string | null
> } | null
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   owner?: string | null,
>   enterpriseConfigResourceName?: string | null,
>   installationId?: string | number | null,
>   name?: string | null
> } | null
> ```

***

### locations.triggers.delete

`build.locations.triggers.delete`

Deletes a `BuildTrigger` by its project ID and trigger ID. Note: This method only deletes triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers/\{trigger\_id}

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.build.locations.triggers.delete({ name: 'projects/demo-project/locations/us-central1/triggers/deploy-main' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | No | Required. ID of the project that owns the trigger. |
| `name` | `string` | Yes | The name of the `Trigger` to delete. Format: `projects/{project}/locations/{location}/triggers/{trigger}` Format: `projects/<id>/locations/<id>/triggers/<id>`. |
| `triggerId` | `string` | No | Required. ID of the `BuildTrigger` to delete. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.triggers.get

`build.locations.triggers.get`

Returns information about a `BuildTrigger`. Note: This method only gets triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers/\{trigger\_id}

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.triggers.get({ name: 'projects/demo-project/locations/us-central1/triggers/deploy-main' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | No | Required. ID of the project that owns the trigger. |
| `name` | `string` | Yes | The name of the `Trigger` to retrieve. Format: `projects/{project}/locations/{location}/triggers/{trigger}` Format: `projects/<id>/locations/<id>/triggers/<id>`. |
| `triggerId` | `string` | No | Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bitbucketServerTriggerConfig` | `object \| null` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object \| null` | No | GitRepoSource describes a repo and ref of a code repository. |
| `resourceName` | `string \| null` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string \| null` | No | A Common Expression Language string. |
| `filename` | `string \| null` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[] \| null` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string \| null` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[] \| null` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object \| null` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean \| null` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string \| null` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object \| null` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object \| null` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `createTime` | `string \| null` | No | Output only. Time when the trigger was created. |
| `developerConnectEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string \| null` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object \| null` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `string \| null` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `id` | `string \| null` | No | Output only. Unique identifier of the trigger. |
| `autodetect` | `boolean \| null` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[] \| null` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object \| null` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `string \| null` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object \| null` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object \| null` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repoSlug?: string | null,
>   bitbucketServerConfigResource?: string | null,
>   bitbucketServerConfig?: {
>     peeredNetworkIpRange?: string | null,
>     peeredNetwork?: string | null,
>     connectedRepositories?: {
>       repoSlug?: string | null,
>       webhookId?: number | null,
>       projectKey?: string | null
>     }[] | null,
>     username?: string | null,
>     secrets?: {
>       webhookSecretVersionName?: string | null,
>       readAccessTokenVersionName?: string | null,
>       adminAccessTokenVersionName?: string | null
>     } | null,
>     createTime?: string | null,
>     webhookKey?: string | null,
>     sslCa?: string | null,
>     name?: string | null,
>     apiKey?: string | null,
>     hostUri?: string | null
>   } | null,
>   projectKey?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null
> } | null
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   repositoryType?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repository?: string | null
> } | null
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   githubEnterpriseConfig?: string | null,
>   ref?: string | null,
>   repoType?: string | null
> } | null
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string | null,
>   dir?: string | null,
>   branchName?: string | null,
>   invertRegex?: boolean | null,
>   repoName?: string | null,
>   commitSha?: string | null,
>   substitutions?: Record<string, string> | null,
>   tagName?: string | null
> } | null
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string | null,
>   revision?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   repoType?: string | null,
>   githubEnterpriseConfig?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   gitRepositoryLinkType?: string | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   gitRepositoryLink?: string | null
> } | null
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean | null
> } | null
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   topic?: string | null,
>   serviceAccountEmail?: string | null,
>   subscription?: string | null
> } | null
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   finishTime?: string | null,
>   source?: {
>     repoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     connectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     storageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     gitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     developerConnectConfig?: {
>       dir?: string | null,
>       gitRepositoryLink?: string | null,
>       revision?: string | null
>     } | null,
>     storageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   logUrl?: string | null,
>   options?: {
>     resolvedWorkerRelease?: string | null,
>     diskSizeGb?: string | number | null,
>     defaultLogsBucketBehavior?: string | null,
>     rankedMachineSeries?: string[] | null,
>     pubsubTopic?: string | null,
>     workerPool?: string | null,
>     workerRelease?: string | null,
>     logging?: string | null,
>     pool?: {
>       name?: string | null,
>       resolvedWorkerRelease?: string | null,
>       workerRelease?: string | null
>     } | null,
>     sourceProvenanceHash?: string[] | null,
>     enableStructuredLogging?: boolean | null,
>     logStreamingOption?: string | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     secretEnv?: string[] | null,
>     automapSubstitutions?: boolean | null,
>     dynamicSubstitutions?: boolean | null,
>     machineType?: string | null,
>     env?: string[] | null,
>     requestedVerifyOption?: string | null,
>     substitutionOption?: string | null
>   } | null,
>   statusDetail?: string | null,
>   secrets?: {
>     secretEnv?: Record<string, string> | null,
>     kmsKeyName?: string | null
>   }[] | null,
>   status?: string | null,
>   projectId?: string | null,
>   artifacts?: {
>     images?: string[] | null,
>     npmPackages?: {
>       packagePath?: string | null,
>       repository?: string | null
>     }[] | null,
>     objects?: {
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       location?: string | null,
>       paths?: string[] | null
>     } | null,
>     pythonPackages?: {
>       repository?: string | null,
>       paths?: string[] | null
>     }[] | null,
>     oci?: {
>       registryPath?: string | null,
>       file?: string | null,
>       tags?: string[] | null
>     }[] | null,
>     goModules?: {
>       sourcePath?: string | null,
>       modulePath?: string | null,
>       repositoryName?: string | null,
>       repositoryLocation?: string | null,
>       repositoryProjectId?: string | null,
>       moduleVersion?: string | null
>     }[] | null,
>     genericArtifacts?: {
>       folder?: string | null,
>       registryPath?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       groupId?: string | null,
>       version?: string | null,
>       deployFolder?: string | null,
>       path?: string | null,
>       artifactId?: string | null,
>       repository?: string | null
>     }[] | null
>   } | null,
>   warnings?: {
>     priority?: string | null,
>     text?: string | null
>   }[] | null,
>   steps?: {
>     exitCode?: number | null,
>     entrypoint?: string | null,
>     name?: string | null,
>     env?: string[] | null,
>     results?: {
>       name?: string | null,
>       attestationType?: string | null,
>       attestationContent?: string | null
>     }[] | null,
>     waitFor?: string[] | null,
>     secretEnv?: string[] | null,
>     allowFailure?: boolean | null,
>     automapSubstitutions?: boolean | null,
>     args?: string[] | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     status?: string | null,
>     pullTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     timeout?: string | null,
>     script?: string | null,
>     id?: string | null,
>     allowExitCodes?: number[] | null,
>     dir?: string | null
>   }[] | null,
>   approval?: {
>     config?: {
>       approvalRequired?: boolean | null
>     } | null,
>     result?: {
>       decision?: string | null,
>       approverAccount?: string | null,
>       approvalTime?: string | null,
>       url?: string | null,
>       comment?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   startTime?: string | null,
>   buildTriggerId?: string | null,
>   substitutions?: Record<string, string> | null,
>   results?: {
>     goModules?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       uri?: string | null
>     }[] | null,
>     buildStepImages?: string[] | null,
>     genericArtifacts?: {
>       artifactFingerprint?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       artifactRegistryPackage?: string | null,
>       uri?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     npmPackages?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     buildStepOutputs?: string[] | null,
>     artifactTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactManifest?: string | null,
>     images?: {
>       ociMediaType?: string | null,
>       name?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       digest?: string | null
>     }[] | null,
>     numArtifacts?: string | number | null,
>     buildStepResults?: Record<string, {
>       results?: Record<string, string> | null
>     }> | null,
>     resourceUsage?: {
>       peakCpuUtilization?: number | null,
>       averageMemoryUtilization?: number | null,
>       totalCpuDuration?: string | null,
>       peakMemoryUtilization?: number | null,
>       averageCpuUtilization?: number | null
>     } | null,
>     pythonPackages?: {
>       uri?: string | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     }[] | null
>   } | null,
>   id?: string | null,
>   serviceAccount?: string | null,
>   images?: string[] | null,
>   timing?: Record<string, {
>     startTime?: string | null,
>     endTime?: string | null
>   }> | null,
>   tags?: string[] | null,
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string | null
>     } | null
>   } | null,
>   timeout?: string | null,
>   sourceProvenance?: {
>     resolvedStorageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     resolvedConnectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     resolvedGitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     resolvedRepoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     resolvedStorageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string | null,
>       env?: string | null
>     }[] | null,
>     inline?: {
>       kmsKeyName?: string | null,
>       envMap?: Record<string, string> | null
>     }[] | null
>   } | null,
>   queueTtl?: string | null,
>   failureInfo?: {
>     detail?: string | null,
>     type?: string | null
>   } | null,
>   logsBucket?: string | null,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean | null,
>       destPath?: string | null,
>       depth?: string | number | null,
>       revision?: string | null,
>       recurseSubmodules?: boolean | null,
>       repository?: {
>         url?: string | null,
>         developerConnect?: string | null
>       } | null
>     } | null,
>     genericArtifact?: {
>       resource?: string | null,
>       destPath?: string | null
>     } | null,
>     empty?: boolean | null
>   }[] | null,
>   name?: string | null
> } | null
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   owner?: string | null,
>   enterpriseConfigResourceName?: string | null,
>   installationId?: string | number | null,
>   name?: string | null
> } | null
> ```

***

### locations.triggers.list

`build.locations.triggers.list`

Lists existing `BuildTrigger`s. Note: This method only lists triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.triggers.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent of the collection of `Triggers`. Format: `projects/{project}/locations/{location}` Format: `projects/<id>/locations/<id>`. |
| `projectId` | `string` | No | Required. ID of the project for which to list BuildTriggers. |
| `pageToken` | `string` | No | Token to provide to skip to a particular spot in the list. |
| `pageSize` | `number` | No | Number of results to return in the list. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `triggers` | `object[] \| null` | No | `BuildTriggers` for the project, sorted by `create_time` descending. |
| `nextPageToken` | `string \| null` | No | Token to receive the next page of results. |

> [accordion] triggers full type
>
> ```ts theme={null}
> {
>   bitbucketServerTriggerConfig?: {
>     pullRequest?: {
>       commentControl?: string | null,
>       branch?: string | null,
>       invertRegex?: boolean | null
>     } | null,
>     repoSlug?: string | null,
>     bitbucketServerConfigResource?: string | null,
>     bitbucketServerConfig?: {
>       peeredNetworkIpRange?: string | null,
>       peeredNetwork?: string | null,
>       connectedRepositories?: {
>         repoSlug?: string | null,
>         webhookId?: number | null,
>         projectKey?: string | null
>       }[] | null,
>       username?: string | null,
>       secrets?: {
>         webhookSecretVersionName?: string | null,
>         readAccessTokenVersionName?: string | null,
>         adminAccessTokenVersionName?: string | null
>       } | null,
>       createTime?: string | null,
>       webhookKey?: string | null,
>       sslCa?: string | null,
>       name?: string | null,
>       apiKey?: string | null,
>       hostUri?: string | null
>     } | null,
>     projectKey?: string | null,
>     push?: {
>       tag?: string | null,
>       invertRegex?: boolean | null,
>       branch?: string | null
>     } | null
>   } | null,
>   repositoryEventConfig?: {
>     repositoryType?: string | null,
>     push?: {
>       tag?: string | null,
>       invertRegex?: boolean | null,
>       branch?: string | null
>     } | null,
>     pullRequest?: {
>       commentControl?: string | null,
>       branch?: string | null,
>       invertRegex?: boolean | null
>     } | null,
>     repository?: string | null
>   } | null,
>   sourceToBuild?: {
>     uri?: string | null,
>     repository?: string | null,
>     bitbucketServerConfig?: string | null,
>     githubEnterpriseConfig?: string | null,
>     ref?: string | null,
>     repoType?: string | null
>   } | null,
>   resourceName?: string | null,
>   filter?: string | null,
>   filename?: string | null,
>   ignoredFiles?: string[] | null,
>   serviceAccount?: string | null,
>   tags?: string[] | null,
>   webhookConfig?: {
>     secret?: string | null,
>     state?: string | null
>   } | null,
>   disabled?: boolean | null,
>   name?: string | null,
>   triggerTemplate?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   gitFileSource?: {
>     path?: string | null,
>     revision?: string | null,
>     repository?: string | null,
>     bitbucketServerConfig?: string | null,
>     repoType?: string | null,
>     githubEnterpriseConfig?: string | null,
>     uri?: string | null
>   } | null,
>   createTime?: string | null,
>   developerConnectEventConfig?: {
>     gitRepositoryLinkType?: string | null,
>     pullRequest?: {
>       commentControl?: string | null,
>       branch?: string | null,
>       invertRegex?: boolean | null
>     } | null,
>     push?: {
>       tag?: string | null,
>       invertRegex?: boolean | null,
>       branch?: string | null
>     } | null,
>     gitRepositoryLink?: string | null
>   } | null,
>   description?: string | null,
>   substitutions?: Record<string, string> | null,
>   approvalConfig?: {
>     approvalRequired?: boolean | null
>   } | null,
>   eventType?: string | null,
>   id?: string | null,
>   autodetect?: boolean | null,
>   includedFiles?: string[] | null,
>   pubsubConfig?: {
>     state?: string | null,
>     topic?: string | null,
>     serviceAccountEmail?: string | null,
>     subscription?: string | null
>   } | null,
>   includeBuildLogs?: string | null,
>   build?: {
>     createTime?: string | null,
>     finishTime?: string | null,
>     source?: {
>       repoSource?: {
>         projectId?: string | null,
>         dir?: string | null,
>         branchName?: string | null,
>         invertRegex?: boolean | null,
>         repoName?: string | null,
>         commitSha?: string | null,
>         substitutions?: Record<string, string> | null,
>         tagName?: string | null
>       } | null,
>       connectedRepository?: {
>         repository?: string | null,
>         revision?: string | null,
>         dir?: string | null
>       } | null,
>       storageSource?: {
>         object?: string | null,
>         sourceFetcher?: string | null,
>         generation?: string | number | null,
>         bucket?: string | null
>       } | null,
>       gitSource?: {
>         dir?: string | null,
>         url?: string | null,
>         revision?: string | null
>       } | null,
>       developerConnectConfig?: {
>         dir?: string | null,
>         gitRepositoryLink?: string | null,
>         revision?: string | null
>       } | null,
>       storageSourceManifest?: {
>         object?: string | null,
>         bucket?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     logUrl?: string | null,
>     options?: {
>       resolvedWorkerRelease?: string | null,
>       diskSizeGb?: string | number | null,
>       defaultLogsBucketBehavior?: string | null,
>       rankedMachineSeries?: string[] | null,
>       pubsubTopic?: string | null,
>       workerPool?: string | null,
>       workerRelease?: string | null,
>       logging?: string | null,
>       pool?: {
>         name?: string | null,
>         resolvedWorkerRelease?: string | null,
>         workerRelease?: string | null
>       } | null,
>       sourceProvenanceHash?: string[] | null,
>       enableStructuredLogging?: boolean | null,
>       logStreamingOption?: string | null,
>       volumes?: {
>         name?: string | null,
>         path?: string | null
>       }[] | null,
>       secretEnv?: string[] | null,
>       automapSubstitutions?: boolean | null,
>       dynamicSubstitutions?: boolean | null,
>       machineType?: string | null,
>       env?: string[] | null,
>       requestedVerifyOption?: string | null,
>       substitutionOption?: string | null
>     } | null,
>     statusDetail?: string | null,
>     secrets?: {
>       secretEnv?: Record<string, string> | null,
>       kmsKeyName?: string | null
>     }[] | null,
>     status?: string | null,
>     projectId?: string | null,
>     artifacts?: {
>       images?: string[] | null,
>       npmPackages?: {
>         packagePath?: string | null,
>         repository?: string | null
>       }[] | null,
>       objects?: {
>         timing?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         location?: string | null,
>         paths?: string[] | null
>       } | null,
>       pythonPackages?: {
>         repository?: string | null,
>         paths?: string[] | null
>       }[] | null,
>       oci?: {
>         registryPath?: string | null,
>         file?: string | null,
>         tags?: string[] | null
>       }[] | null,
>       goModules?: {
>         sourcePath?: string | null,
>         modulePath?: string | null,
>         repositoryName?: string | null,
>         repositoryLocation?: string | null,
>         repositoryProjectId?: string | null,
>         moduleVersion?: string | null
>       }[] | null,
>       genericArtifacts?: {
>         folder?: string | null,
>         registryPath?: string | null
>       }[] | null,
>       mavenArtifacts?: {
>         groupId?: string | null,
>         version?: string | null,
>         deployFolder?: string | null,
>         path?: string | null,
>         artifactId?: string | null,
>         repository?: string | null
>       }[] | null
>     } | null,
>     warnings?: {
>       priority?: string | null,
>       text?: string | null
>     }[] | null,
>     steps?: {
>       exitCode?: number | null,
>       entrypoint?: string | null,
>       name?: string | null,
>       env?: string[] | null,
>       results?: {
>         name?: string | null,
>         attestationType?: string | null,
>         attestationContent?: string | null
>       }[] | null,
>       waitFor?: string[] | null,
>       secretEnv?: string[] | null,
>       allowFailure?: boolean | null,
>       automapSubstitutions?: boolean | null,
>       args?: string[] | null,
>       volumes?: {
>         name?: string | null,
>         path?: string | null
>       }[] | null,
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       status?: string | null,
>       pullTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       timeout?: string | null,
>       script?: string | null,
>       id?: string | null,
>       allowExitCodes?: number[] | null,
>       dir?: string | null
>     }[] | null,
>     approval?: {
>       config?: {
>         approvalRequired?: boolean | null
>       } | null,
>       result?: {
>         decision?: string | null,
>         approverAccount?: string | null,
>         approvalTime?: string | null,
>         url?: string | null,
>         comment?: string | null
>       } | null,
>       state?: string | null
>     } | null,
>     startTime?: string | null,
>     buildTriggerId?: string | null,
>     substitutions?: Record<string, string> | null,
>     results?: {
>       goModules?: {
>         fileHashes?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null,
>         artifactRegistryPackage?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         uri?: string | null
>       }[] | null,
>       buildStepImages?: string[] | null,
>       genericArtifacts?: {
>         artifactFingerprint?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null,
>         fileHashes?: Record<string, {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         }> | null,
>         artifactRegistryPackage?: string | null,
>         uri?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null
>       }[] | null,
>       npmPackages?: {
>         fileHashes?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null,
>         uri?: string | null,
>         artifactRegistryPackage?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null
>       }[] | null,
>       buildStepOutputs?: string[] | null,
>       artifactTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactManifest?: string | null,
>       images?: {
>         ociMediaType?: string | null,
>         name?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         artifactRegistryPackage?: string | null,
>         digest?: string | null
>       }[] | null,
>       numArtifacts?: string | number | null,
>       buildStepResults?: Record<string, {
>         results?: Record<string, string> | null
>       }> | null,
>       resourceUsage?: {
>         peakCpuUtilization?: number | null,
>         averageMemoryUtilization?: number | null,
>         totalCpuDuration?: string | null,
>         peakMemoryUtilization?: number | null,
>         averageCpuUtilization?: number | null
>       } | null,
>       pythonPackages?: {
>         uri?: string | null,
>         fileHashes?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         artifactRegistryPackage?: string | null
>       }[] | null,
>       mavenArtifacts?: {
>         uri?: string | null,
>         artifactRegistryPackage?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         fileHashes?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null
>       }[] | null
>     } | null,
>     id?: string | null,
>     serviceAccount?: string | null,
>     images?: string[] | null,
>     timing?: Record<string, {
>       startTime?: string | null,
>       endTime?: string | null
>     }> | null,
>     tags?: string[] | null,
>     gitConfig?: {
>       http?: {
>         proxySecretVersionName?: string | null
>       } | null
>     } | null,
>     timeout?: string | null,
>     sourceProvenance?: {
>       resolvedStorageSource?: {
>         object?: string | null,
>         sourceFetcher?: string | null,
>         generation?: string | number | null,
>         bucket?: string | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       resolvedConnectedRepository?: {
>         repository?: string | null,
>         revision?: string | null,
>         dir?: string | null
>       } | null,
>       resolvedGitSource?: {
>         dir?: string | null,
>         url?: string | null,
>         revision?: string | null
>       } | null,
>       resolvedRepoSource?: {
>         projectId?: string | null,
>         dir?: string | null,
>         branchName?: string | null,
>         invertRegex?: boolean | null,
>         repoName?: string | null,
>         commitSha?: string | null,
>         substitutions?: Record<string, string> | null,
>         tagName?: string | null
>       } | null,
>       resolvedStorageSourceManifest?: {
>         object?: string | null,
>         bucket?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     availableSecrets?: {
>       secretManager?: {
>         versionName?: string | null,
>         env?: string | null
>       }[] | null,
>       inline?: {
>         kmsKeyName?: string | null,
>         envMap?: Record<string, string> | null
>       }[] | null
>     } | null,
>     queueTtl?: string | null,
>     failureInfo?: {
>       detail?: string | null,
>       type?: string | null
>     } | null,
>     logsBucket?: string | null,
>     dependencies?: {
>       gitSource?: {
>         fetchTags?: boolean | null,
>         destPath?: string | null,
>         depth?: string | number | null,
>         revision?: string | null,
>         recurseSubmodules?: boolean | null,
>         repository?: {
>           url?: string | null,
>           developerConnect?: string | null
>         } | null
>       } | null,
>       genericArtifact?: {
>         resource?: string | null,
>         destPath?: string | null
>       } | null,
>       empty?: boolean | null
>     }[] | null,
>     name?: string | null
>   } | null,
>   github?: {
>     push?: {
>       tag?: string | null,
>       invertRegex?: boolean | null,
>       branch?: string | null
>     } | null,
>     pullRequest?: {
>       commentControl?: string | null,
>       branch?: string | null,
>       invertRegex?: boolean | null
>     } | null,
>     owner?: string | null,
>     enterpriseConfigResourceName?: string | null,
>     installationId?: string | number | null,
>     name?: string | null
>   } | null
> }[] | null
> ```

***

### locations.triggers.patch

`build.locations.triggers.patch`

Updates a `BuildTrigger` by its project ID and trigger ID. Note: This method only updates triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers/\{trigger\_id}

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.triggers.patch({ resourceName: 'projects/demo-project/locations/us-central1/triggers/deploy-main', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `triggerId` | `string` | No | Required. ID of the `BuildTrigger` to update. |
| `resourceName` | `string` | Yes | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. Format: `projects/<id>/locations/<id>/triggers/<id>`. |
| `updateMask` | `string` | No | Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed. |
| `projectId` | `string` | No | Required. ID of the project that owns the trigger. |
| `bitbucketServerTriggerConfig` | `object` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object` | No | GitRepoSource describes a repo and ref of a code repository. |
| `body_resourceName` | `string` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string` | No | A Common Expression Language string. |
| `filename` | `string` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[]` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[]` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `developerConnectEventConfig` | `object` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string>` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `EVENT_TYPE_UNSPECIFIED \| REPO \| WEBHOOK \| PUBSUB \| MANUAL` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `autodetect` | `boolean` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[]` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `INCLUDE_BUILD_LOGS_UNSPECIFIED \| INCLUDE_BUILD_LOGS_WITH_STATUS` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   repoSlug?: string,
>   bitbucketServerConfigResource?: string,
>   projectKey?: string,
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   }
> }
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   repository?: string
> }
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string,
>   repository?: string,
>   bitbucketServerConfig?: string,
>   githubEnterpriseConfig?: string,
>   ref?: string,
>   repoType?: UNKNOWN | CLOUD_SOURCE_REPOSITORIES | GITHUB | BITBUCKET_SERVER | GITLAB | BITBUCKET_CLOUD
> }
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string,
>   state?: STATE_UNSPECIFIED | OK | SECRET_DELETED
> }
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string,
>   dir?: string,
>   branchName?: string,
>   invertRegex?: boolean,
>   repoName?: string,
>   commitSha?: string,
>   substitutions?: Record<string, string>,
>   tagName?: string
> }
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string,
>   revision?: string,
>   repository?: string,
>   bitbucketServerConfig?: string,
>   repoType?: UNKNOWN | CLOUD_SOURCE_REPOSITORIES | GITHUB | BITBUCKET_SERVER | GITLAB | BITBUCKET_CLOUD,
>   githubEnterpriseConfig?: string,
>   uri?: string
> }
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   gitRepositoryLink?: string
> }
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean
> }
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: STATE_UNSPECIFIED | OK | SUBSCRIPTION_DELETED | TOPIC_DELETED | SUBSCRIPTION_MISCONFIGURED,
>   topic?: string,
>   serviceAccountEmail?: string
> }
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   source?: {
>     repoSource?: {
>       projectId?: string,
>       dir?: string,
>       branchName?: string,
>       invertRegex?: boolean,
>       repoName?: string,
>       commitSha?: string,
>       substitutions?: Record<string, string>,
>       tagName?: string
>     },
>     connectedRepository?: {
>       repository?: string,
>       revision?: string,
>       dir?: string
>     },
>     storageSource?: {
>       object?: string,
>       sourceFetcher?: SOURCE_FETCHER_UNSPECIFIED | GSUTIL | GCS_FETCHER,
>       generation?: string | number,
>       bucket?: string
>     },
>     gitSource?: {
>       dir?: string,
>       url?: string,
>       revision?: string
>     },
>     developerConnectConfig?: {
>       dir?: string,
>       gitRepositoryLink?: string,
>       revision?: string
>     },
>     storageSourceManifest?: {
>       object?: string,
>       bucket?: string,
>       generation?: string | number
>     }
>   },
>   options?: {
>     diskSizeGb?: string | number,
>     defaultLogsBucketBehavior?: DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED | REGIONAL_USER_OWNED_BUCKET | LEGACY_BUCKET,
>     rankedMachineSeries?: (MACHINE_SERIES_UNSPECIFIED | MACHINE_SERIES_E | MACHINE_SERIES_N | MACHINE_SERIES_C)[],
>     pubsubTopic?: string,
>     workerPool?: string,
>     workerRelease?: string,
>     logging?: LOGGING_UNSPECIFIED | LEGACY | GCS_ONLY | STACKDRIVER_ONLY | CLOUD_LOGGING_ONLY | NONE,
>     pool?: {
>       name?: string
>     },
>     sourceProvenanceHash?: (NONE | SHA256 | MD5 | GO_MODULE_H1 | SHA512 | DIRSUM_SHA256)[],
>     enableStructuredLogging?: boolean,
>     logStreamingOption?: STREAM_DEFAULT | STREAM_ON | STREAM_OFF,
>     volumes?: {
>       name?: string,
>       path?: string
>     }[],
>     secretEnv?: string[],
>     automapSubstitutions?: boolean,
>     dynamicSubstitutions?: boolean,
>     machineType?: UNSPECIFIED | N1_HIGHCPU_8 | N1_HIGHCPU_32 | E2_HIGHCPU_8 | E2_HIGHCPU_32 | E2_MEDIUM | E2_STANDARD_2,
>     env?: string[],
>     requestedVerifyOption?: NOT_VERIFIED | VERIFIED | BEST_EFFORT,
>     substitutionOption?: MUST_MATCH | ALLOW_LOOSE
>   },
>   secrets?: {
>     secretEnv?: Record<string, string>,
>     kmsKeyName?: string
>   }[],
>   artifacts?: {
>     images?: string[],
>     npmPackages?: {
>       packagePath?: string,
>       repository?: string
>     }[],
>     objects?: {
>       location?: string,
>       paths?: string[]
>     },
>     pythonPackages?: {
>       repository?: string,
>       paths?: string[]
>     }[],
>     oci?: {
>       registryPath?: string,
>       file?: string,
>       tags?: string[]
>     }[],
>     goModules?: {
>       sourcePath?: string,
>       modulePath?: string,
>       repositoryName?: string,
>       repositoryLocation?: string,
>       repositoryProjectId?: string,
>       moduleVersion?: string
>     }[],
>     genericArtifacts?: {
>       folder?: string,
>       registryPath?: string
>     }[],
>     mavenArtifacts?: {
>       groupId?: string,
>       version?: string,
>       deployFolder?: string,
>       path?: string,
>       artifactId?: string,
>       repository?: string
>     }[]
>   },
>   steps?: {
>     entrypoint?: string,
>     name?: string,
>     env?: string[],
>     results?: {
>       name?: string,
>       attestationType?: string,
>       attestationContent?: string
>     }[],
>     waitFor?: string[],
>     secretEnv?: string[],
>     allowFailure?: boolean,
>     automapSubstitutions?: boolean,
>     args?: string[],
>     volumes?: {
>       name?: string,
>       path?: string
>     }[],
>     timeout?: string,
>     script?: string,
>     id?: string,
>     allowExitCodes?: number[],
>     dir?: string
>   }[],
>   substitutions?: Record<string, string>,
>   serviceAccount?: string,
>   images?: string[],
>   tags?: string[],
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string
>     }
>   },
>   timeout?: string,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string,
>       env?: string
>     }[],
>     inline?: {
>       kmsKeyName?: string,
>       envMap?: Record<string, string>
>     }[]
>   },
>   queueTtl?: string,
>   logsBucket?: string,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean,
>       destPath?: string,
>       depth?: string | number,
>       revision?: string,
>       recurseSubmodules?: boolean,
>       repository?: {
>         url?: string,
>         developerConnect?: string
>       }
>     },
>     genericArtifact?: {
>       resource?: string,
>       destPath?: string
>     },
>     empty?: boolean
>   }[]
> }
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   owner?: string,
>   enterpriseConfigResourceName?: string,
>   installationId?: string | number,
>   name?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bitbucketServerTriggerConfig` | `object \| null` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object \| null` | No | GitRepoSource describes a repo and ref of a code repository. |
| `resourceName` | `string \| null` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string \| null` | No | A Common Expression Language string. |
| `filename` | `string \| null` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[] \| null` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string \| null` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[] \| null` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object \| null` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean \| null` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string \| null` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object \| null` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object \| null` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `createTime` | `string \| null` | No | Output only. Time when the trigger was created. |
| `developerConnectEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string \| null` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object \| null` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `string \| null` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `id` | `string \| null` | No | Output only. Unique identifier of the trigger. |
| `autodetect` | `boolean \| null` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[] \| null` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object \| null` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `string \| null` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object \| null` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object \| null` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repoSlug?: string | null,
>   bitbucketServerConfigResource?: string | null,
>   bitbucketServerConfig?: {
>     peeredNetworkIpRange?: string | null,
>     peeredNetwork?: string | null,
>     connectedRepositories?: {
>       repoSlug?: string | null,
>       webhookId?: number | null,
>       projectKey?: string | null
>     }[] | null,
>     username?: string | null,
>     secrets?: {
>       webhookSecretVersionName?: string | null,
>       readAccessTokenVersionName?: string | null,
>       adminAccessTokenVersionName?: string | null
>     } | null,
>     createTime?: string | null,
>     webhookKey?: string | null,
>     sslCa?: string | null,
>     name?: string | null,
>     apiKey?: string | null,
>     hostUri?: string | null
>   } | null,
>   projectKey?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null
> } | null
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   repositoryType?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repository?: string | null
> } | null
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   githubEnterpriseConfig?: string | null,
>   ref?: string | null,
>   repoType?: string | null
> } | null
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string | null,
>   dir?: string | null,
>   branchName?: string | null,
>   invertRegex?: boolean | null,
>   repoName?: string | null,
>   commitSha?: string | null,
>   substitutions?: Record<string, string> | null,
>   tagName?: string | null
> } | null
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string | null,
>   revision?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   repoType?: string | null,
>   githubEnterpriseConfig?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   gitRepositoryLinkType?: string | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   gitRepositoryLink?: string | null
> } | null
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean | null
> } | null
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   topic?: string | null,
>   serviceAccountEmail?: string | null,
>   subscription?: string | null
> } | null
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   finishTime?: string | null,
>   source?: {
>     repoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     connectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     storageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     gitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     developerConnectConfig?: {
>       dir?: string | null,
>       gitRepositoryLink?: string | null,
>       revision?: string | null
>     } | null,
>     storageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   logUrl?: string | null,
>   options?: {
>     resolvedWorkerRelease?: string | null,
>     diskSizeGb?: string | number | null,
>     defaultLogsBucketBehavior?: string | null,
>     rankedMachineSeries?: string[] | null,
>     pubsubTopic?: string | null,
>     workerPool?: string | null,
>     workerRelease?: string | null,
>     logging?: string | null,
>     pool?: {
>       name?: string | null,
>       resolvedWorkerRelease?: string | null,
>       workerRelease?: string | null
>     } | null,
>     sourceProvenanceHash?: string[] | null,
>     enableStructuredLogging?: boolean | null,
>     logStreamingOption?: string | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     secretEnv?: string[] | null,
>     automapSubstitutions?: boolean | null,
>     dynamicSubstitutions?: boolean | null,
>     machineType?: string | null,
>     env?: string[] | null,
>     requestedVerifyOption?: string | null,
>     substitutionOption?: string | null
>   } | null,
>   statusDetail?: string | null,
>   secrets?: {
>     secretEnv?: Record<string, string> | null,
>     kmsKeyName?: string | null
>   }[] | null,
>   status?: string | null,
>   projectId?: string | null,
>   artifacts?: {
>     images?: string[] | null,
>     npmPackages?: {
>       packagePath?: string | null,
>       repository?: string | null
>     }[] | null,
>     objects?: {
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       location?: string | null,
>       paths?: string[] | null
>     } | null,
>     pythonPackages?: {
>       repository?: string | null,
>       paths?: string[] | null
>     }[] | null,
>     oci?: {
>       registryPath?: string | null,
>       file?: string | null,
>       tags?: string[] | null
>     }[] | null,
>     goModules?: {
>       sourcePath?: string | null,
>       modulePath?: string | null,
>       repositoryName?: string | null,
>       repositoryLocation?: string | null,
>       repositoryProjectId?: string | null,
>       moduleVersion?: string | null
>     }[] | null,
>     genericArtifacts?: {
>       folder?: string | null,
>       registryPath?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       groupId?: string | null,
>       version?: string | null,
>       deployFolder?: string | null,
>       path?: string | null,
>       artifactId?: string | null,
>       repository?: string | null
>     }[] | null
>   } | null,
>   warnings?: {
>     priority?: string | null,
>     text?: string | null
>   }[] | null,
>   steps?: {
>     exitCode?: number | null,
>     entrypoint?: string | null,
>     name?: string | null,
>     env?: string[] | null,
>     results?: {
>       name?: string | null,
>       attestationType?: string | null,
>       attestationContent?: string | null
>     }[] | null,
>     waitFor?: string[] | null,
>     secretEnv?: string[] | null,
>     allowFailure?: boolean | null,
>     automapSubstitutions?: boolean | null,
>     args?: string[] | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     status?: string | null,
>     pullTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     timeout?: string | null,
>     script?: string | null,
>     id?: string | null,
>     allowExitCodes?: number[] | null,
>     dir?: string | null
>   }[] | null,
>   approval?: {
>     config?: {
>       approvalRequired?: boolean | null
>     } | null,
>     result?: {
>       decision?: string | null,
>       approverAccount?: string | null,
>       approvalTime?: string | null,
>       url?: string | null,
>       comment?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   startTime?: string | null,
>   buildTriggerId?: string | null,
>   substitutions?: Record<string, string> | null,
>   results?: {
>     goModules?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       uri?: string | null
>     }[] | null,
>     buildStepImages?: string[] | null,
>     genericArtifacts?: {
>       artifactFingerprint?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       artifactRegistryPackage?: string | null,
>       uri?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     npmPackages?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     buildStepOutputs?: string[] | null,
>     artifactTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactManifest?: string | null,
>     images?: {
>       ociMediaType?: string | null,
>       name?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       digest?: string | null
>     }[] | null,
>     numArtifacts?: string | number | null,
>     buildStepResults?: Record<string, {
>       results?: Record<string, string> | null
>     }> | null,
>     resourceUsage?: {
>       peakCpuUtilization?: number | null,
>       averageMemoryUtilization?: number | null,
>       totalCpuDuration?: string | null,
>       peakMemoryUtilization?: number | null,
>       averageCpuUtilization?: number | null
>     } | null,
>     pythonPackages?: {
>       uri?: string | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     }[] | null
>   } | null,
>   id?: string | null,
>   serviceAccount?: string | null,
>   images?: string[] | null,
>   timing?: Record<string, {
>     startTime?: string | null,
>     endTime?: string | null
>   }> | null,
>   tags?: string[] | null,
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string | null
>     } | null
>   } | null,
>   timeout?: string | null,
>   sourceProvenance?: {
>     resolvedStorageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     resolvedConnectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     resolvedGitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     resolvedRepoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     resolvedStorageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string | null,
>       env?: string | null
>     }[] | null,
>     inline?: {
>       kmsKeyName?: string | null,
>       envMap?: Record<string, string> | null
>     }[] | null
>   } | null,
>   queueTtl?: string | null,
>   failureInfo?: {
>     detail?: string | null,
>     type?: string | null
>   } | null,
>   logsBucket?: string | null,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean | null,
>       destPath?: string | null,
>       depth?: string | number | null,
>       revision?: string | null,
>       recurseSubmodules?: boolean | null,
>       repository?: {
>         url?: string | null,
>         developerConnect?: string | null
>       } | null
>     } | null,
>     genericArtifact?: {
>       resource?: string | null,
>       destPath?: string | null
>     } | null,
>     empty?: boolean | null
>   }[] | null,
>   name?: string | null
> } | null
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   owner?: string | null,
>   enterpriseConfigResourceName?: string | null,
>   installationId?: string | number | null,
>   name?: string | null
> } | null
> ```

***

### locations.triggers.run

`build.locations.triggers.run`

Runs a `BuildTrigger` at a particular source revision. To run a regional or global trigger, use the POST request that includes the location endpoint in the path (ex. v1/projects/\{projectId}/locations/\{region}/triggers/\{triggerId}:run)

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.build.locations.triggers.run({
	name: 'projects/demo-project/locations/us-central1/triggers/deploy-main',
	triggerId: 'deploy-main',
	projectId: 'demo-project',
	source: { branchName: 'main' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the `Trigger` to run. Format: `projects/{project}/locations/{location}/triggers/{trigger}` Format: `projects/<id>/locations/<id>/triggers/<id>`. |
| `triggerId` | `string` | No | Required. ID of the trigger. |
| `source` | `object` | No | Location of the source in a Google Cloud Source Repository. |
| `projectId` | `string` | No | Required. ID of the project. |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   projectId?: string,
>   dir?: string,
>   branchName?: string,
>   invertRegex?: boolean,
>   repoName?: string,
>   commitSha?: string,
>   substitutions?: Record<string, string>,
>   tagName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workerPools.create

`build.locations.workerPools.create`

Creates a `WorkerPool`

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.workerPools.create({
	parent: 'projects/demo-project/locations/us-central1',
	workerPoolId: 'private',
	displayName: 'Private pool',
	privatePoolV1Config: {
		workerConfig: { machineType: 'e2-standard-2', diskSizeGb: '100' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workerPoolId` | `string` | No | Required. Immutable. The ID to use for the `WorkerPool`, which will become the final component of the resource name. This value should be 1-63 characters, and valid characters are /a-z-/. |
| `parent` | `string` | Yes | Required. The parent resource where this worker pool will be created. Format: `projects/{project}/locations/{location}`. Format: `projects/<id>/locations/<id>`. |
| `validateOnly` | `boolean` | No | If set, validate the request and preview the response, but do not actually post it. |
| `displayName` | `string` | No | A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters. |
| `privatePoolV1Config` | `object` | No | Configuration for a V1 `PrivatePool`. |
| `annotations` | `Record<string, string>` | No | User specified annotations. See [https://google.aip.dev/128#annotations](https://google.aip.dev/128#annotations) for more details such as format and size limitations. |

> [accordion] privatePoolV1Config full type
>
> ```ts theme={null}
> {
>   workerConfig?: {
>     rankedMachineSeries?: (MACHINE_SERIES_UNSPECIFIED | MACHINE_SERIES_E | MACHINE_SERIES_N | MACHINE_SERIES_C)[],
>     enableNestedVirtualization?: boolean,
>     machineType?: string,
>     diskSizeGb?: string | number,
>     workerRelease?: string
>   },
>   privateServiceConnect?: {
>     networkAttachment?: string,
>     routeAllTraffic?: boolean,
>     publicIpAddressDisabled?: boolean
>   },
>   networkConfig?: {
>     peeredNetwork?: string,
>     peeredNetworkIpRange?: string,
>     egressOption?: EGRESS_OPTION_UNSPECIFIED | NO_PUBLIC_EGRESS | PUBLIC_EGRESS
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workerPools.delete

`build.locations.workerPools.delete`

Deletes a `WorkerPool`

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.build.locations.workerPools.delete({ name: 'projects/demo-project/locations/us-central1/workerPools/private' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string` | No | Optional. If provided, it must match the server's etag on the workerpool for the request to be processed. |
| `name` | `string` | Yes | Required. The name of the `WorkerPool` to delete. Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. Format: `projects/<id>/locations/<id>/workerPools/<id>`. |
| `allowMissing` | `boolean` | No | If set to true, and the `WorkerPool` is not found, the request will succeed but no action will be taken on the server. |
| `validateOnly` | `boolean` | No | If set, validate the request and preview the response, but do not actually post it. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workerPools.get

`build.locations.workerPools.get`

Returns details of a `WorkerPool`

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.workerPools.get({ name: 'projects/demo-project/locations/us-central1/workerPools/private' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the `WorkerPool` to retrieve. Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. Format: `projects/<id>/locations/<id>/workerPools/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Output only. `WorkerPool` state. |
| `deleteTime` | `string \| null` | No | Output only. Time at which the request to delete the `WorkerPool` was received. |
| `displayName` | `string \| null` | No | A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters. |
| `uid` | `string \| null` | No | Output only. A unique identifier for the `WorkerPool`. |
| `privatePoolV1Config` | `object \| null` | No | Configuration for a V1 `PrivatePool`. |
| `annotations` | `Record<string, string> \| null` | No | User specified annotations. See [https://google.aip.dev/128#annotations](https://google.aip.dev/128#annotations) for more details such as format and size limitations. |
| `createTime` | `string \| null` | No | Output only. Time at which the request to create the `WorkerPool` was received. |
| `name` | `string \| null` | No | Output only. The resource name of the `WorkerPool`, with format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. The value of `{worker_pool}` is provided by `worker_pool_id` in `CreateWorkerPool` request and the value of `{location}` is determined by the endpoint accessed. |
| `etag` | `string \| null` | No | Output only. Checksum computed by the server. May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding. |
| `updateTime` | `string \| null` | No | Output only. Time at which the request to update the `WorkerPool` was received. |

> [accordion] privatePoolV1Config full type
>
> ```ts theme={null}
> {
>   workerConfig?: {
>     rankedMachineSeries?: string[] | null,
>     enableNestedVirtualization?: boolean | null,
>     machineType?: string | null,
>     diskSizeGb?: string | number | null,
>     workerRelease?: string | null
>   } | null,
>   privateServiceConnect?: {
>     networkAttachment?: string | null,
>     routeAllTraffic?: boolean | null,
>     publicIpAddressDisabled?: boolean | null
>   } | null,
>   networkConfig?: {
>     peeredNetwork?: string | null,
>     peeredNetworkIpRange?: string | null,
>     egressOption?: string | null
>   } | null
> } | null
> ```

***

### locations.workerPools.list

`build.locations.workerPools.list`

Lists `WorkerPool`s (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.locations.workerPools.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A page token, received from a previous `ListWorkerPools` call. Provide this to retrieve the subsequent page. |
| `pageSize` | `number` | No | The maximum number of `WorkerPool`s to return. The service may return fewer than this value. If omitted, the server will use a sensible default. |
| `parent` | `string` | Yes | Required. The parent of the collection of `WorkerPools`. Format: `projects/{project}/locations/{location}`. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Continuation token used to page through large result sets. Provide this value in a subsequent ListWorkerPoolsRequest to return the next page of results. |
| `workerPools` | `object[] \| null` | No | `WorkerPools` for the specified project. |

> [accordion] workerPools full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   deleteTime?: string | null,
>   displayName?: string | null,
>   uid?: string | null,
>   privatePoolV1Config?: {
>     workerConfig?: {
>       rankedMachineSeries?: string[] | null,
>       enableNestedVirtualization?: boolean | null,
>       machineType?: string | null,
>       diskSizeGb?: string | number | null,
>       workerRelease?: string | null
>     } | null,
>     privateServiceConnect?: {
>       networkAttachment?: string | null,
>       routeAllTraffic?: boolean | null,
>       publicIpAddressDisabled?: boolean | null
>     } | null,
>     networkConfig?: {
>       peeredNetwork?: string | null,
>       peeredNetworkIpRange?: string | null,
>       egressOption?: string | null
>     } | null
>   } | null,
>   annotations?: Record<string, string> | null,
>   createTime?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   updateTime?: string | null
> }[] | null
> ```

***

### locations.workerPools.patch

`build.locations.workerPools.patch`

Updates a `WorkerPool`

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.locations.workerPools.patch({ name: 'projects/demo-project/locations/us-central1/workerPools/private', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Output only. The resource name of the `WorkerPool`, with format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. The value of `{worker_pool}` is provided by `worker_pool_id` in `CreateWorkerPool` request and the value of `{location}` is determined by the endpoint accessed. Format: `projects/<id>/locations/<id>/workerPools/<id>`. |
| `updateMask` | `string` | No | Optional. A mask specifying which fields in `worker_pool` to update. |
| `validateOnly` | `boolean` | No | If set, validate the request and preview the response, but do not actually post it. |
| `displayName` | `string` | No | A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters. |
| `privatePoolV1Config` | `object` | No | Configuration for a V1 `PrivatePool`. |
| `annotations` | `Record<string, string>` | No | User specified annotations. See [https://google.aip.dev/128#annotations](https://google.aip.dev/128#annotations) for more details such as format and size limitations. |

> [accordion] privatePoolV1Config full type
>
> ```ts theme={null}
> {
>   workerConfig?: {
>     rankedMachineSeries?: (MACHINE_SERIES_UNSPECIFIED | MACHINE_SERIES_E | MACHINE_SERIES_N | MACHINE_SERIES_C)[],
>     enableNestedVirtualization?: boolean,
>     machineType?: string,
>     diskSizeGb?: string | number,
>     workerRelease?: string
>   },
>   privateServiceConnect?: {
>     networkAttachment?: string,
>     routeAllTraffic?: boolean,
>     publicIpAddressDisabled?: boolean
>   },
>   networkConfig?: {
>     peeredNetwork?: string,
>     peeredNetworkIpRange?: string,
>     egressOption?: EGRESS_OPTION_UNSPECIFIED | NO_PUBLIC_EGRESS | PUBLIC_EGRESS
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### operations.cancel

`build.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.operations.cancel({ name: 'operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be cancelled. Format: `operations/<path>`. |
| `body` | `object` | No | The request message for Operations.CancelOperation. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### operations.get

`build.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.operations.get({ name: 'operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `operations/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### triggers.create

`build.triggers.create`

Creates a new `BuildTrigger`. Note: This method only creates triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.triggers.create({
	projectId: 'demo-project',
	name: 'deploy-main',
	filename: 'cloudbuild.yaml',
	github: {
		owner: 'acme',
		name: 'api',
		push: { branch: '^main$' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Required. ID of the project for which to configure automatic builds. |
| `parent` | `string` | No | The parent resource where this trigger will be created. Format: `projects/{project}/locations/{location}` |
| `bitbucketServerTriggerConfig` | `object` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object` | No | GitRepoSource describes a repo and ref of a code repository. |
| `resourceName` | `string` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string` | No | A Common Expression Language string. |
| `filename` | `string` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[]` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[]` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `developerConnectEventConfig` | `object` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string>` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `EVENT_TYPE_UNSPECIFIED \| REPO \| WEBHOOK \| PUBSUB \| MANUAL` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `autodetect` | `boolean` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[]` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `INCLUDE_BUILD_LOGS_UNSPECIFIED \| INCLUDE_BUILD_LOGS_WITH_STATUS` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   repoSlug?: string,
>   bitbucketServerConfigResource?: string,
>   projectKey?: string,
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   }
> }
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   repository?: string
> }
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string,
>   repository?: string,
>   bitbucketServerConfig?: string,
>   githubEnterpriseConfig?: string,
>   ref?: string,
>   repoType?: UNKNOWN | CLOUD_SOURCE_REPOSITORIES | GITHUB | BITBUCKET_SERVER | GITLAB | BITBUCKET_CLOUD
> }
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string,
>   state?: STATE_UNSPECIFIED | OK | SECRET_DELETED
> }
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string,
>   dir?: string,
>   branchName?: string,
>   invertRegex?: boolean,
>   repoName?: string,
>   commitSha?: string,
>   substitutions?: Record<string, string>,
>   tagName?: string
> }
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string,
>   revision?: string,
>   repository?: string,
>   bitbucketServerConfig?: string,
>   repoType?: UNKNOWN | CLOUD_SOURCE_REPOSITORIES | GITHUB | BITBUCKET_SERVER | GITLAB | BITBUCKET_CLOUD,
>   githubEnterpriseConfig?: string,
>   uri?: string
> }
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   gitRepositoryLink?: string
> }
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean
> }
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: STATE_UNSPECIFIED | OK | SUBSCRIPTION_DELETED | TOPIC_DELETED | SUBSCRIPTION_MISCONFIGURED,
>   topic?: string,
>   serviceAccountEmail?: string
> }
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   source?: {
>     repoSource?: {
>       projectId?: string,
>       dir?: string,
>       branchName?: string,
>       invertRegex?: boolean,
>       repoName?: string,
>       commitSha?: string,
>       substitutions?: Record<string, string>,
>       tagName?: string
>     },
>     connectedRepository?: {
>       repository?: string,
>       revision?: string,
>       dir?: string
>     },
>     storageSource?: {
>       object?: string,
>       sourceFetcher?: SOURCE_FETCHER_UNSPECIFIED | GSUTIL | GCS_FETCHER,
>       generation?: string | number,
>       bucket?: string
>     },
>     gitSource?: {
>       dir?: string,
>       url?: string,
>       revision?: string
>     },
>     developerConnectConfig?: {
>       dir?: string,
>       gitRepositoryLink?: string,
>       revision?: string
>     },
>     storageSourceManifest?: {
>       object?: string,
>       bucket?: string,
>       generation?: string | number
>     }
>   },
>   options?: {
>     diskSizeGb?: string | number,
>     defaultLogsBucketBehavior?: DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED | REGIONAL_USER_OWNED_BUCKET | LEGACY_BUCKET,
>     rankedMachineSeries?: (MACHINE_SERIES_UNSPECIFIED | MACHINE_SERIES_E | MACHINE_SERIES_N | MACHINE_SERIES_C)[],
>     pubsubTopic?: string,
>     workerPool?: string,
>     workerRelease?: string,
>     logging?: LOGGING_UNSPECIFIED | LEGACY | GCS_ONLY | STACKDRIVER_ONLY | CLOUD_LOGGING_ONLY | NONE,
>     pool?: {
>       name?: string
>     },
>     sourceProvenanceHash?: (NONE | SHA256 | MD5 | GO_MODULE_H1 | SHA512 | DIRSUM_SHA256)[],
>     enableStructuredLogging?: boolean,
>     logStreamingOption?: STREAM_DEFAULT | STREAM_ON | STREAM_OFF,
>     volumes?: {
>       name?: string,
>       path?: string
>     }[],
>     secretEnv?: string[],
>     automapSubstitutions?: boolean,
>     dynamicSubstitutions?: boolean,
>     machineType?: UNSPECIFIED | N1_HIGHCPU_8 | N1_HIGHCPU_32 | E2_HIGHCPU_8 | E2_HIGHCPU_32 | E2_MEDIUM | E2_STANDARD_2,
>     env?: string[],
>     requestedVerifyOption?: NOT_VERIFIED | VERIFIED | BEST_EFFORT,
>     substitutionOption?: MUST_MATCH | ALLOW_LOOSE
>   },
>   secrets?: {
>     secretEnv?: Record<string, string>,
>     kmsKeyName?: string
>   }[],
>   artifacts?: {
>     images?: string[],
>     npmPackages?: {
>       packagePath?: string,
>       repository?: string
>     }[],
>     objects?: {
>       location?: string,
>       paths?: string[]
>     },
>     pythonPackages?: {
>       repository?: string,
>       paths?: string[]
>     }[],
>     oci?: {
>       registryPath?: string,
>       file?: string,
>       tags?: string[]
>     }[],
>     goModules?: {
>       sourcePath?: string,
>       modulePath?: string,
>       repositoryName?: string,
>       repositoryLocation?: string,
>       repositoryProjectId?: string,
>       moduleVersion?: string
>     }[],
>     genericArtifacts?: {
>       folder?: string,
>       registryPath?: string
>     }[],
>     mavenArtifacts?: {
>       groupId?: string,
>       version?: string,
>       deployFolder?: string,
>       path?: string,
>       artifactId?: string,
>       repository?: string
>     }[]
>   },
>   steps?: {
>     entrypoint?: string,
>     name?: string,
>     env?: string[],
>     results?: {
>       name?: string,
>       attestationType?: string,
>       attestationContent?: string
>     }[],
>     waitFor?: string[],
>     secretEnv?: string[],
>     allowFailure?: boolean,
>     automapSubstitutions?: boolean,
>     args?: string[],
>     volumes?: {
>       name?: string,
>       path?: string
>     }[],
>     timeout?: string,
>     script?: string,
>     id?: string,
>     allowExitCodes?: number[],
>     dir?: string
>   }[],
>   substitutions?: Record<string, string>,
>   serviceAccount?: string,
>   images?: string[],
>   tags?: string[],
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string
>     }
>   },
>   timeout?: string,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string,
>       env?: string
>     }[],
>     inline?: {
>       kmsKeyName?: string,
>       envMap?: Record<string, string>
>     }[]
>   },
>   queueTtl?: string,
>   logsBucket?: string,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean,
>       destPath?: string,
>       depth?: string | number,
>       revision?: string,
>       recurseSubmodules?: boolean,
>       repository?: {
>         url?: string,
>         developerConnect?: string
>       }
>     },
>     genericArtifact?: {
>       resource?: string,
>       destPath?: string
>     },
>     empty?: boolean
>   }[]
> }
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   owner?: string,
>   enterpriseConfigResourceName?: string,
>   installationId?: string | number,
>   name?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bitbucketServerTriggerConfig` | `object \| null` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object \| null` | No | GitRepoSource describes a repo and ref of a code repository. |
| `resourceName` | `string \| null` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string \| null` | No | A Common Expression Language string. |
| `filename` | `string \| null` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[] \| null` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string \| null` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[] \| null` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object \| null` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean \| null` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string \| null` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object \| null` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object \| null` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `createTime` | `string \| null` | No | Output only. Time when the trigger was created. |
| `developerConnectEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string \| null` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object \| null` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `string \| null` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `id` | `string \| null` | No | Output only. Unique identifier of the trigger. |
| `autodetect` | `boolean \| null` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[] \| null` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object \| null` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `string \| null` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object \| null` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object \| null` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repoSlug?: string | null,
>   bitbucketServerConfigResource?: string | null,
>   bitbucketServerConfig?: {
>     peeredNetworkIpRange?: string | null,
>     peeredNetwork?: string | null,
>     connectedRepositories?: {
>       repoSlug?: string | null,
>       webhookId?: number | null,
>       projectKey?: string | null
>     }[] | null,
>     username?: string | null,
>     secrets?: {
>       webhookSecretVersionName?: string | null,
>       readAccessTokenVersionName?: string | null,
>       adminAccessTokenVersionName?: string | null
>     } | null,
>     createTime?: string | null,
>     webhookKey?: string | null,
>     sslCa?: string | null,
>     name?: string | null,
>     apiKey?: string | null,
>     hostUri?: string | null
>   } | null,
>   projectKey?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null
> } | null
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   repositoryType?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repository?: string | null
> } | null
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   githubEnterpriseConfig?: string | null,
>   ref?: string | null,
>   repoType?: string | null
> } | null
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string | null,
>   dir?: string | null,
>   branchName?: string | null,
>   invertRegex?: boolean | null,
>   repoName?: string | null,
>   commitSha?: string | null,
>   substitutions?: Record<string, string> | null,
>   tagName?: string | null
> } | null
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string | null,
>   revision?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   repoType?: string | null,
>   githubEnterpriseConfig?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   gitRepositoryLinkType?: string | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   gitRepositoryLink?: string | null
> } | null
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean | null
> } | null
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   topic?: string | null,
>   serviceAccountEmail?: string | null,
>   subscription?: string | null
> } | null
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   finishTime?: string | null,
>   source?: {
>     repoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     connectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     storageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     gitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     developerConnectConfig?: {
>       dir?: string | null,
>       gitRepositoryLink?: string | null,
>       revision?: string | null
>     } | null,
>     storageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   logUrl?: string | null,
>   options?: {
>     resolvedWorkerRelease?: string | null,
>     diskSizeGb?: string | number | null,
>     defaultLogsBucketBehavior?: string | null,
>     rankedMachineSeries?: string[] | null,
>     pubsubTopic?: string | null,
>     workerPool?: string | null,
>     workerRelease?: string | null,
>     logging?: string | null,
>     pool?: {
>       name?: string | null,
>       resolvedWorkerRelease?: string | null,
>       workerRelease?: string | null
>     } | null,
>     sourceProvenanceHash?: string[] | null,
>     enableStructuredLogging?: boolean | null,
>     logStreamingOption?: string | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     secretEnv?: string[] | null,
>     automapSubstitutions?: boolean | null,
>     dynamicSubstitutions?: boolean | null,
>     machineType?: string | null,
>     env?: string[] | null,
>     requestedVerifyOption?: string | null,
>     substitutionOption?: string | null
>   } | null,
>   statusDetail?: string | null,
>   secrets?: {
>     secretEnv?: Record<string, string> | null,
>     kmsKeyName?: string | null
>   }[] | null,
>   status?: string | null,
>   projectId?: string | null,
>   artifacts?: {
>     images?: string[] | null,
>     npmPackages?: {
>       packagePath?: string | null,
>       repository?: string | null
>     }[] | null,
>     objects?: {
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       location?: string | null,
>       paths?: string[] | null
>     } | null,
>     pythonPackages?: {
>       repository?: string | null,
>       paths?: string[] | null
>     }[] | null,
>     oci?: {
>       registryPath?: string | null,
>       file?: string | null,
>       tags?: string[] | null
>     }[] | null,
>     goModules?: {
>       sourcePath?: string | null,
>       modulePath?: string | null,
>       repositoryName?: string | null,
>       repositoryLocation?: string | null,
>       repositoryProjectId?: string | null,
>       moduleVersion?: string | null
>     }[] | null,
>     genericArtifacts?: {
>       folder?: string | null,
>       registryPath?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       groupId?: string | null,
>       version?: string | null,
>       deployFolder?: string | null,
>       path?: string | null,
>       artifactId?: string | null,
>       repository?: string | null
>     }[] | null
>   } | null,
>   warnings?: {
>     priority?: string | null,
>     text?: string | null
>   }[] | null,
>   steps?: {
>     exitCode?: number | null,
>     entrypoint?: string | null,
>     name?: string | null,
>     env?: string[] | null,
>     results?: {
>       name?: string | null,
>       attestationType?: string | null,
>       attestationContent?: string | null
>     }[] | null,
>     waitFor?: string[] | null,
>     secretEnv?: string[] | null,
>     allowFailure?: boolean | null,
>     automapSubstitutions?: boolean | null,
>     args?: string[] | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     status?: string | null,
>     pullTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     timeout?: string | null,
>     script?: string | null,
>     id?: string | null,
>     allowExitCodes?: number[] | null,
>     dir?: string | null
>   }[] | null,
>   approval?: {
>     config?: {
>       approvalRequired?: boolean | null
>     } | null,
>     result?: {
>       decision?: string | null,
>       approverAccount?: string | null,
>       approvalTime?: string | null,
>       url?: string | null,
>       comment?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   startTime?: string | null,
>   buildTriggerId?: string | null,
>   substitutions?: Record<string, string> | null,
>   results?: {
>     goModules?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       uri?: string | null
>     }[] | null,
>     buildStepImages?: string[] | null,
>     genericArtifacts?: {
>       artifactFingerprint?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       artifactRegistryPackage?: string | null,
>       uri?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     npmPackages?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     buildStepOutputs?: string[] | null,
>     artifactTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactManifest?: string | null,
>     images?: {
>       ociMediaType?: string | null,
>       name?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       digest?: string | null
>     }[] | null,
>     numArtifacts?: string | number | null,
>     buildStepResults?: Record<string, {
>       results?: Record<string, string> | null
>     }> | null,
>     resourceUsage?: {
>       peakCpuUtilization?: number | null,
>       averageMemoryUtilization?: number | null,
>       totalCpuDuration?: string | null,
>       peakMemoryUtilization?: number | null,
>       averageCpuUtilization?: number | null
>     } | null,
>     pythonPackages?: {
>       uri?: string | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     }[] | null
>   } | null,
>   id?: string | null,
>   serviceAccount?: string | null,
>   images?: string[] | null,
>   timing?: Record<string, {
>     startTime?: string | null,
>     endTime?: string | null
>   }> | null,
>   tags?: string[] | null,
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string | null
>     } | null
>   } | null,
>   timeout?: string | null,
>   sourceProvenance?: {
>     resolvedStorageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     resolvedConnectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     resolvedGitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     resolvedRepoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     resolvedStorageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string | null,
>       env?: string | null
>     }[] | null,
>     inline?: {
>       kmsKeyName?: string | null,
>       envMap?: Record<string, string> | null
>     }[] | null
>   } | null,
>   queueTtl?: string | null,
>   failureInfo?: {
>     detail?: string | null,
>     type?: string | null
>   } | null,
>   logsBucket?: string | null,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean | null,
>       destPath?: string | null,
>       depth?: string | number | null,
>       revision?: string | null,
>       recurseSubmodules?: boolean | null,
>       repository?: {
>         url?: string | null,
>         developerConnect?: string | null
>       } | null
>     } | null,
>     genericArtifact?: {
>       resource?: string | null,
>       destPath?: string | null
>     } | null,
>     empty?: boolean | null
>   }[] | null,
>   name?: string | null
> } | null
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   owner?: string | null,
>   enterpriseConfigResourceName?: string | null,
>   installationId?: string | number | null,
>   name?: string | null
> } | null
> ```

***

### triggers.delete

`build.triggers.delete`

Deletes a `BuildTrigger` by its project ID and trigger ID. Note: This method only deletes triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers/\{trigger\_id}

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.build.triggers.delete({ projectId: 'demo-project', triggerId: 'deploy-main' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | The name of the `Trigger` to delete. Format: `projects/{project}/locations/{location}/triggers/{trigger}` |
| `projectId` | `string` | Yes | Required. ID of the project that owns the trigger. |
| `triggerId` | `string` | Yes | Required. ID of the `BuildTrigger` to delete. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### triggers.get

`build.triggers.get`

Returns information about a `BuildTrigger`. Note: This method only gets triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers/\{trigger\_id}

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.triggers.get({ projectId: 'demo-project', triggerId: 'deploy-main' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Required. ID of the project that owns the trigger. |
| `name` | `string` | No | The name of the `Trigger` to retrieve. Format: `projects/{project}/locations/{location}/triggers/{trigger}` |
| `triggerId` | `string` | Yes | Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bitbucketServerTriggerConfig` | `object \| null` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object \| null` | No | GitRepoSource describes a repo and ref of a code repository. |
| `resourceName` | `string \| null` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string \| null` | No | A Common Expression Language string. |
| `filename` | `string \| null` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[] \| null` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string \| null` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[] \| null` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object \| null` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean \| null` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string \| null` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object \| null` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object \| null` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `createTime` | `string \| null` | No | Output only. Time when the trigger was created. |
| `developerConnectEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string \| null` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object \| null` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `string \| null` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `id` | `string \| null` | No | Output only. Unique identifier of the trigger. |
| `autodetect` | `boolean \| null` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[] \| null` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object \| null` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `string \| null` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object \| null` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object \| null` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repoSlug?: string | null,
>   bitbucketServerConfigResource?: string | null,
>   bitbucketServerConfig?: {
>     peeredNetworkIpRange?: string | null,
>     peeredNetwork?: string | null,
>     connectedRepositories?: {
>       repoSlug?: string | null,
>       webhookId?: number | null,
>       projectKey?: string | null
>     }[] | null,
>     username?: string | null,
>     secrets?: {
>       webhookSecretVersionName?: string | null,
>       readAccessTokenVersionName?: string | null,
>       adminAccessTokenVersionName?: string | null
>     } | null,
>     createTime?: string | null,
>     webhookKey?: string | null,
>     sslCa?: string | null,
>     name?: string | null,
>     apiKey?: string | null,
>     hostUri?: string | null
>   } | null,
>   projectKey?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null
> } | null
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   repositoryType?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repository?: string | null
> } | null
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   githubEnterpriseConfig?: string | null,
>   ref?: string | null,
>   repoType?: string | null
> } | null
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string | null,
>   dir?: string | null,
>   branchName?: string | null,
>   invertRegex?: boolean | null,
>   repoName?: string | null,
>   commitSha?: string | null,
>   substitutions?: Record<string, string> | null,
>   tagName?: string | null
> } | null
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string | null,
>   revision?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   repoType?: string | null,
>   githubEnterpriseConfig?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   gitRepositoryLinkType?: string | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   gitRepositoryLink?: string | null
> } | null
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean | null
> } | null
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   topic?: string | null,
>   serviceAccountEmail?: string | null,
>   subscription?: string | null
> } | null
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   finishTime?: string | null,
>   source?: {
>     repoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     connectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     storageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     gitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     developerConnectConfig?: {
>       dir?: string | null,
>       gitRepositoryLink?: string | null,
>       revision?: string | null
>     } | null,
>     storageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   logUrl?: string | null,
>   options?: {
>     resolvedWorkerRelease?: string | null,
>     diskSizeGb?: string | number | null,
>     defaultLogsBucketBehavior?: string | null,
>     rankedMachineSeries?: string[] | null,
>     pubsubTopic?: string | null,
>     workerPool?: string | null,
>     workerRelease?: string | null,
>     logging?: string | null,
>     pool?: {
>       name?: string | null,
>       resolvedWorkerRelease?: string | null,
>       workerRelease?: string | null
>     } | null,
>     sourceProvenanceHash?: string[] | null,
>     enableStructuredLogging?: boolean | null,
>     logStreamingOption?: string | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     secretEnv?: string[] | null,
>     automapSubstitutions?: boolean | null,
>     dynamicSubstitutions?: boolean | null,
>     machineType?: string | null,
>     env?: string[] | null,
>     requestedVerifyOption?: string | null,
>     substitutionOption?: string | null
>   } | null,
>   statusDetail?: string | null,
>   secrets?: {
>     secretEnv?: Record<string, string> | null,
>     kmsKeyName?: string | null
>   }[] | null,
>   status?: string | null,
>   projectId?: string | null,
>   artifacts?: {
>     images?: string[] | null,
>     npmPackages?: {
>       packagePath?: string | null,
>       repository?: string | null
>     }[] | null,
>     objects?: {
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       location?: string | null,
>       paths?: string[] | null
>     } | null,
>     pythonPackages?: {
>       repository?: string | null,
>       paths?: string[] | null
>     }[] | null,
>     oci?: {
>       registryPath?: string | null,
>       file?: string | null,
>       tags?: string[] | null
>     }[] | null,
>     goModules?: {
>       sourcePath?: string | null,
>       modulePath?: string | null,
>       repositoryName?: string | null,
>       repositoryLocation?: string | null,
>       repositoryProjectId?: string | null,
>       moduleVersion?: string | null
>     }[] | null,
>     genericArtifacts?: {
>       folder?: string | null,
>       registryPath?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       groupId?: string | null,
>       version?: string | null,
>       deployFolder?: string | null,
>       path?: string | null,
>       artifactId?: string | null,
>       repository?: string | null
>     }[] | null
>   } | null,
>   warnings?: {
>     priority?: string | null,
>     text?: string | null
>   }[] | null,
>   steps?: {
>     exitCode?: number | null,
>     entrypoint?: string | null,
>     name?: string | null,
>     env?: string[] | null,
>     results?: {
>       name?: string | null,
>       attestationType?: string | null,
>       attestationContent?: string | null
>     }[] | null,
>     waitFor?: string[] | null,
>     secretEnv?: string[] | null,
>     allowFailure?: boolean | null,
>     automapSubstitutions?: boolean | null,
>     args?: string[] | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     status?: string | null,
>     pullTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     timeout?: string | null,
>     script?: string | null,
>     id?: string | null,
>     allowExitCodes?: number[] | null,
>     dir?: string | null
>   }[] | null,
>   approval?: {
>     config?: {
>       approvalRequired?: boolean | null
>     } | null,
>     result?: {
>       decision?: string | null,
>       approverAccount?: string | null,
>       approvalTime?: string | null,
>       url?: string | null,
>       comment?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   startTime?: string | null,
>   buildTriggerId?: string | null,
>   substitutions?: Record<string, string> | null,
>   results?: {
>     goModules?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       uri?: string | null
>     }[] | null,
>     buildStepImages?: string[] | null,
>     genericArtifacts?: {
>       artifactFingerprint?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       artifactRegistryPackage?: string | null,
>       uri?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     npmPackages?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     buildStepOutputs?: string[] | null,
>     artifactTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactManifest?: string | null,
>     images?: {
>       ociMediaType?: string | null,
>       name?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       digest?: string | null
>     }[] | null,
>     numArtifacts?: string | number | null,
>     buildStepResults?: Record<string, {
>       results?: Record<string, string> | null
>     }> | null,
>     resourceUsage?: {
>       peakCpuUtilization?: number | null,
>       averageMemoryUtilization?: number | null,
>       totalCpuDuration?: string | null,
>       peakMemoryUtilization?: number | null,
>       averageCpuUtilization?: number | null
>     } | null,
>     pythonPackages?: {
>       uri?: string | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     }[] | null
>   } | null,
>   id?: string | null,
>   serviceAccount?: string | null,
>   images?: string[] | null,
>   timing?: Record<string, {
>     startTime?: string | null,
>     endTime?: string | null
>   }> | null,
>   tags?: string[] | null,
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string | null
>     } | null
>   } | null,
>   timeout?: string | null,
>   sourceProvenance?: {
>     resolvedStorageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     resolvedConnectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     resolvedGitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     resolvedRepoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     resolvedStorageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string | null,
>       env?: string | null
>     }[] | null,
>     inline?: {
>       kmsKeyName?: string | null,
>       envMap?: Record<string, string> | null
>     }[] | null
>   } | null,
>   queueTtl?: string | null,
>   failureInfo?: {
>     detail?: string | null,
>     type?: string | null
>   } | null,
>   logsBucket?: string | null,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean | null,
>       destPath?: string | null,
>       depth?: string | number | null,
>       revision?: string | null,
>       recurseSubmodules?: boolean | null,
>       repository?: {
>         url?: string | null,
>         developerConnect?: string | null
>       } | null
>     } | null,
>     genericArtifact?: {
>       resource?: string | null,
>       destPath?: string | null
>     } | null,
>     empty?: boolean | null
>   }[] | null,
>   name?: string | null
> } | null
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   owner?: string | null,
>   enterpriseConfigResourceName?: string | null,
>   installationId?: string | number | null,
>   name?: string | null
> } | null
> ```

***

### triggers.list

`build.triggers.list`

Lists existing `BuildTrigger`s. Note: This method only lists triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.build.triggers.list({ projectId: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Required. ID of the project for which to list BuildTriggers. |
| `parent` | `string` | No | The parent of the collection of `Triggers`. Format: `projects/{project}/locations/{location}` |
| `pageToken` | `string` | No | Token to provide to skip to a particular spot in the list. |
| `pageSize` | `number` | No | Number of results to return in the list. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `triggers` | `object[] \| null` | No | `BuildTriggers` for the project, sorted by `create_time` descending. |
| `nextPageToken` | `string \| null` | No | Token to receive the next page of results. |

> [accordion] triggers full type
>
> ```ts theme={null}
> {
>   bitbucketServerTriggerConfig?: {
>     pullRequest?: {
>       commentControl?: string | null,
>       branch?: string | null,
>       invertRegex?: boolean | null
>     } | null,
>     repoSlug?: string | null,
>     bitbucketServerConfigResource?: string | null,
>     bitbucketServerConfig?: {
>       peeredNetworkIpRange?: string | null,
>       peeredNetwork?: string | null,
>       connectedRepositories?: {
>         repoSlug?: string | null,
>         webhookId?: number | null,
>         projectKey?: string | null
>       }[] | null,
>       username?: string | null,
>       secrets?: {
>         webhookSecretVersionName?: string | null,
>         readAccessTokenVersionName?: string | null,
>         adminAccessTokenVersionName?: string | null
>       } | null,
>       createTime?: string | null,
>       webhookKey?: string | null,
>       sslCa?: string | null,
>       name?: string | null,
>       apiKey?: string | null,
>       hostUri?: string | null
>     } | null,
>     projectKey?: string | null,
>     push?: {
>       tag?: string | null,
>       invertRegex?: boolean | null,
>       branch?: string | null
>     } | null
>   } | null,
>   repositoryEventConfig?: {
>     repositoryType?: string | null,
>     push?: {
>       tag?: string | null,
>       invertRegex?: boolean | null,
>       branch?: string | null
>     } | null,
>     pullRequest?: {
>       commentControl?: string | null,
>       branch?: string | null,
>       invertRegex?: boolean | null
>     } | null,
>     repository?: string | null
>   } | null,
>   sourceToBuild?: {
>     uri?: string | null,
>     repository?: string | null,
>     bitbucketServerConfig?: string | null,
>     githubEnterpriseConfig?: string | null,
>     ref?: string | null,
>     repoType?: string | null
>   } | null,
>   resourceName?: string | null,
>   filter?: string | null,
>   filename?: string | null,
>   ignoredFiles?: string[] | null,
>   serviceAccount?: string | null,
>   tags?: string[] | null,
>   webhookConfig?: {
>     secret?: string | null,
>     state?: string | null
>   } | null,
>   disabled?: boolean | null,
>   name?: string | null,
>   triggerTemplate?: {
>     projectId?: string | null,
>     dir?: string | null,
>     branchName?: string | null,
>     invertRegex?: boolean | null,
>     repoName?: string | null,
>     commitSha?: string | null,
>     substitutions?: Record<string, string> | null,
>     tagName?: string | null
>   } | null,
>   gitFileSource?: {
>     path?: string | null,
>     revision?: string | null,
>     repository?: string | null,
>     bitbucketServerConfig?: string | null,
>     repoType?: string | null,
>     githubEnterpriseConfig?: string | null,
>     uri?: string | null
>   } | null,
>   createTime?: string | null,
>   developerConnectEventConfig?: {
>     gitRepositoryLinkType?: string | null,
>     pullRequest?: {
>       commentControl?: string | null,
>       branch?: string | null,
>       invertRegex?: boolean | null
>     } | null,
>     push?: {
>       tag?: string | null,
>       invertRegex?: boolean | null,
>       branch?: string | null
>     } | null,
>     gitRepositoryLink?: string | null
>   } | null,
>   description?: string | null,
>   substitutions?: Record<string, string> | null,
>   approvalConfig?: {
>     approvalRequired?: boolean | null
>   } | null,
>   eventType?: string | null,
>   id?: string | null,
>   autodetect?: boolean | null,
>   includedFiles?: string[] | null,
>   pubsubConfig?: {
>     state?: string | null,
>     topic?: string | null,
>     serviceAccountEmail?: string | null,
>     subscription?: string | null
>   } | null,
>   includeBuildLogs?: string | null,
>   build?: {
>     createTime?: string | null,
>     finishTime?: string | null,
>     source?: {
>       repoSource?: {
>         projectId?: string | null,
>         dir?: string | null,
>         branchName?: string | null,
>         invertRegex?: boolean | null,
>         repoName?: string | null,
>         commitSha?: string | null,
>         substitutions?: Record<string, string> | null,
>         tagName?: string | null
>       } | null,
>       connectedRepository?: {
>         repository?: string | null,
>         revision?: string | null,
>         dir?: string | null
>       } | null,
>       storageSource?: {
>         object?: string | null,
>         sourceFetcher?: string | null,
>         generation?: string | number | null,
>         bucket?: string | null
>       } | null,
>       gitSource?: {
>         dir?: string | null,
>         url?: string | null,
>         revision?: string | null
>       } | null,
>       developerConnectConfig?: {
>         dir?: string | null,
>         gitRepositoryLink?: string | null,
>         revision?: string | null
>       } | null,
>       storageSourceManifest?: {
>         object?: string | null,
>         bucket?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     logUrl?: string | null,
>     options?: {
>       resolvedWorkerRelease?: string | null,
>       diskSizeGb?: string | number | null,
>       defaultLogsBucketBehavior?: string | null,
>       rankedMachineSeries?: string[] | null,
>       pubsubTopic?: string | null,
>       workerPool?: string | null,
>       workerRelease?: string | null,
>       logging?: string | null,
>       pool?: {
>         name?: string | null,
>         resolvedWorkerRelease?: string | null,
>         workerRelease?: string | null
>       } | null,
>       sourceProvenanceHash?: string[] | null,
>       enableStructuredLogging?: boolean | null,
>       logStreamingOption?: string | null,
>       volumes?: {
>         name?: string | null,
>         path?: string | null
>       }[] | null,
>       secretEnv?: string[] | null,
>       automapSubstitutions?: boolean | null,
>       dynamicSubstitutions?: boolean | null,
>       machineType?: string | null,
>       env?: string[] | null,
>       requestedVerifyOption?: string | null,
>       substitutionOption?: string | null
>     } | null,
>     statusDetail?: string | null,
>     secrets?: {
>       secretEnv?: Record<string, string> | null,
>       kmsKeyName?: string | null
>     }[] | null,
>     status?: string | null,
>     projectId?: string | null,
>     artifacts?: {
>       images?: string[] | null,
>       npmPackages?: {
>         packagePath?: string | null,
>         repository?: string | null
>       }[] | null,
>       objects?: {
>         timing?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         location?: string | null,
>         paths?: string[] | null
>       } | null,
>       pythonPackages?: {
>         repository?: string | null,
>         paths?: string[] | null
>       }[] | null,
>       oci?: {
>         registryPath?: string | null,
>         file?: string | null,
>         tags?: string[] | null
>       }[] | null,
>       goModules?: {
>         sourcePath?: string | null,
>         modulePath?: string | null,
>         repositoryName?: string | null,
>         repositoryLocation?: string | null,
>         repositoryProjectId?: string | null,
>         moduleVersion?: string | null
>       }[] | null,
>       genericArtifacts?: {
>         folder?: string | null,
>         registryPath?: string | null
>       }[] | null,
>       mavenArtifacts?: {
>         groupId?: string | null,
>         version?: string | null,
>         deployFolder?: string | null,
>         path?: string | null,
>         artifactId?: string | null,
>         repository?: string | null
>       }[] | null
>     } | null,
>     warnings?: {
>       priority?: string | null,
>       text?: string | null
>     }[] | null,
>     steps?: {
>       exitCode?: number | null,
>       entrypoint?: string | null,
>       name?: string | null,
>       env?: string[] | null,
>       results?: {
>         name?: string | null,
>         attestationType?: string | null,
>         attestationContent?: string | null
>       }[] | null,
>       waitFor?: string[] | null,
>       secretEnv?: string[] | null,
>       allowFailure?: boolean | null,
>       automapSubstitutions?: boolean | null,
>       args?: string[] | null,
>       volumes?: {
>         name?: string | null,
>         path?: string | null
>       }[] | null,
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       status?: string | null,
>       pullTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       timeout?: string | null,
>       script?: string | null,
>       id?: string | null,
>       allowExitCodes?: number[] | null,
>       dir?: string | null
>     }[] | null,
>     approval?: {
>       config?: {
>         approvalRequired?: boolean | null
>       } | null,
>       result?: {
>         decision?: string | null,
>         approverAccount?: string | null,
>         approvalTime?: string | null,
>         url?: string | null,
>         comment?: string | null
>       } | null,
>       state?: string | null
>     } | null,
>     startTime?: string | null,
>     buildTriggerId?: string | null,
>     substitutions?: Record<string, string> | null,
>     results?: {
>       goModules?: {
>         fileHashes?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null,
>         artifactRegistryPackage?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         uri?: string | null
>       }[] | null,
>       buildStepImages?: string[] | null,
>       genericArtifacts?: {
>         artifactFingerprint?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null,
>         fileHashes?: Record<string, {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         }> | null,
>         artifactRegistryPackage?: string | null,
>         uri?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null
>       }[] | null,
>       npmPackages?: {
>         fileHashes?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null,
>         uri?: string | null,
>         artifactRegistryPackage?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null
>       }[] | null,
>       buildStepOutputs?: string[] | null,
>       artifactTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactManifest?: string | null,
>       images?: {
>         ociMediaType?: string | null,
>         name?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         artifactRegistryPackage?: string | null,
>         digest?: string | null
>       }[] | null,
>       numArtifacts?: string | number | null,
>       buildStepResults?: Record<string, {
>         results?: Record<string, string> | null
>       }> | null,
>       resourceUsage?: {
>         peakCpuUtilization?: number | null,
>         averageMemoryUtilization?: number | null,
>         totalCpuDuration?: string | null,
>         peakMemoryUtilization?: number | null,
>         averageCpuUtilization?: number | null
>       } | null,
>       pythonPackages?: {
>         uri?: string | null,
>         fileHashes?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         artifactRegistryPackage?: string | null
>       }[] | null,
>       mavenArtifacts?: {
>         uri?: string | null,
>         artifactRegistryPackage?: string | null,
>         pushTiming?: {
>           startTime?: string | null,
>           endTime?: string | null
>         } | null,
>         fileHashes?: {
>           fileHash?: {
>             type?: string | null,
>             value?: string | null
>           }[] | null
>         } | null
>       }[] | null
>     } | null,
>     id?: string | null,
>     serviceAccount?: string | null,
>     images?: string[] | null,
>     timing?: Record<string, {
>       startTime?: string | null,
>       endTime?: string | null
>     }> | null,
>     tags?: string[] | null,
>     gitConfig?: {
>       http?: {
>         proxySecretVersionName?: string | null
>       } | null
>     } | null,
>     timeout?: string | null,
>     sourceProvenance?: {
>       resolvedStorageSource?: {
>         object?: string | null,
>         sourceFetcher?: string | null,
>         generation?: string | number | null,
>         bucket?: string | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       resolvedConnectedRepository?: {
>         repository?: string | null,
>         revision?: string | null,
>         dir?: string | null
>       } | null,
>       resolvedGitSource?: {
>         dir?: string | null,
>         url?: string | null,
>         revision?: string | null
>       } | null,
>       resolvedRepoSource?: {
>         projectId?: string | null,
>         dir?: string | null,
>         branchName?: string | null,
>         invertRegex?: boolean | null,
>         repoName?: string | null,
>         commitSha?: string | null,
>         substitutions?: Record<string, string> | null,
>         tagName?: string | null
>       } | null,
>       resolvedStorageSourceManifest?: {
>         object?: string | null,
>         bucket?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     availableSecrets?: {
>       secretManager?: {
>         versionName?: string | null,
>         env?: string | null
>       }[] | null,
>       inline?: {
>         kmsKeyName?: string | null,
>         envMap?: Record<string, string> | null
>       }[] | null
>     } | null,
>     queueTtl?: string | null,
>     failureInfo?: {
>       detail?: string | null,
>       type?: string | null
>     } | null,
>     logsBucket?: string | null,
>     dependencies?: {
>       gitSource?: {
>         fetchTags?: boolean | null,
>         destPath?: string | null,
>         depth?: string | number | null,
>         revision?: string | null,
>         recurseSubmodules?: boolean | null,
>         repository?: {
>           url?: string | null,
>           developerConnect?: string | null
>         } | null
>       } | null,
>       genericArtifact?: {
>         resource?: string | null,
>         destPath?: string | null
>       } | null,
>       empty?: boolean | null
>     }[] | null,
>     name?: string | null
>   } | null,
>   github?: {
>     push?: {
>       tag?: string | null,
>       invertRegex?: boolean | null,
>       branch?: string | null
>     } | null,
>     pullRequest?: {
>       commentControl?: string | null,
>       branch?: string | null,
>       invertRegex?: boolean | null
>     } | null,
>     owner?: string | null,
>     enterpriseConfigResourceName?: string | null,
>     installationId?: string | number | null,
>     name?: string | null
>   } | null
> }[] | null
> ```

***

### triggers.patch

`build.triggers.patch`

Updates a `BuildTrigger` by its project ID and trigger ID. Note: This method only updates triggers in the "global" region when using the legacy resource path projects/\{project\_id}/triggers/\{trigger\_id}

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.build.triggers.patch({
	projectId: 'demo-project',
	triggerId: 'deploy-main',
	description: 'Managed by Corsair',
	updateMask: 'description',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Required. ID of the project that owns the trigger. |
| `triggerId` | `string` | Yes | Required. ID of the `BuildTrigger` to update. |
| `updateMask` | `string` | No | Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed. |
| `bitbucketServerTriggerConfig` | `object` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object` | No | GitRepoSource describes a repo and ref of a code repository. |
| `resourceName` | `string` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string` | No | A Common Expression Language string. |
| `filename` | `string` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[]` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[]` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `developerConnectEventConfig` | `object` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string>` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `EVENT_TYPE_UNSPECIFIED \| REPO \| WEBHOOK \| PUBSUB \| MANUAL` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `autodetect` | `boolean` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[]` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `INCLUDE_BUILD_LOGS_UNSPECIFIED \| INCLUDE_BUILD_LOGS_WITH_STATUS` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   repoSlug?: string,
>   bitbucketServerConfigResource?: string,
>   projectKey?: string,
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   }
> }
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   repository?: string
> }
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string,
>   repository?: string,
>   bitbucketServerConfig?: string,
>   githubEnterpriseConfig?: string,
>   ref?: string,
>   repoType?: UNKNOWN | CLOUD_SOURCE_REPOSITORIES | GITHUB | BITBUCKET_SERVER | GITLAB | BITBUCKET_CLOUD
> }
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string,
>   state?: STATE_UNSPECIFIED | OK | SECRET_DELETED
> }
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string,
>   dir?: string,
>   branchName?: string,
>   invertRegex?: boolean,
>   repoName?: string,
>   commitSha?: string,
>   substitutions?: Record<string, string>,
>   tagName?: string
> }
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string,
>   revision?: string,
>   repository?: string,
>   bitbucketServerConfig?: string,
>   repoType?: UNKNOWN | CLOUD_SOURCE_REPOSITORIES | GITHUB | BITBUCKET_SERVER | GITLAB | BITBUCKET_CLOUD,
>   githubEnterpriseConfig?: string,
>   uri?: string
> }
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   gitRepositoryLink?: string
> }
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean
> }
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: STATE_UNSPECIFIED | OK | SUBSCRIPTION_DELETED | TOPIC_DELETED | SUBSCRIPTION_MISCONFIGURED,
>   topic?: string,
>   serviceAccountEmail?: string
> }
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   source?: {
>     repoSource?: {
>       projectId?: string,
>       dir?: string,
>       branchName?: string,
>       invertRegex?: boolean,
>       repoName?: string,
>       commitSha?: string,
>       substitutions?: Record<string, string>,
>       tagName?: string
>     },
>     connectedRepository?: {
>       repository?: string,
>       revision?: string,
>       dir?: string
>     },
>     storageSource?: {
>       object?: string,
>       sourceFetcher?: SOURCE_FETCHER_UNSPECIFIED | GSUTIL | GCS_FETCHER,
>       generation?: string | number,
>       bucket?: string
>     },
>     gitSource?: {
>       dir?: string,
>       url?: string,
>       revision?: string
>     },
>     developerConnectConfig?: {
>       dir?: string,
>       gitRepositoryLink?: string,
>       revision?: string
>     },
>     storageSourceManifest?: {
>       object?: string,
>       bucket?: string,
>       generation?: string | number
>     }
>   },
>   options?: {
>     diskSizeGb?: string | number,
>     defaultLogsBucketBehavior?: DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED | REGIONAL_USER_OWNED_BUCKET | LEGACY_BUCKET,
>     rankedMachineSeries?: (MACHINE_SERIES_UNSPECIFIED | MACHINE_SERIES_E | MACHINE_SERIES_N | MACHINE_SERIES_C)[],
>     pubsubTopic?: string,
>     workerPool?: string,
>     workerRelease?: string,
>     logging?: LOGGING_UNSPECIFIED | LEGACY | GCS_ONLY | STACKDRIVER_ONLY | CLOUD_LOGGING_ONLY | NONE,
>     pool?: {
>       name?: string
>     },
>     sourceProvenanceHash?: (NONE | SHA256 | MD5 | GO_MODULE_H1 | SHA512 | DIRSUM_SHA256)[],
>     enableStructuredLogging?: boolean,
>     logStreamingOption?: STREAM_DEFAULT | STREAM_ON | STREAM_OFF,
>     volumes?: {
>       name?: string,
>       path?: string
>     }[],
>     secretEnv?: string[],
>     automapSubstitutions?: boolean,
>     dynamicSubstitutions?: boolean,
>     machineType?: UNSPECIFIED | N1_HIGHCPU_8 | N1_HIGHCPU_32 | E2_HIGHCPU_8 | E2_HIGHCPU_32 | E2_MEDIUM | E2_STANDARD_2,
>     env?: string[],
>     requestedVerifyOption?: NOT_VERIFIED | VERIFIED | BEST_EFFORT,
>     substitutionOption?: MUST_MATCH | ALLOW_LOOSE
>   },
>   secrets?: {
>     secretEnv?: Record<string, string>,
>     kmsKeyName?: string
>   }[],
>   artifacts?: {
>     images?: string[],
>     npmPackages?: {
>       packagePath?: string,
>       repository?: string
>     }[],
>     objects?: {
>       location?: string,
>       paths?: string[]
>     },
>     pythonPackages?: {
>       repository?: string,
>       paths?: string[]
>     }[],
>     oci?: {
>       registryPath?: string,
>       file?: string,
>       tags?: string[]
>     }[],
>     goModules?: {
>       sourcePath?: string,
>       modulePath?: string,
>       repositoryName?: string,
>       repositoryLocation?: string,
>       repositoryProjectId?: string,
>       moduleVersion?: string
>     }[],
>     genericArtifacts?: {
>       folder?: string,
>       registryPath?: string
>     }[],
>     mavenArtifacts?: {
>       groupId?: string,
>       version?: string,
>       deployFolder?: string,
>       path?: string,
>       artifactId?: string,
>       repository?: string
>     }[]
>   },
>   steps?: {
>     entrypoint?: string,
>     name?: string,
>     env?: string[],
>     results?: {
>       name?: string,
>       attestationType?: string,
>       attestationContent?: string
>     }[],
>     waitFor?: string[],
>     secretEnv?: string[],
>     allowFailure?: boolean,
>     automapSubstitutions?: boolean,
>     args?: string[],
>     volumes?: {
>       name?: string,
>       path?: string
>     }[],
>     timeout?: string,
>     script?: string,
>     id?: string,
>     allowExitCodes?: number[],
>     dir?: string
>   }[],
>   substitutions?: Record<string, string>,
>   serviceAccount?: string,
>   images?: string[],
>   tags?: string[],
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string
>     }
>   },
>   timeout?: string,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string,
>       env?: string
>     }[],
>     inline?: {
>       kmsKeyName?: string,
>       envMap?: Record<string, string>
>     }[]
>   },
>   queueTtl?: string,
>   logsBucket?: string,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean,
>       destPath?: string,
>       depth?: string | number,
>       revision?: string,
>       recurseSubmodules?: boolean,
>       repository?: {
>         url?: string,
>         developerConnect?: string
>       }
>     },
>     genericArtifact?: {
>       resource?: string,
>       destPath?: string
>     },
>     empty?: boolean
>   }[]
> }
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string,
>     invertRegex?: boolean,
>     branch?: string
>   },
>   pullRequest?: {
>     commentControl?: COMMENTS_DISABLED | COMMENTS_ENABLED | COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY,
>     branch?: string,
>     invertRegex?: boolean
>   },
>   owner?: string,
>   enterpriseConfigResourceName?: string,
>   installationId?: string | number,
>   name?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bitbucketServerTriggerConfig` | `object \| null` | No | BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. |
| `repositoryEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| `sourceToBuild` | `object \| null` | No | GitRepoSource describes a repo and ref of a code repository. |
| `resourceName` | `string \| null` | No | The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where \{trigger} is a unique identifier generated by the service. |
| `filter` | `string \| null` | No | A Common Expression Language string. |
| `filename` | `string \| null` | No | Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). |
| `ignoredFiles` | `string[] \| null` | No | ignored\_files and included\_files are file glob matches using [https://golang.org/pkg/path/filepath/#Match](https://golang.org/pkg/path/filepath/#Match) extended with support for "\*\*". If ignored\_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored\_files is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignored\_files globs, then we do not trigger a build. |
| `serviceAccount` | `string \| null` | No | The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account (\[PROJECT\_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` |
| `tags` | `string[] \| null` | No | Tags for annotation of a `BuildTrigger` |
| `webhookConfig` | `object \| null` | No | WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. |
| `disabled` | `boolean \| null` | No | If true, the trigger will never automatically execute a build. |
| `name` | `string \| null` | No | User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. |
| `triggerTemplate` | `object \| null` | No | Location of the source in a Google Cloud Source Repository. |
| `gitFileSource` | `object \| null` | No | GitFileSource describes a file within a (possibly remote) code repository. |
| `createTime` | `string \| null` | No | Output only. Time when the trigger was created. |
| `developerConnectEventConfig` | `object \| null` | No | The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received. |
| `description` | `string \| null` | No | Human-readable description of this trigger. |
| `substitutions` | `Record<string, string> \| null` | No | Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. |
| `approvalConfig` | `object \| null` | No | ApprovalConfig describes configuration for manual approval of a build. |
| `eventType` | `string \| null` | No | EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. |
| `id` | `string \| null` | No | Output only. Unique identifier of the trigger. |
| `autodetect` | `boolean \| null` | No | Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. |
| `includedFiles` | `string[] \| null` | No | If any of the files altered in the commit pass the ignored\_files filter and included\_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored\_files filter and included\_files is not empty, then we make sure that at least one of those files matches a included\_files glob. If not, then we do not trigger a build. |
| `pubsubConfig` | `object \| null` | No | PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. |
| `includeBuildLogs` | `string \| null` | No | If set to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE\_BUILD\_LOGS\_WITH\_STATUS for non GitHub triggers results in INVALID\_ARGUMENT error. |
| `build` | `object \| null` | No | A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT\_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD\_ID: the autogenerated ID of the build. - \$REPO\_NAME: the source repository name specified by RepoSource. |
| `github` | `object \| null` | No | GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. |

> [accordion] bitbucketServerTriggerConfig full type
>
> ```ts theme={null}
> {
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repoSlug?: string | null,
>   bitbucketServerConfigResource?: string | null,
>   bitbucketServerConfig?: {
>     peeredNetworkIpRange?: string | null,
>     peeredNetwork?: string | null,
>     connectedRepositories?: {
>       repoSlug?: string | null,
>       webhookId?: number | null,
>       projectKey?: string | null
>     }[] | null,
>     username?: string | null,
>     secrets?: {
>       webhookSecretVersionName?: string | null,
>       readAccessTokenVersionName?: string | null,
>       adminAccessTokenVersionName?: string | null
>     } | null,
>     createTime?: string | null,
>     webhookKey?: string | null,
>     sslCa?: string | null,
>     name?: string | null,
>     apiKey?: string | null,
>     hostUri?: string | null
>   } | null,
>   projectKey?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null
> } | null
> ```

> [accordion] repositoryEventConfig full type
>
> ```ts theme={null}
> {
>   repositoryType?: string | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   repository?: string | null
> } | null
> ```

> [accordion] sourceToBuild full type
>
> ```ts theme={null}
> {
>   uri?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   githubEnterpriseConfig?: string | null,
>   ref?: string | null,
>   repoType?: string | null
> } | null
> ```

> [accordion] webhookConfig full type
>
> ```ts theme={null}
> {
>   secret?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] triggerTemplate full type
>
> ```ts theme={null}
> {
>   projectId?: string | null,
>   dir?: string | null,
>   branchName?: string | null,
>   invertRegex?: boolean | null,
>   repoName?: string | null,
>   commitSha?: string | null,
>   substitutions?: Record<string, string> | null,
>   tagName?: string | null
> } | null
> ```

> [accordion] gitFileSource full type
>
> ```ts theme={null}
> {
>   path?: string | null,
>   revision?: string | null,
>   repository?: string | null,
>   bitbucketServerConfig?: string | null,
>   repoType?: string | null,
>   githubEnterpriseConfig?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] developerConnectEventConfig full type
>
> ```ts theme={null}
> {
>   gitRepositoryLinkType?: string | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   gitRepositoryLink?: string | null
> } | null
> ```

> [accordion] approvalConfig full type
>
> ```ts theme={null}
> {
>   approvalRequired?: boolean | null
> } | null
> ```

> [accordion] pubsubConfig full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   topic?: string | null,
>   serviceAccountEmail?: string | null,
>   subscription?: string | null
> } | null
> ```

> [accordion] build full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   finishTime?: string | null,
>   source?: {
>     repoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     connectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     storageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     gitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     developerConnectConfig?: {
>       dir?: string | null,
>       gitRepositoryLink?: string | null,
>       revision?: string | null
>     } | null,
>     storageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   logUrl?: string | null,
>   options?: {
>     resolvedWorkerRelease?: string | null,
>     diskSizeGb?: string | number | null,
>     defaultLogsBucketBehavior?: string | null,
>     rankedMachineSeries?: string[] | null,
>     pubsubTopic?: string | null,
>     workerPool?: string | null,
>     workerRelease?: string | null,
>     logging?: string | null,
>     pool?: {
>       name?: string | null,
>       resolvedWorkerRelease?: string | null,
>       workerRelease?: string | null
>     } | null,
>     sourceProvenanceHash?: string[] | null,
>     enableStructuredLogging?: boolean | null,
>     logStreamingOption?: string | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     secretEnv?: string[] | null,
>     automapSubstitutions?: boolean | null,
>     dynamicSubstitutions?: boolean | null,
>     machineType?: string | null,
>     env?: string[] | null,
>     requestedVerifyOption?: string | null,
>     substitutionOption?: string | null
>   } | null,
>   statusDetail?: string | null,
>   secrets?: {
>     secretEnv?: Record<string, string> | null,
>     kmsKeyName?: string | null
>   }[] | null,
>   status?: string | null,
>   projectId?: string | null,
>   artifacts?: {
>     images?: string[] | null,
>     npmPackages?: {
>       packagePath?: string | null,
>       repository?: string | null
>     }[] | null,
>     objects?: {
>       timing?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       location?: string | null,
>       paths?: string[] | null
>     } | null,
>     pythonPackages?: {
>       repository?: string | null,
>       paths?: string[] | null
>     }[] | null,
>     oci?: {
>       registryPath?: string | null,
>       file?: string | null,
>       tags?: string[] | null
>     }[] | null,
>     goModules?: {
>       sourcePath?: string | null,
>       modulePath?: string | null,
>       repositoryName?: string | null,
>       repositoryLocation?: string | null,
>       repositoryProjectId?: string | null,
>       moduleVersion?: string | null
>     }[] | null,
>     genericArtifacts?: {
>       folder?: string | null,
>       registryPath?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       groupId?: string | null,
>       version?: string | null,
>       deployFolder?: string | null,
>       path?: string | null,
>       artifactId?: string | null,
>       repository?: string | null
>     }[] | null
>   } | null,
>   warnings?: {
>     priority?: string | null,
>     text?: string | null
>   }[] | null,
>   steps?: {
>     exitCode?: number | null,
>     entrypoint?: string | null,
>     name?: string | null,
>     env?: string[] | null,
>     results?: {
>       name?: string | null,
>       attestationType?: string | null,
>       attestationContent?: string | null
>     }[] | null,
>     waitFor?: string[] | null,
>     secretEnv?: string[] | null,
>     allowFailure?: boolean | null,
>     automapSubstitutions?: boolean | null,
>     args?: string[] | null,
>     volumes?: {
>       name?: string | null,
>       path?: string | null
>     }[] | null,
>     timing?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     status?: string | null,
>     pullTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     timeout?: string | null,
>     script?: string | null,
>     id?: string | null,
>     allowExitCodes?: number[] | null,
>     dir?: string | null
>   }[] | null,
>   approval?: {
>     config?: {
>       approvalRequired?: boolean | null
>     } | null,
>     result?: {
>       decision?: string | null,
>       approverAccount?: string | null,
>       approvalTime?: string | null,
>       url?: string | null,
>       comment?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   startTime?: string | null,
>   buildTriggerId?: string | null,
>   substitutions?: Record<string, string> | null,
>   results?: {
>     goModules?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       uri?: string | null
>     }[] | null,
>     buildStepImages?: string[] | null,
>     genericArtifacts?: {
>       artifactFingerprint?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       fileHashes?: Record<string, {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       }> | null,
>       artifactRegistryPackage?: string | null,
>       uri?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     npmPackages?: {
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null
>     }[] | null,
>     buildStepOutputs?: string[] | null,
>     artifactTiming?: {
>       startTime?: string | null,
>       endTime?: string | null
>     } | null,
>     artifactManifest?: string | null,
>     images?: {
>       ociMediaType?: string | null,
>       name?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null,
>       digest?: string | null
>     }[] | null,
>     numArtifacts?: string | number | null,
>     buildStepResults?: Record<string, {
>       results?: Record<string, string> | null
>     }> | null,
>     resourceUsage?: {
>       peakCpuUtilization?: number | null,
>       averageMemoryUtilization?: number | null,
>       totalCpuDuration?: string | null,
>       peakMemoryUtilization?: number | null,
>       averageCpuUtilization?: number | null
>     } | null,
>     pythonPackages?: {
>       uri?: string | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       artifactRegistryPackage?: string | null
>     }[] | null,
>     mavenArtifacts?: {
>       uri?: string | null,
>       artifactRegistryPackage?: string | null,
>       pushTiming?: {
>         startTime?: string | null,
>         endTime?: string | null
>       } | null,
>       fileHashes?: {
>         fileHash?: {
>           type?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     }[] | null
>   } | null,
>   id?: string | null,
>   serviceAccount?: string | null,
>   images?: string[] | null,
>   timing?: Record<string, {
>     startTime?: string | null,
>     endTime?: string | null
>   }> | null,
>   tags?: string[] | null,
>   gitConfig?: {
>     http?: {
>       proxySecretVersionName?: string | null
>     } | null
>   } | null,
>   timeout?: string | null,
>   sourceProvenance?: {
>     resolvedStorageSource?: {
>       object?: string | null,
>       sourceFetcher?: string | null,
>       generation?: string | number | null,
>       bucket?: string | null
>     } | null,
>     fileHashes?: Record<string, {
>       fileHash?: {
>         type?: string | null,
>         value?: string | null
>       }[] | null
>     }> | null,
>     resolvedConnectedRepository?: {
>       repository?: string | null,
>       revision?: string | null,
>       dir?: string | null
>     } | null,
>     resolvedGitSource?: {
>       dir?: string | null,
>       url?: string | null,
>       revision?: string | null
>     } | null,
>     resolvedRepoSource?: {
>       projectId?: string | null,
>       dir?: string | null,
>       branchName?: string | null,
>       invertRegex?: boolean | null,
>       repoName?: string | null,
>       commitSha?: string | null,
>       substitutions?: Record<string, string> | null,
>       tagName?: string | null
>     } | null,
>     resolvedStorageSourceManifest?: {
>       object?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   availableSecrets?: {
>     secretManager?: {
>       versionName?: string | null,
>       env?: string | null
>     }[] | null,
>     inline?: {
>       kmsKeyName?: string | null,
>       envMap?: Record<string, string> | null
>     }[] | null
>   } | null,
>   queueTtl?: string | null,
>   failureInfo?: {
>     detail?: string | null,
>     type?: string | null
>   } | null,
>   logsBucket?: string | null,
>   dependencies?: {
>     gitSource?: {
>       fetchTags?: boolean | null,
>       destPath?: string | null,
>       depth?: string | number | null,
>       revision?: string | null,
>       recurseSubmodules?: boolean | null,
>       repository?: {
>         url?: string | null,
>         developerConnect?: string | null
>       } | null
>     } | null,
>     genericArtifact?: {
>       resource?: string | null,
>       destPath?: string | null
>     } | null,
>     empty?: boolean | null
>   }[] | null,
>   name?: string | null
> } | null
> ```

> [accordion] github full type
>
> ```ts theme={null}
> {
>   push?: {
>     tag?: string | null,
>     invertRegex?: boolean | null,
>     branch?: string | null
>   } | null,
>   pullRequest?: {
>     commentControl?: string | null,
>     branch?: string | null,
>     invertRegex?: boolean | null
>   } | null,
>   owner?: string | null,
>   enterpriseConfigResourceName?: string | null,
>   installationId?: string | number | null,
>   name?: string | null
> } | null
> ```

***

### triggers.run

`build.triggers.run`

Runs a `BuildTrigger` at a particular source revision. To run a regional or global trigger, use the POST request that includes the location endpoint in the path (ex. v1/projects/\{projectId}/locations/\{region}/triggers/\{triggerId}:run)

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.build.triggers.run({
	projectId: 'demo-project',
	triggerId: 'deploy-main',
	branchName: 'main',
	repoName: 'api',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Required. ID of the project. |
| `name` | `string` | No | The name of the `Trigger` to run. Format: `projects/{project}/locations/{location}/triggers/{trigger}` |
| `triggerId` | `string` | Yes | Required. ID of the trigger. |
| `body_projectId` | `string` | No | Optional. ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. |
| `dir` | `string` | No | Optional. Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. |
| `branchName` | `string` | No | Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at [https://github.com/google/re2/wiki/Syntax](https://github.com/google/re2/wiki/Syntax) |
| `invertRegex` | `boolean` | No | Optional. Only trigger a build if the revision regex does NOT match the revision regex. |
| `repoName` | `string` | No | Required. Name of the Cloud Source Repository. |
| `commitSha` | `string` | No | Explicit commit SHA to build. |
| `substitutions` | `Record<string, string>` | No | Optional. Substitutions to use in a triggered build. Should only be used with RunBuildTrigger |
| `tagName` | `string` | No | Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at [https://github.com/google/re2/wiki/Syntax](https://github.com/google/re2/wiki/Syntax) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

## Compute

### acceleratorTypes.aggregatedList

`compute.acceleratorTypes.aggregatedList`

Retrieves an aggregated list of accelerator types. To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.acceleratorTypes.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `maxResults` | `number` | No | 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`) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#acceleratorTypeAggregatedList for aggregated lists of accelerator types. |
| `items` | `object \| null` | No | A list of AcceleratorTypesScopedList resources. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   warning?: {
>     message?: string | null,
>     code?: string | null,
>     data?: {
>       value?: string | null,
>       key?: string | null
>     }[] | null
>   } | null,
>   acceleratorTypes?: {
>     description?: string | null,
>     maximumCardsPerInstance?: number | null,
>     selfLink?: string | null,
>     name?: string | null,
>     zone?: string | null,
>     id?: string | number | null,
>     creationTimestamp?: string | null,
>     deprecated?: {
>       replacement?: string | null,
>       state?: string | null,
>       deleted?: string | null,
>       deprecated?: string | null,
>       obsolete?: string | null
>     } | null,
>     kind?: string | null,
>     resourceMetadata?: {
>       resourceType?: string | null,
>       apiVersion?: string | null
>     } | null
>   }[] | null
> }> | null
> ```

***

### acceleratorTypes.get

`compute.acceleratorTypes.get`

Returns the specified accelerator type

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.acceleratorTypes.get({ project: 'demo-project', acceleratorType: 'nvidia-l4', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `acceleratorType` | `string` | Yes | Name of the accelerator type to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | \[Output Only] An optional textual description of the resource. |
| `maximumCardsPerInstance` | `number \| null` | No | \[Output Only] Maximum number of accelerator cards allowed per instance. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined, fully qualified URL for this resource. |
| `name` | `string \| null` | No | \[Output Only] Name of the resource. |
| `zone` | `string \| null` | No | \[Output Only] The name of the zone where the accelerator type resides, such as us-central1-a. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `creationTimestamp` | `string \| null` | No | \[Output Only] Creation timestamp inRFC3339 text format. |
| `deprecated` | `object \| null` | No | Deprecation status for a public resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The type of the resource. Alwayscompute#acceleratorType for accelerator types. |
| `resourceMetadata` | `object \| null` | No | Standardized resource metadata common to all compute resources. |

> [accordion] deprecated full type
>
> ```ts theme={null}
> {
>   replacement?: string | null,
>   state?: string | null,
>   deleted?: string | null,
>   deprecated?: string | null,
>   obsolete?: string | null
> } | null
> ```

> [accordion] resourceMetadata full type
>
> ```ts theme={null}
> {
>   resourceType?: string | null,
>   apiVersion?: string | null
> } | null
> ```

***

### acceleratorTypes.list

`compute.acceleratorTypes.list`

Retrieves a list of accelerator types that are available to the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.acceleratorTypes.list({ project: 'demo-project', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `maxResults` | `number` | No | 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`) |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `items` | `object[] \| null` | No | A list of AcceleratorType resources. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#acceleratorTypeList for lists of accelerator types. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   maximumCardsPerInstance?: number | null,
>   selfLink?: string | null,
>   name?: string | null,
>   zone?: string | null,
>   id?: string | number | null,
>   creationTimestamp?: string | null,
>   deprecated?: {
>     replacement?: string | null,
>     state?: string | null,
>     deleted?: string | null,
>     deprecated?: string | null,
>     obsolete?: string | null
>   } | null,
>   kind?: string | null,
>   resourceMetadata?: {
>     resourceType?: string | null,
>     apiVersion?: string | null
>   } | null
> }[] | null
> ```

***

### addresses.aggregatedList

`compute.addresses.aggregatedList`

Retrieves an aggregated list of addresses. To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.addresses.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `maxResults` | `number` | No | 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`) |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object \| null` | No | A list of AddressesScopedList resources. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#addressAggregatedList for aggregated lists of addresses. |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   warning?: {
>     data?: {
>       value?: string | null,
>       key?: string | null
>     }[] | null,
>     code?: string | null,
>     message?: string | null
>   } | null,
>   addresses?: {
>     ipCollection?: string | null,
>     purpose?: string | null,
>     ipv6EndpointType?: string | null,
>     labels?: Record<string, string> | null,
>     selfLink?: string | null,
>     prefixLength?: number | null,
>     creationTimestamp?: string | null,
>     network?: string | null,
>     address?: string | null,
>     subnetwork?: string | null,
>     region?: string | null,
>     kind?: string | null,
>     ipVersion?: string | null,
>     name?: string | null,
>     id?: string | number | null,
>     addressType?: string | null,
>     description?: string | null,
>     labelFingerprint?: string | null,
>     status?: string | null,
>     networkTier?: string | null,
>     users?: string[] | null
>   }[] | null
> }> | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   code?: string | null,
>   message?: string | null
> } | null
> ```

***

### addresses.delete

`compute.addresses.delete`

Deletes the specified address resource

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.addresses.delete({ address: 'web-ip', project: 'demo-project', region: 'us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `address` | `string` | Yes | Name of the address resource to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### addresses.get

`compute.addresses.get`

Returns the specified address resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.addresses.get({ project: 'demo-project', region: 'us-central1', address: 'web-ip' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `address` | `string` | Yes | Name of the address resource to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ipCollection` | `string \| null` | No | Reference to the source of IP addresses. It supports the following cases: - Case 1: PublicDelegatedPrefix (PDP) for BYOIP external addresses. If an IPv4 PDP is used, the PDP must support enhanced IPv4 allocations. If an IPv6 PDP is used, the PDP must be in EXTERNAL\_IPV6\_FORWARDING\_RULE\_CREATION mode. - Case 2: Internal Range for global internal addresses. |
| `purpose` | `string \| null` | No | The purpose of this resource, which can be one of the following values: - GCE\_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS\_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC\_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT\_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. |
| `ipv6EndpointType` | `string \| null` | No | The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation. |
| `labels` | `Record<string, string> \| null` | No | Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. Label values may be empty. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `prefixLength` | `number \| null` | No | The prefix length if the resource represents an IP range. |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `network` | `string \| null` | No | The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with theVPC\_PEERING purpose. |
| `address` | `string \| null` | No | The static IP address represented by this resource. |
| `subnetwork` | `string \| null` | No | The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with aGCE\_ENDPOINT or DNS\_RESOLVER purpose. |
| `region` | `string \| null` | No | Output only. \[Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.* |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#address for addresses. |
| `ipVersion` | `string \| null` | No | The IP version that will be used by this address. Valid options areIPV4 or IPV6. |
| `name` | `string \| null` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `addressType` | `string \| null` | No | The type of address to reserve, either INTERNAL orEXTERNAL. If unspecified, defaults to EXTERNAL. |
| `description` | `string \| null` | No | An optional description of this resource. Provide this field when you create the resource. |
| `labelFingerprint` | `string \| null` | No | A fingerprint for the labels being applied to this Address, 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an Address. (base64) |
| `status` | `string \| null` | No | Output only. \[Output Only] The status of the address, which can be one ofRESERVING, 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. |
| `networkTier` | `string \| null` | No | This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM orSTANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM. |
| `users` | `string[] \| null` | No | \[Output Only] The URLs of the resources that are using this address. |

***

### addresses.insert

`compute.addresses.insert`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.addresses.insert({ project: 'demo-project', region: 'us-central1', name: 'web-ip' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `ipCollection` | `string` | No | Reference to the source of IP addresses. It supports the following cases: - Case 1: PublicDelegatedPrefix (PDP) for BYOIP external addresses. If an IPv4 PDP is used, the PDP must support enhanced IPv4 allocations. If an IPv6 PDP is used, the PDP must be in EXTERNAL\_IPV6\_FORWARDING\_RULE\_CREATION mode. - Case 2: Internal Range for global internal addresses. |
| `purpose` | `DNS_RESOLVER \| GCE_ENDPOINT \| IPSEC_INTERCONNECT \| NAT_AUTO \| PRIVATE_SERVICE_CONNECT \| SERVERLESS \| SHARED_LOADBALANCER_VIP \| VPC_PEERING` | No | The purpose of this resource, which can be one of the following values: - GCE\_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS\_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC\_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT\_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. |
| `ipv6EndpointType` | `NETLB \| VM` | No | The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation. |
| `labels` | `Record<string, string>` | No | Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. Label values may be empty. |
| `selfLink` | `string` | No | \[Output Only] Server-defined URL for the resource. |
| `prefixLength` | `number` | No | The prefix length if the resource represents an IP range. |
| `network` | `string` | No | The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with theVPC\_PEERING purpose. |
| `address` | `string` | No | The static IP address represented by this resource. |
| `subnetwork` | `string` | No | The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with aGCE\_ENDPOINT or DNS\_RESOLVER purpose. |
| `ipVersion` | `IPV4 \| IPV6 \| UNSPECIFIED_VERSION` | No | The IP version that will be used by this address. Valid options areIPV4 or IPV6. |
| `name` | `string` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `addressType` | `EXTERNAL \| INTERNAL \| UNSPECIFIED_TYPE` | No | The type of address to reserve, either INTERNAL orEXTERNAL. If unspecified, defaults to EXTERNAL. |
| `description` | `string` | No | An optional description of this resource. Provide this field when you create the resource. |
| `labelFingerprint` | `string` | No | A fingerprint for the labels being applied to this Address, 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an Address. (base64) |
| `networkTier` | `FIXED_STANDARD \| PREMIUM \| STANDARD \| STANDARD_OVERRIDES_FIXED_STANDARD` | No | This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM orSTANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM. |
| `users` | `string[]` | No | \[Output Only] The URLs of the resources that are using this address. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### addresses.list

`compute.addresses.list`

Retrieves a list of addresses contained within the specified region (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.addresses.list({ project: 'demo-project', region: 'us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `maxResults` | `number` | No | 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`) |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | A list of Address resources. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#addressList for lists of addresses. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   ipCollection?: string | null,
>   purpose?: string | null,
>   ipv6EndpointType?: string | null,
>   labels?: Record<string, string> | null,
>   selfLink?: string | null,
>   prefixLength?: number | null,
>   creationTimestamp?: string | null,
>   network?: string | null,
>   address?: string | null,
>   subnetwork?: string | null,
>   region?: string | null,
>   kind?: string | null,
>   ipVersion?: string | null,
>   name?: string | null,
>   id?: string | number | null,
>   addressType?: string | null,
>   description?: string | null,
>   labelFingerprint?: string | null,
>   status?: string | null,
>   networkTier?: string | null,
>   users?: string[] | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

***

### addresses.move

`compute.addresses.move`

Moves the specified address resource

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.addresses.move({
	region: 'us-central1',
	project: 'demo-project',
	address: 'web-ip',
	destinationAddress: 'projects/other-project/regions/us-central1/addresses/web-ip',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Source project ID which the Address is moved from. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `address` | `string` | Yes | Name of the address resource to move. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `destinationAddress` | `string` | No | The URL of the destination address to move to. This can be a full or partial URL. For example, the following are all valid URLs to a address: - [https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address](https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address) - projects/project/regions/region/addresses/address Note that destination project must be different from the source project. So/regions/region/addresses/address is not valid partial url. |
| `description` | `string` | No | An optional destination address description if intended to be different from the source. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### addresses.setLabels

`compute.addresses.setLabels`

Sets the labels on an Address. To learn more about labels, read theLabeling Resources documentation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.addresses.setLabels({
	resource: 'web-ip',
	region: 'us-central1',
	project: 'demo-project',
	labels: { env: 'prod' },
	labelFingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `region` | `string` | Yes | The region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `labelFingerprint` | `string` | No | 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. (base64) |
| `labels` | `Record<string, string>` | No | The labels to set for this resource. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### addresses.testIamPermissions

`compute.addresses.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.addresses.testIamPermissions({
	project: 'demo-project',
	region: 'us-central1',
	resource: 'web-ip',
	permissions: ['compute.addresses.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | The name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### disks.addResourcePolicies

`compute.disks.addResourcePolicies`

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.addResourcePolicies({
	project: 'demo-project',
	zone: 'us-central1-a',
	disk: 'web-1',
	resourcePolicies: ['projects/demo-project/regions/us-central1/resourcePolicies/daily-snapshots'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `disk` | `string` | Yes | The disk name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `resourcePolicies` | `string[]` | No | Full or relative path to the resource policy to be added to this disk. You can only specify one resource policy. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.aggregatedList

`compute.disks.aggregatedList`

Retrieves an aggregated list of persistent disks. To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `maxResults` | `number` | No | 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`) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `items` | `object \| null` | No | A list of DisksScopedList resources. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#diskAggregatedList for aggregated lists of persistent disks. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   warning?: {
>     code?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     message?: string | null
>   } | null,
>   disks?: {
>     guestOsFeatures?: {
>       type?: string | null
>     }[] | null,
>     sourceConsistencyGroupPolicy?: string | null,
>     sourceInstantSnapshotId?: string | null,
>     sourceDisk?: string | null,
>     sourceImageEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     accessMode?: string | null,
>     sizeGb?: string | number | null,
>     resourcePolicies?: string[] | null,
>     sourceInstantSnapshot?: string | null,
>     diskEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     sourceSnapshotEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     description?: string | null,
>     architecture?: string | null,
>     region?: string | null,
>     licenses?: string[] | null,
>     satisfiesPzs?: boolean | null,
>     labels?: Record<string, string> | null,
>     kind?: string | null,
>     lastDetachTimestamp?: string | null,
>     selfLink?: string | null,
>     sourceImage?: string | null,
>     type?: string | null,
>     labelFingerprint?: string | null,
>     provisionedIops?: string | number | null,
>     sourceDiskId?: string | null,
>     locationHint?: string | null,
>     params?: {
>       resourceManagerTags?: Record<string, string> | null
>     } | null,
>     name?: string | null,
>     lastAttachTimestamp?: string | null,
>     physicalBlockSizeBytes?: string | number | null,
>     sourceImageId?: string | null,
>     id?: string | number | null,
>     satisfiesPzi?: boolean | null,
>     sourceStorageObject?: string | null,
>     options?: string | null,
>     sourceConsistencyGroupPolicyId?: string | null,
>     sourceSnapshot?: string | null,
>     replicaZones?: string[] | null,
>     users?: string[] | null,
>     resourceStatus?: {
>       asyncSecondaryDisks?: Record<string, {
>         state?: string | null
>       }> | null,
>       asyncPrimaryDisk?: {
>         state?: string | null
>       } | null
>     } | null,
>     sourceSnapshotId?: string | null,
>     storagePool?: string | null,
>     status?: string | null,
>     asyncPrimaryDisk?: {
>       consistencyGroupPolicyId?: string | null,
>       consistencyGroupPolicy?: string | null,
>       disk?: string | null,
>       diskId?: string | null
>     } | null,
>     asyncSecondaryDisks?: Record<string, {
>       asyncReplicationDisk?: {
>         consistencyGroupPolicyId?: string | null,
>         consistencyGroupPolicy?: string | null,
>         disk?: string | null,
>         diskId?: string | null
>       } | null
>     }> | null,
>     provisionedThroughput?: string | number | null,
>     licenseCodes?: (string | number)[] | null,
>     zone?: string | null,
>     creationTimestamp?: string | null,
>     enableConfidentialCompute?: boolean | null
>   }[] | null
> }> | null
> ```

***

### disks.bulkInsert

`compute.disks.bulkInsert`

Bulk create a set of disks

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.bulkInsert({ project: 'demo-project', zone: 'us-central1-a', sourceConsistencyGroupPolicy: 'projects/demo-project/regions/us-central1/resourcePolicies/app-group' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `sourceConsistencyGroupPolicy` | `string` | No | The URL of the DiskConsistencyGroupPolicy for the group of disks to clone. This may be a full or partial URL, such as: - [https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy](https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy) - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy |
| `snapshotGroupParameters` | `object` | No | — |
| `instantSnapshotGroupParameters` | `object` | No | — |

> [accordion] snapshotGroupParameters full type
>
> ```ts theme={null}
> {
>   sourceSnapshotGroup?: string,
>   replicaZones?: string[],
>   type?: string
> }
> ```

> [accordion] instantSnapshotGroupParameters full type
>
> ```ts theme={null}
> {
>   sourceInstantSnapshotGroup?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.bulkSetLabels

`compute.disks.bulkSetLabels`

Sets the labels on many disks at once. To learn more about labels, read theLabeling Resources documentation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.bulkSetLabels({
	zone: 'us-central1-a',
	project: 'demo-project',
	resource: 'web-1',
	requests: [{
		labels: { env: 'prod' },
		labelFingerprint: '42WmSpB8rSM=',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | No | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `requests` | `object[]` | No | — |

> [accordion] requests full type
>
> ```ts theme={null}
> {
>   labels?: Record<string, string>,
>   labelFingerprint?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.createSnapshot

`compute.disks.createSnapshot`

Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.createSnapshot({
	project: 'demo-project',
	zone: 'us-central1-a',
	disk: 'web-1',
	name: 'web-1-snap',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `guestFlush` | `boolean` | No | \[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `disk` | `string` | Yes | Name of the persistent disk to snapshot. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `sourceDisk` | `string` | No | The source disk used to create this snapshot. |
| `sourceDiskEncryptionKey` | `object` | No | — |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a snapshot. (base64) |
| `sourceDiskForRecoveryCheckpoint` | `string` | No | The source disk whose recovery checkpoint will be used to create this snapshot. |
| `locationHint` | `string` | No | An opaque location hint used to place the snapshot close to other resources. This field is for use by internal tools that use the public API. |
| `name` | `string` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `snapshotEncryptionKey` | `object` | No | — |
| `storageLocations` | `string[]` | No | Cloud Storage bucket storage location of the snapshot (regional or multi-regional). |
| `params` | `object` | No | Additional snapshot params. |
| `chainName` | `string` | No | Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for advanced service owners who needs to create separate snapshot chains, for example, for chargeback tracking. When you describe your snapshot resource, this field is visible only if it has a non-empty value. |
| `body_guestFlush` | `boolean` | No | \[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. |
| `sourceInstantSnapshotEncryptionKey` | `object` | No | — |
| `snapshotType` | `ARCHIVE \| STANDARD` | No | Indicates the type of the snapshot. Valid values are ARCHIVE or STANDARD. The default is STANDARD. |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `labels` | `Record<string, string>` | No | Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. |
| `sourceInstantSnapshot` | `string` | No | The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot) - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot |

> [accordion] sourceDiskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] snapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] sourceInstantSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.delete

`compute.disks.delete`

Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.disks.delete({ zone: 'us-central1-a', project: 'demo-project', disk: 'web-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `disk` | `string` | Yes | Name of the persistent disk to delete. Format: `\\S{1,66}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.get

`compute.disks.get`

Returns the specified persistent disk

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.get({ zone: 'us-central1-a', disk: 'web-1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `disk` | `string` | Yes | Name of the persistent disk to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `guestOsFeatures` | `object[] \| null` | No | 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. |
| `sourceConsistencyGroupPolicy` | `string \| null` | No | Output only. \[Output Only] URL of the DiskConsistencyGroupPolicy for a secondary disk that was created using a consistency group. |
| `sourceInstantSnapshotId` | `string \| null` | No | Output only. \[Output Only] The unique ID of the instant snapshot used to create this disk. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact version of the instant snapshot that was used. |
| `sourceDisk` | `string \| null` | No | The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk](https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk) - [https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk](https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk) - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk |
| `sourceImageEncryptionKey` | `object \| null` | No | — |
| `accessMode` | `string \| null` | No | The access mode of the disk. - READ\_WRITE\_SINGLE: The default AccessMode, means the disk can be attached to single instance in RW mode. - READ\_WRITE\_MANY: The AccessMode means the disk can be attached to multiple instances in RW mode. - READ\_ONLY\_MANY: The AccessMode means the disk can be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk types. |
| `sizeGb` | `string \| number \| null` | No | Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using thesourceImage, sourceSnapshot, orsourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value ofsizeGb must not be less than the size of the source. Acceptable values are greater than 0. |
| `resourcePolicies` | `string[] \| null` | No | Resource policies applied to this disk for automatic snapshot creations. |
| `sourceInstantSnapshot` | `string \| null` | No | The source instant snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot) - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot |
| `diskEncryptionKey` | `object \| null` | No | — |
| `sourceSnapshotEncryptionKey` | `object \| null` | No | — |
| `description` | `string \| null` | No | An optional description of this resource. Provide this property when you create the resource. |
| `architecture` | `string \| null` | No | The architecture of the disk. Valid values are ARM64 or X86\_64. |
| `region` | `string \| null` | No | Output only. \[Output Only] 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. |
| `licenses` | `string[] \| null` | No | A list of publicly visible licenses. Reserved for Google's use. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. \[Output Only] Reserved for future use. |
| `labels` | `Record<string, string> \| null` | No | Labels to apply to this disk. These can be later modified by the setLabels method. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#disk for disks. |
| `lastDetachTimestamp` | `string \| null` | No | Output only. \[Output Only] Last detach timestamp inRFC3339 text format. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined fully-qualified URL for this resource. |
| `sourceImage` | `string \| null` | No | The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. |
| `type` | `string \| null` | No | URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example:projects/project/zones/zone/diskTypes/pd-ssd. See Persistent disk types. |
| `labelFingerprint` | `string \| null` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a disk. (base64) |
| `provisionedIops` | `string \| number \| null` | No | Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see theExtreme persistent disk documentation. |
| `sourceDiskId` | `string \| null` | No | Output only. \[Output Only] The unique ID of the disk used to create this disk. This value identifies the exact disk that was used to create this persistent disk. For example, if you created the persistent disk from a disk that was later deleted and recreated under the same name, the source disk ID would identify the exact version of the disk that was used. |
| `locationHint` | `string \| null` | No | An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API. |
| `params` | `object \| null` | No | Additional disk params. |
| `name` | `string \| null` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `lastAttachTimestamp` | `string \| null` | No | Output only. \[Output Only] Last attach timestamp inRFC3339 text format. |
| `physicalBlockSizeBytes` | `string \| number \| null` | No | Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. |
| `sourceImageId` | `string \| null` | No | Output only. \[Output Only] 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. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. Reserved for future use. |
| `sourceStorageObject` | `string \| null` | No | The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs\:// or [https://storage.googleapis.com/](https://storage.googleapis.com/). This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead. |
| `options` | `string \| null` | No | Internal use only. |
| `sourceConsistencyGroupPolicyId` | `string \| null` | No | Output only. \[Output Only] ID of the DiskConsistencyGroupPolicy for a secondary disk that was created using a consistency group. |
| `sourceSnapshot` | `string \| null` | No | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot](https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot) - projects/project/global/snapshots/snapshot - global/snapshots/snapshot |
| `replicaZones` | `string[] \| null` | No | URLs of the zones where the disk should be replicated to. Only applicable for regional resources. |
| `users` | `string[] \| null` | No | Output only. \[Output Only] Links to the users of the disk (attached instances) in form:projects/project/zones/zone/instances/instance |
| `resourceStatus` | `object \| null` | No | — |
| `sourceSnapshotId` | `string \| null` | No | Output only. \[Output Only] 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. |
| `storagePool` | `string \| null` | No | The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool](https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool) - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool |
| `status` | `string \| null` | No | Output only. \[Output Only] The status of disk creation. - CREATING: Disk is provisioning. - RESTORING: Source data is being copied into the disk. - FAILED: Disk creation failed. - READY: Disk is ready for use. - DELETING: Disk is deleting. |
| `asyncPrimaryDisk` | `object \| null` | No | — |
| `asyncSecondaryDisks` | `object \| null` | No | Output only. \[Output Only] A list of disks this disk is asynchronously replicated to. |
| `provisionedThroughput` | `string \| number \| null` | No | Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be greater than or equal to 1. |
| `licenseCodes` | `(string \| number)[] \| null` | No | Integer license codes indicating which licenses are attached to this disk. |
| `zone` | `string \| null` | No | Output only. \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `enableConfidentialCompute` | `boolean \| null` | No | Whether this disk is using confidential compute mode. |

> [accordion] guestOsFeatures full type
>
> ```ts theme={null}
> {
>   type?: string | null
> }[] | null
> ```

> [accordion] sourceImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] diskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] sourceSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null
> } | null
> ```

> [accordion] resourceStatus full type
>
> ```ts theme={null}
> {
>   asyncSecondaryDisks?: Record<string, {
>     state?: string | null
>   }> | null,
>   asyncPrimaryDisk?: {
>     state?: string | null
>   } | null
> } | null
> ```

> [accordion] asyncPrimaryDisk full type
>
> ```ts theme={null}
> {
>   consistencyGroupPolicyId?: string | null,
>   consistencyGroupPolicy?: string | null,
>   disk?: string | null,
>   diskId?: string | null
> } | null
> ```

> [accordion] asyncSecondaryDisks full type
>
> ```ts theme={null}
> Record<string, {
>   asyncReplicationDisk?: {
>     consistencyGroupPolicyId?: string | null,
>     consistencyGroupPolicy?: string | null,
>     disk?: string | null,
>     diskId?: string | null
>   } | null
> }> | null
> ```

***

### disks.getIamPolicy

`compute.disks.getIamPolicy`

Gets the access control policy for a resource. May be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.getIamPolicy({ project: 'demo-project', resource: 'web-1', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `optionsRequestedPolicyVersion` | `number` | No | Requested IAM Policy version. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### disks.insert

`compute.disks.insert`

Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, orsourceDisk) or create an empty 500 GB data disk by omitting all properties

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.insert({
	zone: 'us-central1-a',
	project: 'demo-project',
	name: 'data-1',
	sizeGb: '50',
	type: 'projects/demo-project/zones/us-central1-a/diskTypes/pd-balanced',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `sourceImage` | `string` | No | Source image to restore onto a disk. This field is optional. |
| `guestOsFeatures` | `object[]` | No | 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. |
| `sourceDisk` | `string` | No | The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk](https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk) - [https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk](https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk) - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk |
| `sourceImageEncryptionKey` | `object` | No | — |
| `accessMode` | `READ_ONLY_MANY \| READ_WRITE_MANY \| READ_WRITE_SINGLE` | No | The access mode of the disk. - READ\_WRITE\_SINGLE: The default AccessMode, means the disk can be attached to single instance in RW mode. - READ\_WRITE\_MANY: The AccessMode means the disk can be attached to multiple instances in RW mode. - READ\_ONLY\_MANY: The AccessMode means the disk can be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk types. |
| `sizeGb` | `string \| number` | No | Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using thesourceImage, sourceSnapshot, orsourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value ofsizeGb must not be less than the size of the source. Acceptable values are greater than 0. |
| `resourcePolicies` | `string[]` | No | Resource policies applied to this disk for automatic snapshot creations. |
| `sourceInstantSnapshot` | `string` | No | The source instant snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot) - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot |
| `diskEncryptionKey` | `object` | No | — |
| `sourceSnapshotEncryptionKey` | `object` | No | — |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `architecture` | `ARCHITECTURE_UNSPECIFIED \| ARM64 \| X86_64` | No | The architecture of the disk. Valid values are ARM64 or X86\_64. |
| `licenses` | `string[]` | No | A list of publicly visible licenses. Reserved for Google's use. |
| `labels` | `Record<string, string>` | No | Labels to apply to this disk. These can be later modified by the setLabels method. |
| `body_sourceImage` | `string` | No | The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. |
| `type` | `string` | No | URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example:projects/project/zones/zone/diskTypes/pd-ssd. See Persistent disk types. |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a disk. (base64) |
| `provisionedIops` | `string \| number` | No | Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see theExtreme persistent disk documentation. |
| `locationHint` | `string` | No | An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API. |
| `params` | `object` | No | Additional disk params. |
| `name` | `string` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `physicalBlockSizeBytes` | `string \| number` | No | Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. |
| `sourceStorageObject` | `string` | No | The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs\:// or [https://storage.googleapis.com/](https://storage.googleapis.com/). This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead. |
| `options` | `string` | No | Internal use only. |
| `sourceSnapshot` | `string` | No | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot](https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot) - projects/project/global/snapshots/snapshot - global/snapshots/snapshot |
| `replicaZones` | `string[]` | No | URLs of the zones where the disk should be replicated to. Only applicable for regional resources. |
| `storagePool` | `string` | No | The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool](https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool) - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool |
| `asyncPrimaryDisk` | `object` | No | — |
| `provisionedThroughput` | `string \| number` | No | Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be greater than or equal to 1. |
| `licenseCodes` | `(string \| number)[]` | No | Integer license codes indicating which licenses are attached to this disk. |
| `enableConfidentialCompute` | `boolean` | No | Whether this disk is using confidential compute mode. |

> [accordion] guestOsFeatures full type
>
> ```ts theme={null}
> {
>   type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
> }[]
> ```

> [accordion] sourceImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] diskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] sourceSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] asyncPrimaryDisk full type
>
> ```ts theme={null}
> {
>   disk?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.list

`compute.disks.list`

Retrieves a list of persistent disks contained within the specified zone (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.list({ project: 'demo-project', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `maxResults` | `number` | No | 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`) |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#diskList for lists of disks. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `items` | `object[] \| null` | No | A list of Disk resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   guestOsFeatures?: {
>     type?: string | null
>   }[] | null,
>   sourceConsistencyGroupPolicy?: string | null,
>   sourceInstantSnapshotId?: string | null,
>   sourceDisk?: string | null,
>   sourceImageEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   accessMode?: string | null,
>   sizeGb?: string | number | null,
>   resourcePolicies?: string[] | null,
>   sourceInstantSnapshot?: string | null,
>   diskEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   sourceSnapshotEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   description?: string | null,
>   architecture?: string | null,
>   region?: string | null,
>   licenses?: string[] | null,
>   satisfiesPzs?: boolean | null,
>   labels?: Record<string, string> | null,
>   kind?: string | null,
>   lastDetachTimestamp?: string | null,
>   selfLink?: string | null,
>   sourceImage?: string | null,
>   type?: string | null,
>   labelFingerprint?: string | null,
>   provisionedIops?: string | number | null,
>   sourceDiskId?: string | null,
>   locationHint?: string | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   name?: string | null,
>   lastAttachTimestamp?: string | null,
>   physicalBlockSizeBytes?: string | number | null,
>   sourceImageId?: string | null,
>   id?: string | number | null,
>   satisfiesPzi?: boolean | null,
>   sourceStorageObject?: string | null,
>   options?: string | null,
>   sourceConsistencyGroupPolicyId?: string | null,
>   sourceSnapshot?: string | null,
>   replicaZones?: string[] | null,
>   users?: string[] | null,
>   resourceStatus?: {
>     asyncSecondaryDisks?: Record<string, {
>       state?: string | null
>     }> | null,
>     asyncPrimaryDisk?: {
>       state?: string | null
>     } | null
>   } | null,
>   sourceSnapshotId?: string | null,
>   storagePool?: string | null,
>   status?: string | null,
>   asyncPrimaryDisk?: {
>     consistencyGroupPolicyId?: string | null,
>     consistencyGroupPolicy?: string | null,
>     disk?: string | null,
>     diskId?: string | null
>   } | null,
>   asyncSecondaryDisks?: Record<string, {
>     asyncReplicationDisk?: {
>       consistencyGroupPolicyId?: string | null,
>       consistencyGroupPolicy?: string | null,
>       disk?: string | null,
>       diskId?: string | null
>     } | null
>   }> | null,
>   provisionedThroughput?: string | number | null,
>   licenseCodes?: (string | number)[] | null,
>   zone?: string | null,
>   creationTimestamp?: string | null,
>   enableConfidentialCompute?: boolean | null
> }[] | null
> ```

***

### disks.removeResourcePolicies

`compute.disks.removeResourcePolicies`

Removes resource policies from a disk

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.disks.removeResourcePolicies({
	zone: 'us-central1-a',
	project: 'demo-project',
	disk: 'web-1',
	resourcePolicies: ['projects/demo-project/regions/us-central1/resourcePolicies/daily-snapshots'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `disk` | `string` | Yes | The disk name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `resourcePolicies` | `string[]` | No | Resource policies to be removed from this disk. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.resize

`compute.disks.resize`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.resize({
	zone: 'us-central1-a',
	project: 'demo-project',
	disk: 'web-1',
	sizeGb: '100',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `disk` | `string` | Yes | The name of the persistent disk. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `sizeGb` | `string \| number` | No | The new size of the persistent disk, which is specified in GB. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.setIamPolicy

`compute.disks.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.setIamPolicy({
	zone: 'us-central1-a',
	project: 'demo-project',
	resource: 'web-1',
	policy: {
		bindings: [{
			role: 'roles/compute.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `bindings` | `object[]` | No | Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. |
| `etag` | `string` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. (base64) |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: ADMIN_READ | DATA_READ | DATA_WRITE | LOG_TYPE_UNSPECIFIED,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   bindings?: {
>     role?: string,
>     members?: string[],
>     condition?: {
>       title?: string,
>       description?: string,
>       expression?: string,
>       location?: string
>     }
>   }[],
>   etag?: string
> }
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string,
>   members?: string[],
>   condition?: {
>     title?: string,
>     description?: string,
>     expression?: string,
>     location?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### disks.setLabels

`compute.disks.setLabels`

Sets the labels on a disk. To learn more about labels, read theLabeling Resources documentation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.setLabels({
	zone: 'us-central1-a',
	resource: 'web-1',
	project: 'demo-project',
	labels: { env: 'prod' },
	labelFingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `labelFingerprint` | `string` | No | 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. (base64) |
| `labels` | `Record<string, string>` | No | The labels to set for this resource. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.startAsyncReplication

`compute.disks.startAsyncReplication`

Starts asynchronous replication. Must be invoked on the primary disk

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.startAsyncReplication({
	zone: 'us-central1-a',
	disk: 'web-1',
	project: 'demo-project',
	asyncSecondaryDisk: 'projects/demo-project/zones/us-east1-b/disks/web-1-replica',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `disk` | `string` | Yes | The name of the persistent disk. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `asyncSecondaryDisk` | `string` | No | The secondary disk to start asynchronous replication to. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk](https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk) - [https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk](https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk) - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.stopAsyncReplication

`compute.disks.stopAsyncReplication`

Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.stopAsyncReplication({ zone: 'us-central1-a', project: 'demo-project', disk: 'web-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `disk` | `string` | Yes | The name of the persistent disk. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.stopGroupAsyncReplication

`compute.disks.stopGroupAsyncReplication`

Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.stopGroupAsyncReplication({ zone: 'us-central1-a', project: 'demo-project', resourcePolicy: 'projects/demo-project/regions/us-central1/resourcePolicies/app-group' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `resourcePolicy` | `string` | No | The URL of the DiskConsistencyGroupPolicy for the group of disks to stop. This may be a full or partial URL, such as: - [https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy](https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy) - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.testIamPermissions

`compute.disks.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.testIamPermissions({
	resource: 'web-1',
	zone: 'us-central1-a',
	project: 'demo-project',
	permissions: ['compute.disks.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### disks.update

`compute.disks.update`

Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.update({
	project: 'demo-project',
	zone: 'us-central1-a',
	disk: 'web-1',
	labels: { env: 'prod' },
	labelFingerprint: '42WmSpB8rSM=',
	paths: ['labels'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `paths` | `string[]` | No | — |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `disk` | `string` | Yes | The disk name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `updateMask` | `string` | No | update\_mask indicates fields to be updated as part of this request. |
| `guestOsFeatures` | `object[]` | No | 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. |
| `sourceDisk` | `string` | No | The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk](https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk) - [https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk](https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk) - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk |
| `sourceImageEncryptionKey` | `object` | No | — |
| `accessMode` | `READ_ONLY_MANY \| READ_WRITE_MANY \| READ_WRITE_SINGLE` | No | The access mode of the disk. - READ\_WRITE\_SINGLE: The default AccessMode, means the disk can be attached to single instance in RW mode. - READ\_WRITE\_MANY: The AccessMode means the disk can be attached to multiple instances in RW mode. - READ\_ONLY\_MANY: The AccessMode means the disk can be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk types. |
| `sizeGb` | `string \| number` | No | Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using thesourceImage, sourceSnapshot, orsourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value ofsizeGb must not be less than the size of the source. Acceptable values are greater than 0. |
| `resourcePolicies` | `string[]` | No | Resource policies applied to this disk for automatic snapshot creations. |
| `sourceInstantSnapshot` | `string` | No | The source instant snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot) - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot |
| `diskEncryptionKey` | `object` | No | — |
| `sourceSnapshotEncryptionKey` | `object` | No | — |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `architecture` | `ARCHITECTURE_UNSPECIFIED \| ARM64 \| X86_64` | No | The architecture of the disk. Valid values are ARM64 or X86\_64. |
| `licenses` | `string[]` | No | A list of publicly visible licenses. Reserved for Google's use. |
| `labels` | `Record<string, string>` | No | Labels to apply to this disk. These can be later modified by the setLabels method. |
| `sourceImage` | `string` | No | The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. |
| `type` | `string` | No | URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example:projects/project/zones/zone/diskTypes/pd-ssd. See Persistent disk types. |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a disk. (base64) |
| `provisionedIops` | `string \| number` | No | Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see theExtreme persistent disk documentation. |
| `locationHint` | `string` | No | An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API. |
| `params` | `object` | No | Additional disk params. |
| `name` | `string` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `physicalBlockSizeBytes` | `string \| number` | No | Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. |
| `sourceStorageObject` | `string` | No | The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs\:// or [https://storage.googleapis.com/](https://storage.googleapis.com/). This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead. |
| `options` | `string` | No | Internal use only. |
| `sourceSnapshot` | `string` | No | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot](https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot) - projects/project/global/snapshots/snapshot - global/snapshots/snapshot |
| `replicaZones` | `string[]` | No | URLs of the zones where the disk should be replicated to. Only applicable for regional resources. |
| `storagePool` | `string` | No | The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool](https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool) - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool |
| `asyncPrimaryDisk` | `object` | No | — |
| `provisionedThroughput` | `string \| number` | No | Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be greater than or equal to 1. |
| `licenseCodes` | `(string \| number)[]` | No | Integer license codes indicating which licenses are attached to this disk. |
| `enableConfidentialCompute` | `boolean` | No | Whether this disk is using confidential compute mode. |

> [accordion] guestOsFeatures full type
>
> ```ts theme={null}
> {
>   type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
> }[]
> ```

> [accordion] sourceImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] diskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] sourceSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] asyncPrimaryDisk full type
>
> ```ts theme={null}
> {
>   disk?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### disks.updateKmsKey

`compute.disks.updateKmsKey`

Rotates the customer-managed encryption key to the latest version for the specified persistent disk

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.disks.updateKmsKey({
	disk: 'web-1',
	project: 'demo-project',
	zone: 'us-central1-a',
	kmsKeyName: 'projects/demo-project/locations/us-central1/keyRings/app/cryptoKeys/data',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `disk` | `string` | Yes | Name of the Disk resource, should conform to RFC1035. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `kmsKeyName` | `string` | No | Optional. The new KMS key to replace the current one on the disk. If empty, the disk will be re-encrypted using the primary version of the disk's current KMS key. The KMS key can be provided in the following formats: - projects/project\_id/locations/location/keyRings/key\_ring/cryptoKeys/key Where project is the project ID or project number. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### diskTypes.aggregatedList

`compute.diskTypes.aggregatedList`

Retrieves an aggregated list of disk types. To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.diskTypes.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `maxResults` | `number` | No | 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`) |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#diskTypeAggregatedList. |
| `items` | `object \| null` | No | A list of DiskTypesScopedList resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   warning?: {
>     code?: string | null,
>     message?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   diskTypes?: {
>     description?: string | null,
>     creationTimestamp?: string | null,
>     selfLink?: string | null,
>     defaultDiskSizeGb?: string | number | null,
>     kind?: string | null,
>     id?: string | number | null,
>     deprecated?: {
>       replacement?: string | null,
>       state?: string | null,
>       deleted?: string | null,
>       deprecated?: string | null,
>       obsolete?: string | null
>     } | null,
>     validDiskSize?: string | null,
>     region?: string | null,
>     zone?: string | null,
>     name?: string | null
>   }[] | null
> }> | null
> ```

***

### diskTypes.get

`compute.diskTypes.get`

Returns the specified disk type

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.diskTypes.get({ diskType: 'pd-balanced', zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `diskType` | `string` | Yes | Name of the disk type to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | \[Output Only] An optional description of this resource. |
| `creationTimestamp` | `string \| null` | No | \[Output Only] Creation timestamp inRFC3339 text format. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `defaultDiskSizeGb` | `string \| number \| null` | No | \[Output Only] Server-defined default disk size in GB. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#diskType for disk types. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `deprecated` | `object \| null` | No | Deprecation status for a public resource. |
| `validDiskSize` | `string \| null` | No | \[Output Only] An optional textual description of the valid disk size, such as "10GB-10TB". |
| `region` | `string \| null` | No | \[Output Only] 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. |
| `zone` | `string \| null` | No | \[Output Only] 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. |
| `name` | `string \| null` | No | \[Output Only] Name of the resource. |

> [accordion] deprecated full type
>
> ```ts theme={null}
> {
>   replacement?: string | null,
>   state?: string | null,
>   deleted?: string | null,
>   deprecated?: string | null,
>   obsolete?: string | null
> } | null
> ```

***

### diskTypes.list

`compute.diskTypes.list`

Retrieves a list of disk types available to the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.diskTypes.list({ zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `maxResults` | `number` | No | 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`) |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `items` | `object[] \| null` | No | A list of DiskType resources. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#diskTypeList for disk types. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   creationTimestamp?: string | null,
>   selfLink?: string | null,
>   defaultDiskSizeGb?: string | number | null,
>   kind?: string | null,
>   id?: string | number | null,
>   deprecated?: {
>     replacement?: string | null,
>     state?: string | null,
>     deleted?: string | null,
>     deprecated?: string | null,
>     obsolete?: string | null
>   } | null,
>   validDiskSize?: string | null,
>   region?: string | null,
>   zone?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### firewalls.delete

`compute.firewalls.delete`

Deletes the specified firewall

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.firewalls.delete({ project: 'demo-project', firewall: 'allow-https' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `firewall` | `string` | Yes | Name of the firewall rule to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### firewalls.get

`compute.firewalls.get`

Returns the specified firewall

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.firewalls.get({ firewall: 'allow-https', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `firewall` | `string` | Yes | Name of the firewall rule to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `logConfig` | `object \| null` | No | The available logging options for a firewall rule. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `direction` | `string \| null` | No | Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. |
| `allowed` | `object[] \| null` | No | The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. |
| `targetTags` | `string[] \| null` | No | 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. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#firewall for firewall rules. |
| `destinationRanges` | `string[] \| null` | No | If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed inCIDR format. Both IPv4 and IPv6 are supported. |
| `params` | `object \| null` | No | Additional firewall parameters. |
| `sourceTags` | `string[] \| null` | No | 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'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. |
| `targetServiceAccounts` | `string[] \| null` | No | A list of service accounts indicating sets of instances located in the network that may make network connections as specified inallowed\[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. |
| `sourceServiceAccounts` | `string[] \| null` | No | If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed insourceServiceAccount. |
| `name` | `string \| null` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `priority` | `number \| null` | No | Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. |
| `network` | `string \| null` | No | URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - [https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network](https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network) - projects/myproject/global/networks/my-network - global/networks/default |
| `sourceRanges` | `string[] \| null` | No | If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed inCIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in thesourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `description` | `string \| null` | No | An optional description of this resource. Provide this field when you create the resource. |
| `denied` | `object[] \| null` | No | The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. |
| `disabled` | `boolean \| null` | No | Denotes whether the firewall rule is disabled. 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. |

> [accordion] logConfig full type
>
> ```ts theme={null}
> {
>   enable?: boolean | null,
>   metadata?: string | null
> } | null
> ```

> [accordion] allowed full type
>
> ```ts theme={null}
> {
>   IPProtocol?: string | null,
>   ports?: string[] | null
> }[] | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null
> } | null
> ```

> [accordion] denied full type
>
> ```ts theme={null}
> {
>   IPProtocol?: string | null,
>   ports?: string[] | null
> }[] | null
> ```

***

### firewalls.insert

`compute.firewalls.insert`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.firewalls.insert({
	project: 'demo-project',
	name: 'allow-https',
	network: 'projects/demo-project/global/networks/default',
	direction: 'INGRESS',
	sourceRanges: ['0.0.0.0/0'],
	allowed: [{
		IPProtocol: 'tcp',
		ports: ['443'],
	}],
	targetTags: ['web'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `logConfig` | `object` | No | The available logging options for a firewall rule. |
| `direction` | `EGRESS \| INGRESS` | No | Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. |
| `allowed` | `object[]` | No | The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. |
| `targetTags` | `string[]` | No | 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. |
| `destinationRanges` | `string[]` | No | If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed inCIDR format. Both IPv4 and IPv6 are supported. |
| `params` | `object` | No | Additional firewall parameters. |
| `sourceTags` | `string[]` | No | 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'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. |
| `targetServiceAccounts` | `string[]` | No | A list of service accounts indicating sets of instances located in the network that may make network connections as specified inallowed\[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. |
| `sourceServiceAccounts` | `string[]` | No | If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed insourceServiceAccount. |
| `name` | `string` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `priority` | `number` | No | Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. |
| `network` | `string` | No | URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - [https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network](https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network) - projects/myproject/global/networks/my-network - global/networks/default |
| `sourceRanges` | `string[]` | No | If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed inCIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in thesourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. |
| `selfLink` | `string` | No | \[Output Only] Server-defined URL for the resource. |
| `description` | `string` | No | An optional description of this resource. Provide this field when you create the resource. |
| `denied` | `object[]` | No | The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. |
| `disabled` | `boolean` | No | Denotes whether the firewall rule is disabled. 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. |

> [accordion] logConfig full type
>
> ```ts theme={null}
> {
>   enable?: boolean,
>   metadata?: EXCLUDE_ALL_METADATA | INCLUDE_ALL_METADATA
> }
> ```

> [accordion] allowed full type
>
> ```ts theme={null}
> {
>   IPProtocol?: string,
>   ports?: string[]
> }[]
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] denied full type
>
> ```ts theme={null}
> {
>   IPProtocol?: string,
>   ports?: string[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### firewalls.list

`compute.firewalls.list`

Retrieves the list of firewall rules available to the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.firewalls.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `maxResults` | `number` | No | 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`) |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | A list of Firewall resources. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#firewallList for lists of firewalls. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   creationTimestamp?: string | null,
>   logConfig?: {
>     enable?: boolean | null,
>     metadata?: string | null
>   } | null,
>   id?: string | number | null,
>   direction?: string | null,
>   allowed?: {
>     IPProtocol?: string | null,
>     ports?: string[] | null
>   }[] | null,
>   targetTags?: string[] | null,
>   kind?: string | null,
>   destinationRanges?: string[] | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   sourceTags?: string[] | null,
>   targetServiceAccounts?: string[] | null,
>   sourceServiceAccounts?: string[] | null,
>   name?: string | null,
>   priority?: number | null,
>   network?: string | null,
>   sourceRanges?: string[] | null,
>   selfLink?: string | null,
>   description?: string | null,
>   denied?: {
>     IPProtocol?: string | null,
>     ports?: string[] | null
>   }[] | null,
>   disabled?: boolean | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

***

### firewalls.patch

`compute.firewalls.patch`

Updates the specified firewall rule with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.firewalls.patch({ project: 'demo-project', firewall: 'allow-https', description: 'Managed by Corsair' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `firewall` | `string` | Yes | Name of the firewall rule to patch. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `logConfig` | `object` | No | The available logging options for a firewall rule. |
| `direction` | `EGRESS \| INGRESS` | No | Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. |
| `allowed` | `object[]` | No | The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. |
| `targetTags` | `string[]` | No | 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. |
| `destinationRanges` | `string[]` | No | If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed inCIDR format. Both IPv4 and IPv6 are supported. |
| `params` | `object` | No | Additional firewall parameters. |
| `sourceTags` | `string[]` | No | 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'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. |
| `targetServiceAccounts` | `string[]` | No | A list of service accounts indicating sets of instances located in the network that may make network connections as specified inallowed\[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. |
| `sourceServiceAccounts` | `string[]` | No | If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed insourceServiceAccount. |
| `name` | `string` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `priority` | `number` | No | Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. |
| `network` | `string` | No | URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - [https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network](https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network) - projects/myproject/global/networks/my-network - global/networks/default |
| `sourceRanges` | `string[]` | No | If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed inCIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in thesourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. |
| `selfLink` | `string` | No | \[Output Only] Server-defined URL for the resource. |
| `description` | `string` | No | An optional description of this resource. Provide this field when you create the resource. |
| `denied` | `object[]` | No | The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. |
| `disabled` | `boolean` | No | Denotes whether the firewall rule is disabled. 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. |

> [accordion] logConfig full type
>
> ```ts theme={null}
> {
>   enable?: boolean,
>   metadata?: EXCLUDE_ALL_METADATA | INCLUDE_ALL_METADATA
> }
> ```

> [accordion] allowed full type
>
> ```ts theme={null}
> {
>   IPProtocol?: string,
>   ports?: string[]
> }[]
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] denied full type
>
> ```ts theme={null}
> {
>   IPProtocol?: string,
>   ports?: string[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### firewalls.testIamPermissions

`compute.firewalls.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.firewalls.testIamPermissions({
	project: 'demo-project',
	resource: 'allow-https',
	permissions: ['compute.firewalls.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### firewalls.update

`compute.firewalls.update`

Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.firewalls.update({
	project: 'demo-project',
	firewall: 'allow-https',
	name: 'allow-https',
	network: 'projects/demo-project/global/networks/default',
	sourceRanges: ['0.0.0.0/0'],
	allowed: [{
		IPProtocol: 'tcp',
		ports: ['443'],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `firewall` | `string` | Yes | Name of the firewall rule to update. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `logConfig` | `object` | No | The available logging options for a firewall rule. |
| `direction` | `EGRESS \| INGRESS` | No | Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. |
| `allowed` | `object[]` | No | The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. |
| `targetTags` | `string[]` | No | 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. |
| `destinationRanges` | `string[]` | No | If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed inCIDR format. Both IPv4 and IPv6 are supported. |
| `params` | `object` | No | Additional firewall parameters. |
| `sourceTags` | `string[]` | No | 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'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. |
| `targetServiceAccounts` | `string[]` | No | A list of service accounts indicating sets of instances located in the network that may make network connections as specified inallowed\[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. |
| `sourceServiceAccounts` | `string[]` | No | If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed insourceServiceAccount. |
| `name` | `string` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `priority` | `number` | No | Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. |
| `network` | `string` | No | URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - [https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network](https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network) - projects/myproject/global/networks/my-network - global/networks/default |
| `sourceRanges` | `string[]` | No | If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed inCIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in thesourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. |
| `selfLink` | `string` | No | \[Output Only] Server-defined URL for the resource. |
| `description` | `string` | No | An optional description of this resource. Provide this field when you create the resource. |
| `denied` | `object[]` | No | The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. |
| `disabled` | `boolean` | No | Denotes whether the firewall rule is disabled. 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. |

> [accordion] logConfig full type
>
> ```ts theme={null}
> {
>   enable?: boolean,
>   metadata?: EXCLUDE_ALL_METADATA | INCLUDE_ALL_METADATA
> }
> ```

> [accordion] allowed full type
>
> ```ts theme={null}
> {
>   IPProtocol?: string,
>   ports?: string[]
> }[]
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] denied full type
>
> ```ts theme={null}
> {
>   IPProtocol?: string,
>   ports?: string[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### globalAddresses.delete

`compute.globalAddresses.delete`

Deletes the specified address resource

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.globalAddresses.delete({ project: 'demo-project', address: 'web-ip' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `address` | `string` | Yes | Name of the address resource to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### globalAddresses.get

`compute.globalAddresses.get`

Returns the specified address resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.globalAddresses.get({ address: 'web-ip', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `address` | `string` | Yes | Name of the address resource to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ipCollection` | `string \| null` | No | Reference to the source of IP addresses. It supports the following cases: - Case 1: PublicDelegatedPrefix (PDP) for BYOIP external addresses. If an IPv4 PDP is used, the PDP must support enhanced IPv4 allocations. If an IPv6 PDP is used, the PDP must be in EXTERNAL\_IPV6\_FORWARDING\_RULE\_CREATION mode. - Case 2: Internal Range for global internal addresses. |
| `purpose` | `string \| null` | No | The purpose of this resource, which can be one of the following values: - GCE\_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS\_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC\_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT\_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. |
| `ipv6EndpointType` | `string \| null` | No | The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation. |
| `labels` | `Record<string, string> \| null` | No | Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. Label values may be empty. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `prefixLength` | `number \| null` | No | The prefix length if the resource represents an IP range. |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `network` | `string \| null` | No | The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with theVPC\_PEERING purpose. |
| `address` | `string \| null` | No | The static IP address represented by this resource. |
| `subnetwork` | `string \| null` | No | The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with aGCE\_ENDPOINT or DNS\_RESOLVER purpose. |
| `region` | `string \| null` | No | Output only. \[Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.* |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#address for addresses. |
| `ipVersion` | `string \| null` | No | The IP version that will be used by this address. Valid options areIPV4 or IPV6. |
| `name` | `string \| null` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `addressType` | `string \| null` | No | The type of address to reserve, either INTERNAL orEXTERNAL. If unspecified, defaults to EXTERNAL. |
| `description` | `string \| null` | No | An optional description of this resource. Provide this field when you create the resource. |
| `labelFingerprint` | `string \| null` | No | A fingerprint for the labels being applied to this Address, 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an Address. (base64) |
| `status` | `string \| null` | No | Output only. \[Output Only] The status of the address, which can be one ofRESERVING, 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. |
| `networkTier` | `string \| null` | No | This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM orSTANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM. |
| `users` | `string[] \| null` | No | \[Output Only] The URLs of the resources that are using this address. |

***

### globalAddresses.insert

`compute.globalAddresses.insert`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.globalAddresses.insert({ project: 'demo-project', name: 'web-ip', ipVersion: 'IPV4' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `ipCollection` | `string` | No | Reference to the source of IP addresses. It supports the following cases: - Case 1: PublicDelegatedPrefix (PDP) for BYOIP external addresses. If an IPv4 PDP is used, the PDP must support enhanced IPv4 allocations. If an IPv6 PDP is used, the PDP must be in EXTERNAL\_IPV6\_FORWARDING\_RULE\_CREATION mode. - Case 2: Internal Range for global internal addresses. |
| `purpose` | `DNS_RESOLVER \| GCE_ENDPOINT \| IPSEC_INTERCONNECT \| NAT_AUTO \| PRIVATE_SERVICE_CONNECT \| SERVERLESS \| SHARED_LOADBALANCER_VIP \| VPC_PEERING` | No | The purpose of this resource, which can be one of the following values: - GCE\_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS\_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC\_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT\_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. |
| `ipv6EndpointType` | `NETLB \| VM` | No | The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation. |
| `labels` | `Record<string, string>` | No | Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. Label values may be empty. |
| `selfLink` | `string` | No | \[Output Only] Server-defined URL for the resource. |
| `prefixLength` | `number` | No | The prefix length if the resource represents an IP range. |
| `network` | `string` | No | The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with theVPC\_PEERING purpose. |
| `address` | `string` | No | The static IP address represented by this resource. |
| `subnetwork` | `string` | No | The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with aGCE\_ENDPOINT or DNS\_RESOLVER purpose. |
| `ipVersion` | `IPV4 \| IPV6 \| UNSPECIFIED_VERSION` | No | The IP version that will be used by this address. Valid options areIPV4 or IPV6. |
| `name` | `string` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `addressType` | `EXTERNAL \| INTERNAL \| UNSPECIFIED_TYPE` | No | The type of address to reserve, either INTERNAL orEXTERNAL. If unspecified, defaults to EXTERNAL. |
| `description` | `string` | No | An optional description of this resource. Provide this field when you create the resource. |
| `labelFingerprint` | `string` | No | A fingerprint for the labels being applied to this Address, 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an Address. (base64) |
| `networkTier` | `FIXED_STANDARD \| PREMIUM \| STANDARD \| STANDARD_OVERRIDES_FIXED_STANDARD` | No | This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM orSTANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM. |
| `users` | `string[]` | No | \[Output Only] The URLs of the resources that are using this address. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### globalAddresses.list

`compute.globalAddresses.list`

Retrieves a list of global addresses (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.globalAddresses.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `maxResults` | `number` | No | 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`) |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | A list of Address resources. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#addressList for lists of addresses. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   ipCollection?: string | null,
>   purpose?: string | null,
>   ipv6EndpointType?: string | null,
>   labels?: Record<string, string> | null,
>   selfLink?: string | null,
>   prefixLength?: number | null,
>   creationTimestamp?: string | null,
>   network?: string | null,
>   address?: string | null,
>   subnetwork?: string | null,
>   region?: string | null,
>   kind?: string | null,
>   ipVersion?: string | null,
>   name?: string | null,
>   id?: string | number | null,
>   addressType?: string | null,
>   description?: string | null,
>   labelFingerprint?: string | null,
>   status?: string | null,
>   networkTier?: string | null,
>   users?: string[] | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

***

### globalAddresses.move

`compute.globalAddresses.move`

Moves the specified address resource from one project to another project

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.globalAddresses.move({ project: 'demo-project', address: 'web-ip', destinationAddress: 'projects/other-project/global/addresses/web-ip' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Source project ID which the Address is moved from. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `address` | `string` | Yes | Name of the address resource to move. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `destinationAddress` | `string` | No | The URL of the destination address to move to. This can be a full or partial URL. For example, the following are all valid URLs to a address: - [https://www.googleapis.com/compute/v1/projects/project/global/addresses/address](https://www.googleapis.com/compute/v1/projects/project/global/addresses/address) - projects/project/global/addresses/address Note that destination project must be different from the source project. So/global/addresses/address is not valid partial url. |
| `description` | `string` | No | An optional destination address description if intended to be different from the source. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### globalAddresses.setLabels

`compute.globalAddresses.setLabels`

Sets the labels on a GlobalAddress. To learn more about labels, read theLabeling Resources documentation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.globalAddresses.setLabels({
	project: 'demo-project',
	resource: 'web-ip',
	labels: { env: 'prod' },
	labelFingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint. (base64) |
| `labels` | `Record<string, string>` | No | A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example,"webserver-frontend": "images". A label value can also be empty (e.g. "my-label": ""). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### globalAddresses.testIamPermissions

`compute.globalAddresses.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.globalAddresses.testIamPermissions({
	project: 'demo-project',
	resource: 'web-ip',
	permissions: ['compute.globalAddresses.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### globalOperations.aggregatedList

`compute.globalOperations.aggregatedList`

Retrieves an aggregated list of all operations. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.globalOperations.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `maxResults` | `number` | No | 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`) |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always `compute#operationAggregatedList` for aggregated lists of operations. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for this resource. |
| `items` | `object \| null` | No | \[Output Only] A map of scoped operation lists. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than `maxResults`, use the `nextPageToken` as a value for the query parameter `pageToken` in the next list request. Subsequent list requests will have their own `nextPageToken` to continue paging through the results. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `id` | `string \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   warning?: {
>     code?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     message?: string | null
>   } | null,
>   operations?: {
>     clientOperationId?: string | null,
>     operationType?: string | null,
>     operationGroupId?: string | null,
>     getHealthOperationMetadata?: {
>       healthInfo?: {
>         healthStatus?: string | null,
>         unhealthyReason?: string | null,
>         availabilitySloStatus?: string | null,
>         repairCategory?: string | null,
>         updateTime?: string | null
>       } | null
>     } | null,
>     kind?: string | null,
>     status?: string | null,
>     id?: string | number | null,
>     getVersionOperationMetadata?: {
>       inlineSbomInfo?: {
>         targetComponentVersions?: Record<string, string> | null,
>         currentComponentVersions?: Record<string, string> | null
>       } | null
>     } | null,
>     zone?: string | null,
>     httpErrorMessage?: string | null,
>     error?: {
>       errors?: {
>         location?: string | null,
>         code?: string | null,
>         message?: string | null,
>         errorDetails?: {
>           errorInfo?: {
>             domain?: string | null,
>             metadatas?: Record<string, string> | null,
>             reason?: string | null
>           } | null,
>           localizedMessage?: {
>             locale?: string | null,
>             message?: string | null
>           } | null,
>           help?: {
>             links?: {
>               description?: string | null,
>               url?: string | null
>             }[] | null
>           } | null,
>           quotaInfo?: {
>             rolloutStatus?: string | null,
>             dimensions?: Record<string, string> | null,
>             limit?: number | null,
>             metricName?: string | null,
>             futureLimit?: number | null,
>             limitName?: string | null
>           } | null
>         }[] | null
>       }[] | null
>     } | null,
>     setCommonInstanceMetadataOperationMetadata?: {
>       clientOperationId?: string | null,
>       perLocationOperations?: Record<string, {
>         state?: string | null,
>         error?: {
>           code?: number | null,
>           message?: string | null,
>           details?: Record<string, any>[] | null
>         } | null
>       }> | null
>     } | null,
>     warnings?: {
>       message?: string | null,
>       code?: string | null,
>       data?: {
>         key?: string | null,
>         value?: string | null
>       }[] | null
>     }[] | null,
>     endTime?: string | null,
>     name?: string | null,
>     statusMessage?: string | null,
>     insertTime?: string | null,
>     targetId?: string | number | null,
>     targetLink?: string | null,
>     region?: string | null,
>     user?: string | null,
>     httpErrorStatusCode?: number | null,
>     creationTimestamp?: string | null,
>     progress?: number | null,
>     startTime?: string | null,
>     description?: string | null,
>     instancesBulkInsertOperationMetadata?: {
>       perLocationStatus?: Record<string, {
>         createdVmCount?: number | null,
>         deletedVmCount?: number | null,
>         failedToCreateVmCount?: number | null,
>         targetVmCount?: number | null,
>         status?: string | null
>       }> | null
>     } | null,
>     selfLink?: string | null
>   }[] | null
> }> | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   message?: string | null,
>   code?: string | null
> } | null
> ```

***

### globalOperations.delete

`compute.globalOperations.delete`

Deletes the specified Operations resource

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.globalOperations.delete({ project: 'demo-project', operation: 'operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `operation` | `string` | Yes | Name of the Operations resource to delete, or its unique numeric identifier. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### globalOperations.get

`compute.globalOperations.get`

Retrieves the specified Operations resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.globalOperations.get({ project: 'demo-project', operation: 'operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `operation` | `string` | Yes | Name of the Operations resource to return, or its unique numeric identifier. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### globalOperations.list

`compute.globalOperations.list`

Retrieves a list of Operation resources contained within the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.globalOperations.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `maxResults` | `number` | No | 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`) |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | \[Output Only] A list of Operation resources. |
| `id` | `string \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than `maxResults`, use the `nextPageToken` as a value for the query parameter `pageToken` in the next list request. Subsequent list requests will have their own `nextPageToken` to continue paging through the results. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for this resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always `compute#operations` for Operations resource. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   operationType?: string | null,
>   operationGroupId?: string | null,
>   getHealthOperationMetadata?: {
>     healthInfo?: {
>       healthStatus?: string | null,
>       unhealthyReason?: string | null,
>       availabilitySloStatus?: string | null,
>       repairCategory?: string | null,
>       updateTime?: string | null
>     } | null
>   } | null,
>   kind?: string | null,
>   status?: string | null,
>   id?: string | number | null,
>   getVersionOperationMetadata?: {
>     inlineSbomInfo?: {
>       targetComponentVersions?: Record<string, string> | null,
>       currentComponentVersions?: Record<string, string> | null
>     } | null
>   } | null,
>   zone?: string | null,
>   httpErrorMessage?: string | null,
>   error?: {
>     errors?: {
>       location?: string | null,
>       code?: string | null,
>       message?: string | null,
>       errorDetails?: {
>         errorInfo?: {
>           domain?: string | null,
>           metadatas?: Record<string, string> | null,
>           reason?: string | null
>         } | null,
>         localizedMessage?: {
>           locale?: string | null,
>           message?: string | null
>         } | null,
>         help?: {
>           links?: {
>             description?: string | null,
>             url?: string | null
>           }[] | null
>         } | null,
>         quotaInfo?: {
>           rolloutStatus?: string | null,
>           dimensions?: Record<string, string> | null,
>           limit?: number | null,
>           metricName?: string | null,
>           futureLimit?: number | null,
>           limitName?: string | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   setCommonInstanceMetadataOperationMetadata?: {
>     clientOperationId?: string | null,
>     perLocationOperations?: Record<string, {
>       state?: string | null,
>       error?: {
>         code?: number | null,
>         message?: string | null,
>         details?: Record<string, any>[] | null
>       } | null
>     }> | null
>   } | null,
>   warnings?: {
>     message?: string | null,
>     code?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null
>   }[] | null,
>   endTime?: string | null,
>   name?: string | null,
>   statusMessage?: string | null,
>   insertTime?: string | null,
>   targetId?: string | number | null,
>   targetLink?: string | null,
>   region?: string | null,
>   user?: string | null,
>   httpErrorStatusCode?: number | null,
>   creationTimestamp?: string | null,
>   progress?: number | null,
>   startTime?: string | null,
>   description?: string | null,
>   instancesBulkInsertOperationMetadata?: {
>     perLocationStatus?: Record<string, {
>       createdVmCount?: number | null,
>       deletedVmCount?: number | null,
>       failedToCreateVmCount?: number | null,
>       targetVmCount?: number | null,
>       status?: string | null
>     }> | null
>   } | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

***

### globalOperations.wait

`compute.globalOperations.wait`

Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.globalOperations.wait({ operation: 'operation-123', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `string` | Yes | Name of the Operations resource to return, or its unique numeric identifier. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### imageFamilyViews.get

`compute.imageFamilyViews.get`

Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.imageFamilyViews.get({ zone: 'us-central1-a', project: 'demo-project', family: 'debian-12' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `family` | `string` | Yes | Name of the image family to search for. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `image` | `object \| null` | No | Represents an Image resource. You can use images to create boot disks for your VM instances. For more information, read Images. |

> [accordion] image full type
>
> ```ts theme={null}
> {
>   storageLocations?: string[] | null,
>   sourceImage?: string | null,
>   archiveSizeBytes?: string | number | null,
>   labelFingerprint?: string | null,
>   creationTimestamp?: string | null,
>   sourceDiskId?: string | null,
>   rawDisk?: {
>     sha1Checksum?: string | null,
>     source?: string | null,
>     containerType?: string | null
>   } | null,
>   sourceImageEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   licenses?: string[] | null,
>   sourceSnapshotId?: string | null,
>   kind?: string | null,
>   diskSizeGb?: string | number | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   architecture?: string | null,
>   sourceSnapshot?: string | null,
>   selfLink?: string | null,
>   satisfiesPzi?: boolean | null,
>   sourceSnapshotEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   sourceDiskEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   sourceImageId?: string | null,
>   enableConfidentialCompute?: boolean | null,
>   shieldedInstanceInitialState?: {
>     keks?: {
>       fileType?: string | null,
>       content?: string | null
>     }[] | null,
>     dbs?: {
>       fileType?: string | null,
>       content?: string | null
>     }[] | null,
>     dbxs?: {
>       fileType?: string | null,
>       content?: string | null
>     }[] | null,
>     pk?: {
>       fileType?: string | null,
>       content?: string | null
>     } | null
>   } | null,
>   description?: string | null,
>   deprecated?: {
>     replacement?: string | null,
>     state?: string | null,
>     deleted?: string | null,
>     deprecated?: string | null,
>     obsolete?: string | null
>   } | null,
>   status?: string | null,
>   satisfiesPzs?: boolean | null,
>   family?: string | null,
>   imageEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   licenseCodes?: (string | number)[] | null,
>   sourceDisk?: string | null,
>   id?: string | number | null,
>   name?: string | null,
>   sourceType?: string | null,
>   labels?: Record<string, string> | null,
>   guestOsFeatures?: {
>     type?: string | null
>   }[] | null
> } | null
> ```

***

### images.delete

`compute.images.delete`

Deletes the specified image

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.images.delete({ image: 'debian-12', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `image` | `string` | Yes | Name of the image resource to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### images.deprecate

`compute.images.deprecate`

Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.images.deprecate({
	project: 'demo-project',
	image: 'debian-12',
	state: 'DEPRECATED',
	replacement: 'projects/demo-project/global/images/web-image-2',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `image` | `string` | Yes | Image name. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `replacement` | `string` | No | 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. |
| `state` | `ACTIVE \| DELETED \| DEPRECATED \| OBSOLETE` | No | 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 useACTIVE. Operations which create a new resource using aDEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE orDELETED resources will be rejected and result in an error. |
| `deleted` | `string` | No | 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. |
| `deprecated` | `string` | No | 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. |
| `obsolete` | `string` | No | 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. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### images.get

`compute.images.get`

Returns the specified image

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.images.get({ project: 'demo-project', image: 'debian-12' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `image` | `string` | Yes | Name of the image resource to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `storageLocations` | `string[] \| null` | No | Cloud Storage bucket storage location of the image (regional or multi-regional). |
| `sourceImage` | `string \| null` | No | URL of the source image used to create this image. The following are valid formats for the URL: - [https://www.googleapis.com/compute/v1/projects/project\_id/global/](https://www.googleapis.com/compute/v1/projects/project_id/global/) images/image\_name - projects/project\_id/global/images/image\_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `archiveSizeBytes` | `string \| number \| null` | No | Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). |
| `labelFingerprint` | `string \| null` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an image. (base64) |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `sourceDiskId` | `string \| null` | No | Output only. \[Output Only] 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. |
| `rawDisk` | `object \| null` | No | The parameters of the raw disk image. |
| `sourceImageEncryptionKey` | `object \| null` | No | — |
| `licenses` | `string[] \| null` | No | Any applicable license URI. |
| `sourceSnapshotId` | `string \| null` | No | Output only. \[Output Only] 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. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#image for images. |
| `diskSizeGb` | `string \| number \| null` | No | Size of the image when restored onto a persistent disk (in GB). |
| `params` | `object \| null` | No | Additional image params. |
| `architecture` | `string \| null` | No | The architecture of the image. Valid values are ARM64 or X86\_64. |
| `sourceSnapshot` | `string \| null` | No | URL of the source snapshot used to create this image. The following are valid formats for the URL: - [https://www.googleapis.com/compute/v1/projects/project\_id/global/](https://www.googleapis.com/compute/v1/projects/project_id/global/) snapshots/snapshot\_name - projects/project\_id/global/snapshots/snapshot\_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for the resource. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. Reserved for future use. |
| `sourceSnapshotEncryptionKey` | `object \| null` | No | — |
| `sourceDiskEncryptionKey` | `object \| null` | No | — |
| `sourceImageId` | `string \| null` | No | Output only. \[Output Only] 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. |
| `enableConfidentialCompute` | `boolean \| null` | No | Output only. Whether this image is created from a confidential compute mode disk. \[Output Only]: This field is not set by user, but from source disk. |
| `shieldedInstanceInitialState` | `object \| null` | No | Initial State for shielded instance, these are public keys which are safe to store in public |
| `description` | `string \| null` | No | An optional description of this resource. Provide this property when you create the resource. |
| `deprecated` | `object \| null` | No | Deprecation status for a public resource. |
| `status` | `string \| null` | No | Output only. \[Output Only] 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, orREADY. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. \[Output Only] Reserved for future use. |
| `family` | `string \| null` | No | The name of the image family to which this image belongs. The image family name can be from a publicly managed image family provided by Compute Engine, or from a custom image family you create. For example,centos-stream-9 is a publicly available image family. For more information, see Image family best practices. When creating disks, you can specify 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. |
| `imageEncryptionKey` | `object \| null` | No | — |
| `licenseCodes` | `(string \| number)[] \| null` | No | Integer license codes indicating which licenses are attached to this image. |
| `sourceDisk` | `string \| null` | No | URL of the source disk used to create this image. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk](https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk) - projects/project/zones/zone/disks/disk - zones/zone/disks/disk In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `name` | `string \| null` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `sourceType` | `string \| null` | No | The type of the image used to create this disk. The default and only valid value is RAW. |
| `labels` | `Record<string, string> \| null` | No | Labels to apply to this image. These can be later modified by the setLabels method. |
| `guestOsFeatures` | `object[] \| null` | No | A list of features to enable on the guest operating system. Applicable only for bootable images. To see a list of available options, see theguestOSfeatures\[].type parameter. |

> [accordion] rawDisk full type
>
> ```ts theme={null}
> {
>   sha1Checksum?: string | null,
>   source?: string | null,
>   containerType?: string | null
> } | null
> ```

> [accordion] sourceImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null
> } | null
> ```

> [accordion] sourceSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] sourceDiskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] shieldedInstanceInitialState full type
>
> ```ts theme={null}
> {
>   keks?: {
>     fileType?: string | null,
>     content?: string | null
>   }[] | null,
>   dbs?: {
>     fileType?: string | null,
>     content?: string | null
>   }[] | null,
>   dbxs?: {
>     fileType?: string | null,
>     content?: string | null
>   }[] | null,
>   pk?: {
>     fileType?: string | null,
>     content?: string | null
>   } | null
> } | null
> ```

> [accordion] deprecated full type
>
> ```ts theme={null}
> {
>   replacement?: string | null,
>   state?: string | null,
>   deleted?: string | null,
>   deprecated?: string | null,
>   obsolete?: string | null
> } | null
> ```

> [accordion] imageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] guestOsFeatures full type
>
> ```ts theme={null}
> {
>   type?: string | null
> }[] | null
> ```

***

### images.getFromFamily

`compute.images.getFromFamily`

Returns the latest image that is part of an image family and is not deprecated. For more information on image families, seePublic image families documentation

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.images.getFromFamily({ project: 'demo-project', family: 'debian-12' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | The image project that the image belongs to. For example, to get a CentOS image, specify centos-cloud as the image project. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `family` | `string` | Yes | Name of the image family to search for. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `storageLocations` | `string[] \| null` | No | Cloud Storage bucket storage location of the image (regional or multi-regional). |
| `sourceImage` | `string \| null` | No | URL of the source image used to create this image. The following are valid formats for the URL: - [https://www.googleapis.com/compute/v1/projects/project\_id/global/](https://www.googleapis.com/compute/v1/projects/project_id/global/) images/image\_name - projects/project\_id/global/images/image\_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `archiveSizeBytes` | `string \| number \| null` | No | Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). |
| `labelFingerprint` | `string \| null` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an image. (base64) |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `sourceDiskId` | `string \| null` | No | Output only. \[Output Only] 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. |
| `rawDisk` | `object \| null` | No | The parameters of the raw disk image. |
| `sourceImageEncryptionKey` | `object \| null` | No | — |
| `licenses` | `string[] \| null` | No | Any applicable license URI. |
| `sourceSnapshotId` | `string \| null` | No | Output only. \[Output Only] 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. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#image for images. |
| `diskSizeGb` | `string \| number \| null` | No | Size of the image when restored onto a persistent disk (in GB). |
| `params` | `object \| null` | No | Additional image params. |
| `architecture` | `string \| null` | No | The architecture of the image. Valid values are ARM64 or X86\_64. |
| `sourceSnapshot` | `string \| null` | No | URL of the source snapshot used to create this image. The following are valid formats for the URL: - [https://www.googleapis.com/compute/v1/projects/project\_id/global/](https://www.googleapis.com/compute/v1/projects/project_id/global/) snapshots/snapshot\_name - projects/project\_id/global/snapshots/snapshot\_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for the resource. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. Reserved for future use. |
| `sourceSnapshotEncryptionKey` | `object \| null` | No | — |
| `sourceDiskEncryptionKey` | `object \| null` | No | — |
| `sourceImageId` | `string \| null` | No | Output only. \[Output Only] 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. |
| `enableConfidentialCompute` | `boolean \| null` | No | Output only. Whether this image is created from a confidential compute mode disk. \[Output Only]: This field is not set by user, but from source disk. |
| `shieldedInstanceInitialState` | `object \| null` | No | Initial State for shielded instance, these are public keys which are safe to store in public |
| `description` | `string \| null` | No | An optional description of this resource. Provide this property when you create the resource. |
| `deprecated` | `object \| null` | No | Deprecation status for a public resource. |
| `status` | `string \| null` | No | Output only. \[Output Only] 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, orREADY. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. \[Output Only] Reserved for future use. |
| `family` | `string \| null` | No | The name of the image family to which this image belongs. The image family name can be from a publicly managed image family provided by Compute Engine, or from a custom image family you create. For example,centos-stream-9 is a publicly available image family. For more information, see Image family best practices. When creating disks, you can specify 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. |
| `imageEncryptionKey` | `object \| null` | No | — |
| `licenseCodes` | `(string \| number)[] \| null` | No | Integer license codes indicating which licenses are attached to this image. |
| `sourceDisk` | `string \| null` | No | URL of the source disk used to create this image. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk](https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk) - projects/project/zones/zone/disks/disk - zones/zone/disks/disk In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `name` | `string \| null` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `sourceType` | `string \| null` | No | The type of the image used to create this disk. The default and only valid value is RAW. |
| `labels` | `Record<string, string> \| null` | No | Labels to apply to this image. These can be later modified by the setLabels method. |
| `guestOsFeatures` | `object[] \| null` | No | A list of features to enable on the guest operating system. Applicable only for bootable images. To see a list of available options, see theguestOSfeatures\[].type parameter. |

> [accordion] rawDisk full type
>
> ```ts theme={null}
> {
>   sha1Checksum?: string | null,
>   source?: string | null,
>   containerType?: string | null
> } | null
> ```

> [accordion] sourceImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null
> } | null
> ```

> [accordion] sourceSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] sourceDiskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] shieldedInstanceInitialState full type
>
> ```ts theme={null}
> {
>   keks?: {
>     fileType?: string | null,
>     content?: string | null
>   }[] | null,
>   dbs?: {
>     fileType?: string | null,
>     content?: string | null
>   }[] | null,
>   dbxs?: {
>     fileType?: string | null,
>     content?: string | null
>   }[] | null,
>   pk?: {
>     fileType?: string | null,
>     content?: string | null
>   } | null
> } | null
> ```

> [accordion] deprecated full type
>
> ```ts theme={null}
> {
>   replacement?: string | null,
>   state?: string | null,
>   deleted?: string | null,
>   deprecated?: string | null,
>   obsolete?: string | null
> } | null
> ```

> [accordion] imageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] guestOsFeatures full type
>
> ```ts theme={null}
> {
>   type?: string | null
> }[] | null
> ```

***

### images.getIamPolicy

`compute.images.getIamPolicy`

Gets the access control policy for a resource. May be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.images.getIamPolicy({ project: 'demo-project', resource: 'debian-12' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `optionsRequestedPolicyVersion` | `number` | No | Requested IAM Policy version. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### images.insert

`compute.images.insert`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.images.insert({ project: 'demo-project', name: 'web-image', sourceDisk: 'projects/demo-project/zones/us-central1-a/disks/web-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `forceCreate` | `boolean` | No | Force image creation if true. |
| `storageLocations` | `string[]` | No | Cloud Storage bucket storage location of the image (regional or multi-regional). |
| `sourceImage` | `string` | No | URL of the source image used to create this image. The following are valid formats for the URL: - [https://www.googleapis.com/compute/v1/projects/project\_id/global/](https://www.googleapis.com/compute/v1/projects/project_id/global/) images/image\_name - projects/project\_id/global/images/image\_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `archiveSizeBytes` | `string \| number` | No | Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an image. (base64) |
| `rawDisk` | `object` | No | The parameters of the raw disk image. |
| `sourceImageEncryptionKey` | `object` | No | — |
| `licenses` | `string[]` | No | Any applicable license URI. |
| `diskSizeGb` | `string \| number` | No | Size of the image when restored onto a persistent disk (in GB). |
| `params` | `object` | No | Additional image params. |
| `architecture` | `ARCHITECTURE_UNSPECIFIED \| ARM64 \| X86_64` | No | The architecture of the image. Valid values are ARM64 or X86\_64. |
| `sourceSnapshot` | `string` | No | URL of the source snapshot used to create this image. The following are valid formats for the URL: - [https://www.googleapis.com/compute/v1/projects/project\_id/global/](https://www.googleapis.com/compute/v1/projects/project_id/global/) snapshots/snapshot\_name - projects/project\_id/global/snapshots/snapshot\_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `sourceSnapshotEncryptionKey` | `object` | No | — |
| `sourceDiskEncryptionKey` | `object` | No | — |
| `shieldedInstanceInitialState` | `object` | No | Initial State for shielded instance, these are public keys which are safe to store in public |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `family` | `string` | No | The name of the image family to which this image belongs. The image family name can be from a publicly managed image family provided by Compute Engine, or from a custom image family you create. For example,centos-stream-9 is a publicly available image family. For more information, see Image family best practices. When creating disks, you can specify 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. |
| `imageEncryptionKey` | `object` | No | — |
| `licenseCodes` | `(string \| number)[]` | No | Integer license codes indicating which licenses are attached to this image. |
| `sourceDisk` | `string` | No | URL of the source disk used to create this image. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk](https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk) - projects/project/zones/zone/disks/disk - zones/zone/disks/disk In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `name` | `string` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `sourceType` | `RAW` | No | The type of the image used to create this disk. The default and only valid value is RAW. |
| `labels` | `Record<string, string>` | No | Labels to apply to this image. These can be later modified by the setLabels method. |
| `guestOsFeatures` | `object[]` | No | A list of features to enable on the guest operating system. Applicable only for bootable images. To see a list of available options, see theguestOSfeatures\[].type parameter. |

> [accordion] rawDisk full type
>
> ```ts theme={null}
> {
>   sha1Checksum?: string,
>   source?: string,
>   containerType?: TAR
> }
> ```

> [accordion] sourceImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] sourceSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] sourceDiskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] shieldedInstanceInitialState full type
>
> ```ts theme={null}
> {
>   keks?: {
>     fileType?: BIN | UNDEFINED | X509,
>     content?: string
>   }[],
>   dbs?: {
>     fileType?: BIN | UNDEFINED | X509,
>     content?: string
>   }[],
>   dbxs?: {
>     fileType?: BIN | UNDEFINED | X509,
>     content?: string
>   }[],
>   pk?: {
>     fileType?: BIN | UNDEFINED | X509,
>     content?: string
>   }
> }
> ```

> [accordion] imageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] guestOsFeatures full type
>
> ```ts theme={null}
> {
>   type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### images.list

`compute.images.list`

Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.images.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `maxResults` | `number` | No | 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`) |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | A list of Image resources. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `kind` | `string \| null` | No | Output only. Type of resource. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   storageLocations?: string[] | null,
>   sourceImage?: string | null,
>   archiveSizeBytes?: string | number | null,
>   labelFingerprint?: string | null,
>   creationTimestamp?: string | null,
>   sourceDiskId?: string | null,
>   rawDisk?: {
>     sha1Checksum?: string | null,
>     source?: string | null,
>     containerType?: string | null
>   } | null,
>   sourceImageEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   licenses?: string[] | null,
>   sourceSnapshotId?: string | null,
>   kind?: string | null,
>   diskSizeGb?: string | number | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   architecture?: string | null,
>   sourceSnapshot?: string | null,
>   selfLink?: string | null,
>   satisfiesPzi?: boolean | null,
>   sourceSnapshotEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   sourceDiskEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   sourceImageId?: string | null,
>   enableConfidentialCompute?: boolean | null,
>   shieldedInstanceInitialState?: {
>     keks?: {
>       fileType?: string | null,
>       content?: string | null
>     }[] | null,
>     dbs?: {
>       fileType?: string | null,
>       content?: string | null
>     }[] | null,
>     dbxs?: {
>       fileType?: string | null,
>       content?: string | null
>     }[] | null,
>     pk?: {
>       fileType?: string | null,
>       content?: string | null
>     } | null
>   } | null,
>   description?: string | null,
>   deprecated?: {
>     replacement?: string | null,
>     state?: string | null,
>     deleted?: string | null,
>     deprecated?: string | null,
>     obsolete?: string | null
>   } | null,
>   status?: string | null,
>   satisfiesPzs?: boolean | null,
>   family?: string | null,
>   imageEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   licenseCodes?: (string | number)[] | null,
>   sourceDisk?: string | null,
>   id?: string | number | null,
>   name?: string | null,
>   sourceType?: string | null,
>   labels?: Record<string, string> | null,
>   guestOsFeatures?: {
>     type?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   code?: string | null
> } | null
> ```

***

### images.patch

`compute.images.patch`

Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.images.patch({ image: 'debian-12', project: 'demo-project', description: 'Managed by Corsair' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `image` | `string` | Yes | Name of the image resource to patch. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `storageLocations` | `string[]` | No | Cloud Storage bucket storage location of the image (regional or multi-regional). |
| `sourceImage` | `string` | No | URL of the source image used to create this image. The following are valid formats for the URL: - [https://www.googleapis.com/compute/v1/projects/project\_id/global/](https://www.googleapis.com/compute/v1/projects/project_id/global/) images/image\_name - projects/project\_id/global/images/image\_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `archiveSizeBytes` | `string \| number` | No | Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an image. (base64) |
| `rawDisk` | `object` | No | The parameters of the raw disk image. |
| `sourceImageEncryptionKey` | `object` | No | — |
| `licenses` | `string[]` | No | Any applicable license URI. |
| `diskSizeGb` | `string \| number` | No | Size of the image when restored onto a persistent disk (in GB). |
| `params` | `object` | No | Additional image params. |
| `architecture` | `ARCHITECTURE_UNSPECIFIED \| ARM64 \| X86_64` | No | The architecture of the image. Valid values are ARM64 or X86\_64. |
| `sourceSnapshot` | `string` | No | URL of the source snapshot used to create this image. The following are valid formats for the URL: - [https://www.googleapis.com/compute/v1/projects/project\_id/global/](https://www.googleapis.com/compute/v1/projects/project_id/global/) snapshots/snapshot\_name - projects/project\_id/global/snapshots/snapshot\_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `sourceSnapshotEncryptionKey` | `object` | No | — |
| `sourceDiskEncryptionKey` | `object` | No | — |
| `shieldedInstanceInitialState` | `object` | No | Initial State for shielded instance, these are public keys which are safe to store in public |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `family` | `string` | No | The name of the image family to which this image belongs. The image family name can be from a publicly managed image family provided by Compute Engine, or from a custom image family you create. For example,centos-stream-9 is a publicly available image family. For more information, see Image family best practices. When creating disks, you can specify 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. |
| `imageEncryptionKey` | `object` | No | — |
| `licenseCodes` | `(string \| number)[]` | No | Integer license codes indicating which licenses are attached to this image. |
| `sourceDisk` | `string` | No | URL of the source disk used to create this image. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk](https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk) - projects/project/zones/zone/disks/disk - zones/zone/disks/disk In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL |
| `name` | `string` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `sourceType` | `RAW` | No | The type of the image used to create this disk. The default and only valid value is RAW. |
| `labels` | `Record<string, string>` | No | Labels to apply to this image. These can be later modified by the setLabels method. |
| `guestOsFeatures` | `object[]` | No | A list of features to enable on the guest operating system. Applicable only for bootable images. To see a list of available options, see theguestOSfeatures\[].type parameter. |

> [accordion] rawDisk full type
>
> ```ts theme={null}
> {
>   sha1Checksum?: string,
>   source?: string,
>   containerType?: TAR
> }
> ```

> [accordion] sourceImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] sourceSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] sourceDiskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] shieldedInstanceInitialState full type
>
> ```ts theme={null}
> {
>   keks?: {
>     fileType?: BIN | UNDEFINED | X509,
>     content?: string
>   }[],
>   dbs?: {
>     fileType?: BIN | UNDEFINED | X509,
>     content?: string
>   }[],
>   dbxs?: {
>     fileType?: BIN | UNDEFINED | X509,
>     content?: string
>   }[],
>   pk?: {
>     fileType?: BIN | UNDEFINED | X509,
>     content?: string
>   }
> }
> ```

> [accordion] imageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] guestOsFeatures full type
>
> ```ts theme={null}
> {
>   type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### images.setIamPolicy

`compute.images.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.images.setIamPolicy({
	resource: 'debian-12',
	project: 'demo-project',
	policy: {
		bindings: [{
			role: 'roles/compute.imageUser',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `etag` | `string` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. (base64) |
| `bindings` | `object[]` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: ADMIN_READ | DATA_READ | DATA_WRITE | LOG_TYPE_UNSPECIFIED,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   bindings?: {
>     role?: string,
>     members?: string[],
>     condition?: {
>       title?: string,
>       description?: string,
>       expression?: string,
>       location?: string
>     }
>   }[],
>   etag?: string
> }
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string,
>   members?: string[],
>   condition?: {
>     title?: string,
>     description?: string,
>     expression?: string,
>     location?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### images.setLabels

`compute.images.setLabels`

Sets the labels on an image. To learn more about labels, read theLabeling Resources documentation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.images.setLabels({
	resource: 'debian-12',
	project: 'demo-project',
	labels: { env: 'prod' },
	labelFingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint. (base64) |
| `labels` | `Record<string, string>` | No | A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example,"webserver-frontend": "images". A label value can also be empty (e.g. "my-label": ""). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### images.testIamPermissions

`compute.images.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.images.testIamPermissions({
	project: 'demo-project',
	resource: 'debian-12',
	permissions: ['compute.images.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### instanceGroupManagers.abandonInstances

`compute.instanceGroupManagers.abandonInstances`

Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.abandonInstances({
	zone: 'us-central1-a',
	project: 'demo-project',
	instanceGroupManager: 'web-mig',
	instances: ['projects/demo-project/zones/us-central1-a/instances/web-1'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `instances` | `string[]` | No | The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/\[ZONE]/instances/\[INSTANCE\_NAME]. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.aggregatedList

`compute.instanceGroupManagers.aggregatedList`

Retrieves the list of managed instance groups and groups them by zone. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `maxResults` | `number` | No | 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`) |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | Output only. Unique identifier for the resource; defined by the server. |
| `unreachables` | `string[] \| null` | No | Output only. Unreachable resources. |
| `kind` | `string \| null` | No | Output only. The resource type, which is alwayscompute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups. |
| `selfLink` | `string \| null` | No | Output only. Server-defined URL for this resource. |
| `items` | `object \| null` | No | A list of InstanceGroupManagersScopedList resources. |
| `warning` | `object \| null` | No | Output only. Informational warning message. |
| `nextPageToken` | `string \| null` | No | Output only. This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   instanceGroupManagers?: {
>     name?: string | null,
>     creationTimestamp?: string | null,
>     statefulPolicy?: {
>       preservedState?: {
>         internalIPs?: Record<string, {
>           autoDelete?: string | null
>         }> | null,
>         disks?: Record<string, {
>           autoDelete?: string | null
>         }> | null,
>         externalIPs?: Record<string, {
>           autoDelete?: string | null
>         }> | null
>       } | null
>     } | null,
>     standbyPolicy?: {
>       mode?: string | null,
>       initialDelaySec?: number | null
>     } | null,
>     status?: {
>       appliedAcceleratorTopologies?: {
>         stateDetails?: {
>           timestamp?: string | null,
>           error?: {
>             errors?: {
>               message?: string | null,
>               errorDetails?: {
>                 errorInfo?: {
>                   domain?: string | null,
>                   metadatas?: Record<string, string> | null,
>                   reason?: string | null
>                 } | null,
>                 quotaInfo?: {
>                   rolloutStatus?: string | null,
>                   dimensions?: Record<string, string> | null,
>                   limit?: number | null,
>                   metricName?: string | null,
>                   futureLimit?: number | null,
>                   limitName?: string | null
>                 } | null,
>                 help?: {
>                   links?: {
>                     description?: string | null,
>                     url?: string | null
>                   }[] | null
>                 } | null,
>                 localizedMessage?: {
>                   locale?: string | null,
>                   message?: string | null
>                 } | null
>               }[] | null,
>               location?: string | null,
>               code?: string | null
>             }[] | null
>           } | null
>         } | null,
>         acceleratorTopology?: string | null,
>         state?: string | null
>       }[] | null,
>       currentInstanceStatuses?: {
>         provisioning?: number | null,
>         nonExistent?: number | null,
>         suspended?: number | null,
>         repairing?: number | null,
>         running?: number | null,
>         pending?: number | null,
>         suspending?: number | null,
>         deprovisioning?: number | null,
>         stopping?: number | null,
>         terminated?: number | null,
>         pendingStop?: number | null,
>         staging?: number | null,
>         stopped?: number | null
>       } | null,
>       allInstancesConfig?: {
>         effective?: boolean | null,
>         currentRevision?: string | null
>       } | null,
>       isStable?: boolean | null,
>       autoscaler?: string | null,
>       versionTarget?: {
>         isReached?: boolean | null
>       } | null,
>       bulkInstanceOperation?: {
>         lastProgressCheck?: {
>           error?: {
>             errors?: {
>               code?: string | null,
>               location?: string | null,
>               errorDetails?: {
>                 errorInfo?: {
>                   domain?: string | null,
>                   metadatas?: Record<string, string> | null,
>                   reason?: string | null
>                 } | null,
>                 help?: {
>                   links?: {
>                     description?: string | null,
>                     url?: string | null
>                   }[] | null
>                 } | null,
>                 quotaInfo?: {
>                   rolloutStatus?: string | null,
>                   dimensions?: Record<string, string> | null,
>                   limit?: number | null,
>                   metricName?: string | null,
>                   futureLimit?: number | null,
>                   limitName?: string | null
>                 } | null,
>                 localizedMessage?: {
>                   locale?: string | null,
>                   message?: string | null
>                 } | null
>               }[] | null,
>               message?: string | null
>             }[] | null
>           } | null,
>           timestamp?: string | null
>         } | null,
>         inProgress?: boolean | null
>       } | null,
>       stateful?: {
>         perInstanceConfigs?: {
>           allEffective?: boolean | null
>         } | null,
>         hasStatefulConfig?: boolean | null
>       } | null
>     } | null,
>     targetSizePolicy?: {
>       mode?: string | null
>     } | null,
>     versions?: {
>       name?: string | null,
>       instanceTemplate?: string | null,
>       targetSize?: {
>         calculated?: number | null,
>         fixed?: number | null,
>         percent?: number | null
>       } | null
>     }[] | null,
>     fingerprint?: string | null,
>     distributionPolicy?: {
>       zones?: {
>         zone?: string | null
>       }[] | null,
>       targetShape?: string | null
>     } | null,
>     allInstancesConfig?: {
>       properties?: {
>         exposeHostTopology?: boolean | null,
>         metadata?: Record<string, string> | null,
>         labels?: Record<string, string> | null
>       } | null
>     } | null,
>     instanceGroup?: string | null,
>     listManagedInstancesResults?: string | null,
>     targetStoppedSize?: number | null,
>     instanceLifecyclePolicy?: {
>       forceUpdateOnRepair?: string | null,
>       defaultActionOnFailure?: string | null,
>       onFailedHealthCheck?: string | null,
>       onRepair?: {
>         allowChangingZone?: string | null
>       } | null
>     } | null,
>     namedPorts?: {
>       name?: string | null,
>       port?: number | null
>     }[] | null,
>     targetPools?: string[] | null,
>     description?: string | null,
>     satisfiesPzs?: boolean | null,
>     autoHealingPolicies?: {
>       healthCheck?: string | null,
>       initialDelaySec?: number | null
>     }[] | null,
>     instanceFlexibilityPolicy?: {
>       instanceSelections?: Record<string, {
>         minCpuPlatform?: string | null,
>         disks?: {
>           forceAttach?: boolean | null,
>           index?: number | null,
>           savedState?: string | null,
>           deviceName?: string | null,
>           mode?: string | null,
>           source?: string | null,
>           shieldedInstanceInitialState?: {
>             keks?: {
>               fileType?: string | null,
>               content?: string | null
>             }[] | null,
>             dbs?: {
>               fileType?: string | null,
>               content?: string | null
>             }[] | null,
>             dbxs?: {
>               fileType?: string | null,
>               content?: string | null
>             }[] | null,
>             pk?: {
>               fileType?: string | null,
>               content?: string | null
>             } | null
>           } | null,
>           licenses?: string[] | null,
>           architecture?: string | null,
>           initializeParams?: {
>             resourceManagerTags?: Record<string, string> | null,
>             licenses?: string[] | null,
>             replicaZones?: string[] | null,
>             provisionedThroughput?: string | number | null,
>             sourceSnapshotEncryptionKey?: {
>               rawKey?: string | null,
>               rsaEncryptedKey?: string | null,
>               kmsKeyName?: string | null,
>               sha256?: string | null,
>               kmsKeyServiceAccount?: string | null
>             } | null,
>             sourceImageEncryptionKey?: {
>               rawKey?: string | null,
>               rsaEncryptedKey?: string | null,
>               kmsKeyName?: string | null,
>               sha256?: string | null,
>               kmsKeyServiceAccount?: string | null
>             } | null,
>             sourceSnapshot?: string | null,
>             diskType?: string | null,
>             architecture?: string | null,
>             diskName?: string | null,
>             provisionedIops?: string | number | null,
>             storagePool?: string | null,
>             diskSizeGb?: string | number | null,
>             description?: string | null,
>             sourceImage?: string | null,
>             onUpdateAction?: string | null,
>             labels?: Record<string, string> | null,
>             enableConfidentialCompute?: boolean | null,
>             resourcePolicies?: string[] | null
>           } | null,
>           autoDelete?: boolean | null,
>           guestOsFeatures?: {
>             type?: string | null
>           }[] | null,
>           type?: string | null,
>           interface?: string | null,
>           kind?: string | null,
>           boot?: boolean | null,
>           diskEncryptionKey?: {
>             rawKey?: string | null,
>             rsaEncryptedKey?: string | null,
>             kmsKeyName?: string | null,
>             sha256?: string | null,
>             kmsKeyServiceAccount?: string | null
>           } | null,
>           diskSizeGb?: string | number | null
>         }[] | null,
>         rank?: number | null,
>         machineTypes?: string[] | null
>       }> | null
>     } | null,
>     kind?: string | null,
>     baseInstanceName?: string | null,
>     targetSize?: number | null,
>     satisfiesPzi?: boolean | null,
>     region?: string | null,
>     targetSuspendedSize?: number | null,
>     instanceTemplate?: string | null,
>     zone?: string | null,
>     updatePolicy?: {
>       instanceRedistributionType?: string | null,
>       minimalAction?: string | null,
>       replacementMethod?: string | null,
>       maxSurge?: {
>         calculated?: number | null,
>         fixed?: number | null,
>         percent?: number | null
>       } | null,
>       type?: string | null,
>       maxUnavailable?: {
>         calculated?: number | null,
>         fixed?: number | null,
>         percent?: number | null
>       } | null,
>       mostDisruptiveAllowedAction?: string | null
>     } | null,
>     currentActions?: {
>       stopping?: number | null,
>       starting?: number | null,
>       refreshing?: number | null,
>       verifying?: number | null,
>       resuming?: number | null,
>       recreating?: number | null,
>       suspending?: number | null,
>       creating?: number | null,
>       restarting?: number | null,
>       creatingWithoutRetries?: number | null,
>       abandoning?: number | null,
>       none?: number | null,
>       deleting?: number | null
>     } | null,
>     id?: string | number | null,
>     resourcePolicies?: {
>       workloadPolicy?: string | null
>     } | null,
>     selfLink?: string | null
>   }[] | null,
>   warning?: {
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     code?: string | null,
>     message?: string | null
>   } | null
> }> | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

***

### instanceGroupManagers.applyUpdatesToInstances

`compute.instanceGroupManagers.applyUpdatesToInstances`

Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.applyUpdatesToInstances({
	zone: 'us-central1-a',
	instanceGroupManager: 'web-mig',
	project: 'demo-project',
	instances: ['projects/demo-project/zones/us-central1-a/instances/web-1'],
	minimalAction: 'REFRESH',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. Should conform to RFC1035. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group, should conform to RFC1035. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `allInstances` | `boolean` | No | Flag to update all instances instead of specified list of "instances". If the flag is set to true then the instances may not be specified in the request. |
| `minimalAction` | `NONE \| REFRESH \| REPLACE \| RESTART` | No | The minimal action that you want to perform on each instance during the update: - REPLACE: At minimum, delete the instance and create it again. - RESTART: Stop the instance and start it again. - REFRESH: Do not stop the instance and limit disruption as much as possible. - NONE: Do not disrupt the instance at all. By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update. |
| `instances` | `string[]` | No | The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial URL, such aszones/\[ZONE]/instances/\[INSTANCE\_NAME]. |
| `mostDisruptiveAllowedAction` | `NONE \| REFRESH \| REPLACE \| RESTART` | No | The most disruptive action that you want to perform on each instance during the update: - REPLACE: Delete the instance and create it again. - RESTART: Stop the instance and start it again. - REFRESH: Do not stop the instance and limit disruption as much as possible. - NONE: Do not disrupt the instance at all. By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with this flag, the update request will fail. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.createInstances

`compute.instanceGroupManagers.createInstances`

Creates instances with per-instance configurations in this managed instance group. Instances are created using the current instance template

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.createInstances({
	project: 'demo-project',
	instanceGroupManager: 'web-mig',
	zone: 'us-central1-a',
	instances: [{ name: 'web-3' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. It should conform to RFC1035. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. It should conform to RFC1035. |
| `instances` | `object[]` | No | \[Required] List of specifications of per-instance configs. |

> [accordion] instances full type
>
> ```ts theme={null}
> {
>   preservedState?: {
>     externalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION,
>       ipAddress?: {
>         literal?: string,
>         address?: string
>       }
>     }>,
>     metadata?: Record<string, string>,
>     internalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION,
>       ipAddress?: {
>         literal?: string,
>         address?: string
>       }
>     }>,
>     disks?: Record<string, {
>       mode?: READ_ONLY | READ_WRITE,
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION,
>       source?: string
>     }>
>   },
>   fingerprint?: string,
>   status?: APPLYING | DELETING | EFFECTIVE | NONE | UNAPPLIED | UNAPPLIED_DELETION,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.delete

`compute.instanceGroupManagers.delete`

Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.delete({ zone: 'us-central1-a', project: 'demo-project', instanceGroupManager: 'web-mig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noGracefulShutdown` | `boolean` | No | When set, graceful shutdown is skipped for instance deletion even if it's configured for the instances. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group to delete. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.deleteInstances

`compute.instanceGroupManagers.deleteInstances`

Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.deleteInstances({
	zone: 'us-central1-a',
	project: 'demo-project',
	instanceGroupManager: 'web-mig',
	instances: ['projects/demo-project/zones/us-central1-a/instances/web-1'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `noGracefulShutdown` | `boolean` | No | When set, graceful shutdown is skipped for instance deletion even if it's configured for the instances. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `instances` | `string[]` | No | The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/\[ZONE]/instances/\[INSTANCE\_NAME]. Queued instances do not have URL and can be deleted only by name. One cannot specify both URLs and names in a single request. |
| `skipInstancesOnValidationError` | `boolean` | No | Specifies whether the request should proceed despite the inclusion of instances that are not members of the group or that are already in the process of being deleted or abandoned. If this field is set to `false` and such an instance is specified in the request, the operation fails. The operation always fails if the request contains a malformed instance URL or a reference to an instance that exists in a zone or region other than the group's zone or region. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.deletePerInstanceConfigs

`compute.instanceGroupManagers.deletePerInstanceConfigs`

Deletes selected per-instance configurations for the managed instance group

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.deletePerInstanceConfigs({
	zone: 'us-central1-a',
	instanceGroupManager: 'web-mig',
	project: 'demo-project',
	names: ['web-3'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. It should conform to RFC1035. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. It should conform to RFC1035. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `names` | `string[]` | No | The list of instance names for which we want to delete per-instance configs on this managed instance group. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.get

`compute.instanceGroupManagers.get`

Returns all of the details about the specified managed instance group

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.get({ instanceGroupManager: 'web-mig', project: 'demo-project', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The name of the managed instance group. The name must be 1-63 characters long, and comply withRFC1035. |
| `creationTimestamp` | `string \| null` | No | Output only. The creation timestamp for this managed instance group inRFC3339 text format. |
| `statefulPolicy` | `object \| null` | No | — |
| `standbyPolicy` | `object \| null` | No | — |
| `status` | `object \| null` | No | — |
| `targetSizePolicy` | `object \| null` | No | — |
| `versions` | `object[] \| null` | No | Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and aname. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about therelationships between these fields. Exactly one version must leave thetargetSize field unset. That version will be applied to all remaining instances. For more information, read aboutcanary updates. |
| `fingerprint` | `string \| null` | No | Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager. (base64) |
| `distributionPolicy` | `object \| null` | No | — |
| `allInstancesConfig` | `object \| null` | No | — |
| `instanceGroup` | `string \| null` | No | Output only. The URL of the Instance Group resource. |
| `listManagedInstancesResults` | `string \| null` | No | Pagination behavior of the listManagedInstances API method for this managed instance group. |
| `targetStoppedSize` | `number \| null` | No | The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method. |
| `instanceLifecyclePolicy` | `object \| null` | No | — |
| `namedPorts` | `object[] \| null` | No | \[Output Only] Named ports configured on the Instance Groups complementary to this Instance Group Manager. |
| `targetPools` | `string[] \| null` | No | The URLs for all TargetPool resources to which instances in theinstanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. |
| `description` | `string \| null` | No | An optional description of this resource. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `autoHealingPolicies` | `object[] \| null` | No | The autohealing policy for this managed instance group. You can specify only one value. |
| `instanceFlexibilityPolicy` | `object \| null` | No | — |
| `kind` | `string \| null` | No | Output only. The resource type, which is alwayscompute#instanceGroupManager for managed instance groups. |
| `baseInstanceName` | `string \| null` | No | The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. The maximum character length is 58 and the name must comply with RFC1035 format. When a VM is created in the group, the MIG appends a hyphen and a random four-character string to the base instance name. If you want the MIG to assign sequential numbers instead of a random string, then end the base instance name with a hyphen followed by one or more hash symbols. The hash symbols indicate the number of digits. For example, a base instance name of "vm-###" results in "vm-001" as a VM name. |
| `targetSize` | `number \| null` | No | The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. Reserved for future use. |
| `region` | `string \| null` | No | Output only. \[Output Only] The URL of theregion where the managed instance group resides (for regional resources). |
| `targetSuspendedSize` | `number \| null` | No | The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method. |
| `instanceTemplate` | `string \| null` | No | The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE. |
| `zone` | `string \| null` | No | Output only. The URL of azone where the managed instance group is located (for zonal resources). |
| `updatePolicy` | `object \| null` | No | — |
| `currentActions` | `object \| null` | No | — |
| `id` | `string \| number \| null` | No | Output only. A unique identifier for this resource type. The server generates this identifier. |
| `resourcePolicies` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | Output only. The URL for this managed instance group. The server defines this URL. |

> [accordion] statefulPolicy full type
>
> ```ts theme={null}
> {
>   preservedState?: {
>     internalIPs?: Record<string, {
>       autoDelete?: string | null
>     }> | null,
>     disks?: Record<string, {
>       autoDelete?: string | null
>     }> | null,
>     externalIPs?: Record<string, {
>       autoDelete?: string | null
>     }> | null
>   } | null
> } | null
> ```

> [accordion] standbyPolicy full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   initialDelaySec?: number | null
> } | null
> ```

> [accordion] status full type
>
> ```ts theme={null}
> {
>   appliedAcceleratorTopologies?: {
>     stateDetails?: {
>       timestamp?: string | null,
>       error?: {
>         errors?: {
>           message?: string | null,
>           errorDetails?: {
>             errorInfo?: {
>               domain?: string | null,
>               metadatas?: Record<string, string> | null,
>               reason?: string | null
>             } | null,
>             quotaInfo?: {
>               rolloutStatus?: string | null,
>               dimensions?: Record<string, string> | null,
>               limit?: number | null,
>               metricName?: string | null,
>               futureLimit?: number | null,
>               limitName?: string | null
>             } | null,
>             help?: {
>               links?: {
>                 description?: string | null,
>                 url?: string | null
>               }[] | null
>             } | null,
>             localizedMessage?: {
>               locale?: string | null,
>               message?: string | null
>             } | null
>           }[] | null,
>           location?: string | null,
>           code?: string | null
>         }[] | null
>       } | null
>     } | null,
>     acceleratorTopology?: string | null,
>     state?: string | null
>   }[] | null,
>   currentInstanceStatuses?: {
>     provisioning?: number | null,
>     nonExistent?: number | null,
>     suspended?: number | null,
>     repairing?: number | null,
>     running?: number | null,
>     pending?: number | null,
>     suspending?: number | null,
>     deprovisioning?: number | null,
>     stopping?: number | null,
>     terminated?: number | null,
>     pendingStop?: number | null,
>     staging?: number | null,
>     stopped?: number | null
>   } | null,
>   allInstancesConfig?: {
>     effective?: boolean | null,
>     currentRevision?: string | null
>   } | null,
>   isStable?: boolean | null,
>   autoscaler?: string | null,
>   versionTarget?: {
>     isReached?: boolean | null
>   } | null,
>   bulkInstanceOperation?: {
>     lastProgressCheck?: {
>       error?: {
>         errors?: {
>           code?: string | null,
>           location?: string | null,
>           errorDetails?: {
>             errorInfo?: {
>               domain?: string | null,
>               metadatas?: Record<string, string> | null,
>               reason?: string | null
>             } | null,
>             help?: {
>               links?: {
>                 description?: string | null,
>                 url?: string | null
>               }[] | null
>             } | null,
>             quotaInfo?: {
>               rolloutStatus?: string | null,
>               dimensions?: Record<string, string> | null,
>               limit?: number | null,
>               metricName?: string | null,
>               futureLimit?: number | null,
>               limitName?: string | null
>             } | null,
>             localizedMessage?: {
>               locale?: string | null,
>               message?: string | null
>             } | null
>           }[] | null,
>           message?: string | null
>         }[] | null
>       } | null,
>       timestamp?: string | null
>     } | null,
>     inProgress?: boolean | null
>   } | null,
>   stateful?: {
>     perInstanceConfigs?: {
>       allEffective?: boolean | null
>     } | null,
>     hasStatefulConfig?: boolean | null
>   } | null
> } | null
> ```

> [accordion] targetSizePolicy full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] versions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   instanceTemplate?: string | null,
>   targetSize?: {
>     calculated?: number | null,
>     fixed?: number | null,
>     percent?: number | null
>   } | null
> }[] | null
> ```

> [accordion] distributionPolicy full type
>
> ```ts theme={null}
> {
>   zones?: {
>     zone?: string | null
>   }[] | null,
>   targetShape?: string | null
> } | null
> ```

> [accordion] allInstancesConfig full type
>
> ```ts theme={null}
> {
>   properties?: {
>     exposeHostTopology?: boolean | null,
>     metadata?: Record<string, string> | null,
>     labels?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] instanceLifecyclePolicy full type
>
> ```ts theme={null}
> {
>   forceUpdateOnRepair?: string | null,
>   defaultActionOnFailure?: string | null,
>   onFailedHealthCheck?: string | null,
>   onRepair?: {
>     allowChangingZone?: string | null
>   } | null
> } | null
> ```

> [accordion] namedPorts full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   port?: number | null
> }[] | null
> ```

> [accordion] autoHealingPolicies full type
>
> ```ts theme={null}
> {
>   healthCheck?: string | null,
>   initialDelaySec?: number | null
> }[] | null
> ```

> [accordion] instanceFlexibilityPolicy full type
>
> ```ts theme={null}
> {
>   instanceSelections?: Record<string, {
>     minCpuPlatform?: string | null,
>     disks?: {
>       forceAttach?: boolean | null,
>       index?: number | null,
>       savedState?: string | null,
>       deviceName?: string | null,
>       mode?: string | null,
>       source?: string | null,
>       shieldedInstanceInitialState?: {
>         keks?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbxs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         pk?: {
>           fileType?: string | null,
>           content?: string | null
>         } | null
>       } | null,
>       licenses?: string[] | null,
>       architecture?: string | null,
>       initializeParams?: {
>         resourceManagerTags?: Record<string, string> | null,
>         licenses?: string[] | null,
>         replicaZones?: string[] | null,
>         provisionedThroughput?: string | number | null,
>         sourceSnapshotEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceImageEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceSnapshot?: string | null,
>         diskType?: string | null,
>         architecture?: string | null,
>         diskName?: string | null,
>         provisionedIops?: string | number | null,
>         storagePool?: string | null,
>         diskSizeGb?: string | number | null,
>         description?: string | null,
>         sourceImage?: string | null,
>         onUpdateAction?: string | null,
>         labels?: Record<string, string> | null,
>         enableConfidentialCompute?: boolean | null,
>         resourcePolicies?: string[] | null
>       } | null,
>       autoDelete?: boolean | null,
>       guestOsFeatures?: {
>         type?: string | null
>       }[] | null,
>       type?: string | null,
>       interface?: string | null,
>       kind?: string | null,
>       boot?: boolean | null,
>       diskEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       diskSizeGb?: string | number | null
>     }[] | null,
>     rank?: number | null,
>     machineTypes?: string[] | null
>   }> | null
> } | null
> ```

> [accordion] updatePolicy full type
>
> ```ts theme={null}
> {
>   instanceRedistributionType?: string | null,
>   minimalAction?: string | null,
>   replacementMethod?: string | null,
>   maxSurge?: {
>     calculated?: number | null,
>     fixed?: number | null,
>     percent?: number | null
>   } | null,
>   type?: string | null,
>   maxUnavailable?: {
>     calculated?: number | null,
>     fixed?: number | null,
>     percent?: number | null
>   } | null,
>   mostDisruptiveAllowedAction?: string | null
> } | null
> ```

> [accordion] currentActions full type
>
> ```ts theme={null}
> {
>   stopping?: number | null,
>   starting?: number | null,
>   refreshing?: number | null,
>   verifying?: number | null,
>   resuming?: number | null,
>   recreating?: number | null,
>   suspending?: number | null,
>   creating?: number | null,
>   restarting?: number | null,
>   creatingWithoutRetries?: number | null,
>   abandoning?: number | null,
>   none?: number | null,
>   deleting?: number | null
> } | null
> ```

> [accordion] resourcePolicies full type
>
> ```ts theme={null}
> {
>   workloadPolicy?: string | null
> } | null
> ```

***

### instanceGroupManagers.insert

`compute.instanceGroupManagers.insert`

Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.insert({
	project: 'demo-project',
	zone: 'us-central1-a',
	name: 'web-mig',
	baseInstanceName: 'web',
	targetSize: 2,
	versions: [{ instanceTemplate: 'projects/demo-project/global/instanceTemplates/web-template' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone where you want to create the managed instance group. |
| `name` | `string` | No | The name of the managed instance group. The name must be 1-63 characters long, and comply withRFC1035. |
| `statefulPolicy` | `object` | No | — |
| `standbyPolicy` | `object` | No | — |
| `targetSizePolicy` | `object` | No | — |
| `versions` | `object[]` | No | Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and aname. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about therelationships between these fields. Exactly one version must leave thetargetSize field unset. That version will be applied to all remaining instances. For more information, read aboutcanary updates. |
| `fingerprint` | `string` | No | Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager. (base64) |
| `distributionPolicy` | `object` | No | — |
| `allInstancesConfig` | `object` | No | — |
| `listManagedInstancesResults` | `PAGELESS \| PAGINATED` | No | Pagination behavior of the listManagedInstances API method for this managed instance group. |
| `targetStoppedSize` | `number` | No | The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method. |
| `instanceLifecyclePolicy` | `object` | No | — |
| `namedPorts` | `object[]` | No | \[Output Only] Named ports configured on the Instance Groups complementary to this Instance Group Manager. |
| `targetPools` | `string[]` | No | The URLs for all TargetPool resources to which instances in theinstanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. |
| `description` | `string` | No | An optional description of this resource. |
| `autoHealingPolicies` | `object[]` | No | The autohealing policy for this managed instance group. You can specify only one value. |
| `instanceFlexibilityPolicy` | `object` | No | — |
| `baseInstanceName` | `string` | No | The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. The maximum character length is 58 and the name must comply with RFC1035 format. When a VM is created in the group, the MIG appends a hyphen and a random four-character string to the base instance name. If you want the MIG to assign sequential numbers instead of a random string, then end the base instance name with a hyphen followed by one or more hash symbols. The hash symbols indicate the number of digits. For example, a base instance name of "vm-###" results in "vm-001" as a VM name. |
| `targetSize` | `number` | No | The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number. |
| `targetSuspendedSize` | `number` | No | The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method. |
| `instanceTemplate` | `string` | No | The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE. |
| `updatePolicy` | `object` | No | — |
| `resourcePolicies` | `object` | No | — |

> [accordion] statefulPolicy full type
>
> ```ts theme={null}
> {
>   preservedState?: {
>     internalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION
>     }>,
>     disks?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION
>     }>,
>     externalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION
>     }>
>   }
> }
> ```

> [accordion] standbyPolicy full type
>
> ```ts theme={null}
> {
>   mode?: MANUAL | SCALE_OUT_POOL,
>   initialDelaySec?: number
> }
> ```

> [accordion] targetSizePolicy full type
>
> ```ts theme={null}
> {
>   mode?: BULK | INDIVIDUAL | UNSPECIFIED_MODE
> }
> ```

> [accordion] versions full type
>
> ```ts theme={null}
> {
>   name?: string,
>   instanceTemplate?: string,
>   targetSize?: {
>     fixed?: number,
>     percent?: number
>   }
> }[]
> ```

> [accordion] distributionPolicy full type
>
> ```ts theme={null}
> {
>   zones?: {
>     zone?: string
>   }[],
>   targetShape?: ANY | ANY_SINGLE_ZONE | BALANCED | EVEN
> }
> ```

> [accordion] allInstancesConfig full type
>
> ```ts theme={null}
> {
>   properties?: {
>     exposeHostTopology?: boolean,
>     metadata?: Record<string, string>,
>     labels?: Record<string, string>
>   }
> }
> ```

> [accordion] instanceLifecyclePolicy full type
>
> ```ts theme={null}
> {
>   forceUpdateOnRepair?: NO | YES,
>   defaultActionOnFailure?: DO_NOTHING | REPAIR,
>   onFailedHealthCheck?: DEFAULT_ACTION | DO_NOTHING | REPAIR,
>   onRepair?: {
>     allowChangingZone?: NO | YES
>   }
> }
> ```

> [accordion] namedPorts full type
>
> ```ts theme={null}
> {
>   name?: string,
>   port?: number
> }[]
> ```

> [accordion] autoHealingPolicies full type
>
> ```ts theme={null}
> {
>   healthCheck?: string,
>   initialDelaySec?: number
> }[]
> ```

> [accordion] instanceFlexibilityPolicy full type
>
> ```ts theme={null}
> {
>   instanceSelections?: Record<string, {
>     minCpuPlatform?: string,
>     disks?: {
>       forceAttach?: boolean,
>       deviceName?: string,
>       mode?: READ_ONLY | READ_WRITE,
>       source?: string,
>       initializeParams?: {
>         resourceManagerTags?: Record<string, string>,
>         licenses?: string[],
>         replicaZones?: string[],
>         provisionedThroughput?: string | number,
>         sourceSnapshotEncryptionKey?: {
>           rawKey?: string,
>           rsaEncryptedKey?: string,
>           kmsKeyName?: string,
>           sha256?: string,
>           kmsKeyServiceAccount?: string
>         },
>         sourceImageEncryptionKey?: {
>           rawKey?: string,
>           rsaEncryptedKey?: string,
>           kmsKeyName?: string,
>           sha256?: string,
>           kmsKeyServiceAccount?: string
>         },
>         sourceSnapshot?: string,
>         diskType?: string,
>         architecture?: ARCHITECTURE_UNSPECIFIED | ARM64 | X86_64,
>         diskName?: string,
>         provisionedIops?: string | number,
>         storagePool?: string,
>         diskSizeGb?: string | number,
>         description?: string,
>         sourceImage?: string,
>         onUpdateAction?: RECREATE_DISK | RECREATE_DISK_IF_SOURCE_CHANGED | USE_EXISTING_DISK,
>         labels?: Record<string, string>,
>         enableConfidentialCompute?: boolean,
>         resourcePolicies?: string[]
>       },
>       autoDelete?: boolean,
>       guestOsFeatures?: {
>         type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
>       }[],
>       type?: PERSISTENT | SCRATCH,
>       interface?: NVME | SCSI,
>       boot?: boolean,
>       diskEncryptionKey?: {
>         rawKey?: string,
>         rsaEncryptedKey?: string,
>         kmsKeyName?: string,
>         sha256?: string,
>         kmsKeyServiceAccount?: string
>       },
>       diskSizeGb?: string | number
>     }[],
>     rank?: number,
>     machineTypes?: string[]
>   }>
> }
> ```

> [accordion] updatePolicy full type
>
> ```ts theme={null}
> {
>   instanceRedistributionType?: NONE | PROACTIVE,
>   minimalAction?: NONE | REFRESH | REPLACE | RESTART,
>   replacementMethod?: RECREATE | SUBSTITUTE,
>   maxSurge?: {
>     fixed?: number,
>     percent?: number
>   },
>   type?: OPPORTUNISTIC | PROACTIVE,
>   maxUnavailable?: {
>     fixed?: number,
>     percent?: number
>   },
>   mostDisruptiveAllowedAction?: NONE | REFRESH | REPLACE | RESTART
> }
> ```

> [accordion] resourcePolicies full type
>
> ```ts theme={null}
> {
>   workloadPolicy?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.list

`compute.instanceGroupManagers.list`

Retrieves a list of managed instance groups that are contained within the specified project and zone (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.list({ zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `maxResults` | `number` | No | 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`) |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. Server-defined URL for this resource. |
| `warning` | `object \| null` | No | Output only. Informational warning message. |
| `items` | `object[] \| null` | No | A list of InstanceGroupManager resources. |
| `id` | `string \| null` | No | Output only. Unique identifier for the resource; defined by the server. |
| `kind` | `string \| null` | No | Output only. The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups. |
| `nextPageToken` | `string \| null` | No | Output only. This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   creationTimestamp?: string | null,
>   statefulPolicy?: {
>     preservedState?: {
>       internalIPs?: Record<string, {
>         autoDelete?: string | null
>       }> | null,
>       disks?: Record<string, {
>         autoDelete?: string | null
>       }> | null,
>       externalIPs?: Record<string, {
>         autoDelete?: string | null
>       }> | null
>     } | null
>   } | null,
>   standbyPolicy?: {
>     mode?: string | null,
>     initialDelaySec?: number | null
>   } | null,
>   status?: {
>     appliedAcceleratorTopologies?: {
>       stateDetails?: {
>         timestamp?: string | null,
>         error?: {
>           errors?: {
>             message?: string | null,
>             errorDetails?: {
>               errorInfo?: {
>                 domain?: string | null,
>                 metadatas?: Record<string, string> | null,
>                 reason?: string | null
>               } | null,
>               quotaInfo?: {
>                 rolloutStatus?: string | null,
>                 dimensions?: Record<string, string> | null,
>                 limit?: number | null,
>                 metricName?: string | null,
>                 futureLimit?: number | null,
>                 limitName?: string | null
>               } | null,
>               help?: {
>                 links?: {
>                   description?: string | null,
>                   url?: string | null
>                 }[] | null
>               } | null,
>               localizedMessage?: {
>                 locale?: string | null,
>                 message?: string | null
>               } | null
>             }[] | null,
>             location?: string | null,
>             code?: string | null
>           }[] | null
>         } | null
>       } | null,
>       acceleratorTopology?: string | null,
>       state?: string | null
>     }[] | null,
>     currentInstanceStatuses?: {
>       provisioning?: number | null,
>       nonExistent?: number | null,
>       suspended?: number | null,
>       repairing?: number | null,
>       running?: number | null,
>       pending?: number | null,
>       suspending?: number | null,
>       deprovisioning?: number | null,
>       stopping?: number | null,
>       terminated?: number | null,
>       pendingStop?: number | null,
>       staging?: number | null,
>       stopped?: number | null
>     } | null,
>     allInstancesConfig?: {
>       effective?: boolean | null,
>       currentRevision?: string | null
>     } | null,
>     isStable?: boolean | null,
>     autoscaler?: string | null,
>     versionTarget?: {
>       isReached?: boolean | null
>     } | null,
>     bulkInstanceOperation?: {
>       lastProgressCheck?: {
>         error?: {
>           errors?: {
>             code?: string | null,
>             location?: string | null,
>             errorDetails?: {
>               errorInfo?: {
>                 domain?: string | null,
>                 metadatas?: Record<string, string> | null,
>                 reason?: string | null
>               } | null,
>               help?: {
>                 links?: {
>                   description?: string | null,
>                   url?: string | null
>                 }[] | null
>               } | null,
>               quotaInfo?: {
>                 rolloutStatus?: string | null,
>                 dimensions?: Record<string, string> | null,
>                 limit?: number | null,
>                 metricName?: string | null,
>                 futureLimit?: number | null,
>                 limitName?: string | null
>               } | null,
>               localizedMessage?: {
>                 locale?: string | null,
>                 message?: string | null
>               } | null
>             }[] | null,
>             message?: string | null
>           }[] | null
>         } | null,
>         timestamp?: string | null
>       } | null,
>       inProgress?: boolean | null
>     } | null,
>     stateful?: {
>       perInstanceConfigs?: {
>         allEffective?: boolean | null
>       } | null,
>       hasStatefulConfig?: boolean | null
>     } | null
>   } | null,
>   targetSizePolicy?: {
>     mode?: string | null
>   } | null,
>   versions?: {
>     name?: string | null,
>     instanceTemplate?: string | null,
>     targetSize?: {
>       calculated?: number | null,
>       fixed?: number | null,
>       percent?: number | null
>     } | null
>   }[] | null,
>   fingerprint?: string | null,
>   distributionPolicy?: {
>     zones?: {
>       zone?: string | null
>     }[] | null,
>     targetShape?: string | null
>   } | null,
>   allInstancesConfig?: {
>     properties?: {
>       exposeHostTopology?: boolean | null,
>       metadata?: Record<string, string> | null,
>       labels?: Record<string, string> | null
>     } | null
>   } | null,
>   instanceGroup?: string | null,
>   listManagedInstancesResults?: string | null,
>   targetStoppedSize?: number | null,
>   instanceLifecyclePolicy?: {
>     forceUpdateOnRepair?: string | null,
>     defaultActionOnFailure?: string | null,
>     onFailedHealthCheck?: string | null,
>     onRepair?: {
>       allowChangingZone?: string | null
>     } | null
>   } | null,
>   namedPorts?: {
>     name?: string | null,
>     port?: number | null
>   }[] | null,
>   targetPools?: string[] | null,
>   description?: string | null,
>   satisfiesPzs?: boolean | null,
>   autoHealingPolicies?: {
>     healthCheck?: string | null,
>     initialDelaySec?: number | null
>   }[] | null,
>   instanceFlexibilityPolicy?: {
>     instanceSelections?: Record<string, {
>       minCpuPlatform?: string | null,
>       disks?: {
>         forceAttach?: boolean | null,
>         index?: number | null,
>         savedState?: string | null,
>         deviceName?: string | null,
>         mode?: string | null,
>         source?: string | null,
>         shieldedInstanceInitialState?: {
>           keks?: {
>             fileType?: string | null,
>             content?: string | null
>           }[] | null,
>           dbs?: {
>             fileType?: string | null,
>             content?: string | null
>           }[] | null,
>           dbxs?: {
>             fileType?: string | null,
>             content?: string | null
>           }[] | null,
>           pk?: {
>             fileType?: string | null,
>             content?: string | null
>           } | null
>         } | null,
>         licenses?: string[] | null,
>         architecture?: string | null,
>         initializeParams?: {
>           resourceManagerTags?: Record<string, string> | null,
>           licenses?: string[] | null,
>           replicaZones?: string[] | null,
>           provisionedThroughput?: string | number | null,
>           sourceSnapshotEncryptionKey?: {
>             rawKey?: string | null,
>             rsaEncryptedKey?: string | null,
>             kmsKeyName?: string | null,
>             sha256?: string | null,
>             kmsKeyServiceAccount?: string | null
>           } | null,
>           sourceImageEncryptionKey?: {
>             rawKey?: string | null,
>             rsaEncryptedKey?: string | null,
>             kmsKeyName?: string | null,
>             sha256?: string | null,
>             kmsKeyServiceAccount?: string | null
>           } | null,
>           sourceSnapshot?: string | null,
>           diskType?: string | null,
>           architecture?: string | null,
>           diskName?: string | null,
>           provisionedIops?: string | number | null,
>           storagePool?: string | null,
>           diskSizeGb?: string | number | null,
>           description?: string | null,
>           sourceImage?: string | null,
>           onUpdateAction?: string | null,
>           labels?: Record<string, string> | null,
>           enableConfidentialCompute?: boolean | null,
>           resourcePolicies?: string[] | null
>         } | null,
>         autoDelete?: boolean | null,
>         guestOsFeatures?: {
>           type?: string | null
>         }[] | null,
>         type?: string | null,
>         interface?: string | null,
>         kind?: string | null,
>         boot?: boolean | null,
>         diskEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         diskSizeGb?: string | number | null
>       }[] | null,
>       rank?: number | null,
>       machineTypes?: string[] | null
>     }> | null
>   } | null,
>   kind?: string | null,
>   baseInstanceName?: string | null,
>   targetSize?: number | null,
>   satisfiesPzi?: boolean | null,
>   region?: string | null,
>   targetSuspendedSize?: number | null,
>   instanceTemplate?: string | null,
>   zone?: string | null,
>   updatePolicy?: {
>     instanceRedistributionType?: string | null,
>     minimalAction?: string | null,
>     replacementMethod?: string | null,
>     maxSurge?: {
>       calculated?: number | null,
>       fixed?: number | null,
>       percent?: number | null
>     } | null,
>     type?: string | null,
>     maxUnavailable?: {
>       calculated?: number | null,
>       fixed?: number | null,
>       percent?: number | null
>     } | null,
>     mostDisruptiveAllowedAction?: string | null
>   } | null,
>   currentActions?: {
>     stopping?: number | null,
>     starting?: number | null,
>     refreshing?: number | null,
>     verifying?: number | null,
>     resuming?: number | null,
>     recreating?: number | null,
>     suspending?: number | null,
>     creating?: number | null,
>     restarting?: number | null,
>     creatingWithoutRetries?: number | null,
>     abandoning?: number | null,
>     none?: number | null,
>     deleting?: number | null
>   } | null,
>   id?: string | number | null,
>   resourcePolicies?: {
>     workloadPolicy?: string | null
>   } | null,
>   selfLink?: string | null
> }[] | null
> ```

***

### instanceGroupManagers.listErrors

`compute.instanceGroupManagers.listErrors`

Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.listErrors({ zone: 'us-central1-a', project: 'demo-project', instanceGroupManager: 'web-mig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. It should conform to RFC1035. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `maxResults` | `number` | No | 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`) |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:a-z?)\|1-9\{0,19}. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | Output only. The list of errors of the managed instance group. |
| `nextPageToken` | `string \| null` | No | Output only. This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults , then use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   timestamp?: string | null,
>   error?: {
>     code?: string | null,
>     message?: string | null
>   } | null,
>   instanceActionDetails?: {
>     instance?: string | null,
>     version?: {
>       instanceTemplate?: string | null,
>       name?: string | null
>     } | null,
>     action?: string | null
>   } | null
> }[] | null
> ```

***

### instanceGroupManagers.listManagedInstances

`compute.instanceGroupManagers.listManagedInstances`

Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.listManagedInstances({ instanceGroupManager: 'web-mig', zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `maxResults` | `number` | No | 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`) |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `managedInstances` | `object[] \| null` | No | Output only. \[Output Only] The list of instances in the managed instance group. |
| `nextPageToken` | `string \| null` | No | Output only. \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |

> [accordion] managedInstances full type
>
> ```ts theme={null}
> {
>   propertiesFromFlexibilityPolicy?: {
>     disks?: {
>       forceAttach?: boolean | null,
>       index?: number | null,
>       savedState?: string | null,
>       deviceName?: string | null,
>       mode?: string | null,
>       source?: string | null,
>       shieldedInstanceInitialState?: {
>         keks?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbxs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         pk?: {
>           fileType?: string | null,
>           content?: string | null
>         } | null
>       } | null,
>       licenses?: string[] | null,
>       architecture?: string | null,
>       initializeParams?: {
>         resourceManagerTags?: Record<string, string> | null,
>         licenses?: string[] | null,
>         replicaZones?: string[] | null,
>         provisionedThroughput?: string | number | null,
>         sourceSnapshotEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceImageEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceSnapshot?: string | null,
>         diskType?: string | null,
>         architecture?: string | null,
>         diskName?: string | null,
>         provisionedIops?: string | number | null,
>         storagePool?: string | null,
>         diskSizeGb?: string | number | null,
>         description?: string | null,
>         sourceImage?: string | null,
>         onUpdateAction?: string | null,
>         labels?: Record<string, string> | null,
>         enableConfidentialCompute?: boolean | null,
>         resourcePolicies?: string[] | null
>       } | null,
>       autoDelete?: boolean | null,
>       guestOsFeatures?: {
>         type?: string | null
>       }[] | null,
>       type?: string | null,
>       interface?: string | null,
>       kind?: string | null,
>       boot?: boolean | null,
>       diskEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       diskSizeGb?: string | number | null
>     }[] | null,
>     minCpuPlatform?: string | null,
>     machineType?: string | null
>   } | null,
>   scheduling?: {
>     terminationTimestamp?: string | null,
>     gracefulShutdownTimestamp?: string | null
>   } | null,
>   version?: {
>     instanceTemplate?: string | null,
>     name?: string | null
>   } | null,
>   preservedStateFromPolicy?: {
>     externalIPs?: Record<string, {
>       autoDelete?: string | null,
>       ipAddress?: {
>         literal?: string | null,
>         address?: string | null
>       } | null
>     }> | null,
>     metadata?: Record<string, string> | null,
>     internalIPs?: Record<string, {
>       autoDelete?: string | null,
>       ipAddress?: {
>         literal?: string | null,
>         address?: string | null
>       } | null
>     }> | null,
>     disks?: Record<string, {
>       mode?: string | null,
>       autoDelete?: string | null,
>       source?: string | null
>     }> | null
>   } | null,
>   instanceStatus?: string | null,
>   lastAttempt?: {
>     errors?: {
>       errors?: {
>         location?: string | null,
>         message?: string | null,
>         errorDetails?: {
>           errorInfo?: {
>             domain?: string | null,
>             metadatas?: Record<string, string> | null,
>             reason?: string | null
>           } | null,
>           quotaInfo?: {
>             rolloutStatus?: string | null,
>             dimensions?: Record<string, string> | null,
>             limit?: number | null,
>             metricName?: string | null,
>             futureLimit?: number | null,
>             limitName?: string | null
>           } | null,
>           help?: {
>             links?: {
>               description?: string | null,
>               url?: string | null
>             }[] | null
>           } | null,
>           localizedMessage?: {
>             locale?: string | null,
>             message?: string | null
>           } | null
>         }[] | null,
>         code?: string | null
>       }[] | null
>     } | null
>   } | null,
>   shutdownDetails?: {
>     maxDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     requestTimestamp?: string | null
>   } | null,
>   instanceHealth?: {
>     detailedHealthState?: string | null,
>     healthCheck?: string | null
>   }[] | null,
>   instance?: string | null,
>   name?: string | null,
>   preservedStateFromConfig?: {
>     externalIPs?: Record<string, {
>       autoDelete?: string | null,
>       ipAddress?: {
>         literal?: string | null,
>         address?: string | null
>       } | null
>     }> | null,
>     metadata?: Record<string, string> | null,
>     internalIPs?: Record<string, {
>       autoDelete?: string | null,
>       ipAddress?: {
>         literal?: string | null,
>         address?: string | null
>       } | null
>     }> | null,
>     disks?: Record<string, {
>       mode?: string | null,
>       autoDelete?: string | null,
>       source?: string | null
>     }> | null
>   } | null,
>   currentAction?: string | null,
>   id?: string | number | null,
>   targetStatus?: string | null
> }[] | null
> ```

***

### instanceGroupManagers.listPerInstanceConfigs

`compute.instanceGroupManagers.listPerInstanceConfigs`

Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.listPerInstanceConfigs({ project: 'demo-project', zone: 'us-central1-a', instanceGroupManager: 'web-mig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. It should conform to RFC1035. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `maxResults` | `number` | No | 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`) |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. It should conform to RFC1035. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Output only. \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `warning` | `object \| null` | No | Output only. \[Output Only] Informational warning message. |
| `items` | `object[] \| null` | No | Output only. \[Output Only] The list of PerInstanceConfig. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   preservedState?: {
>     externalIPs?: Record<string, {
>       autoDelete?: string | null,
>       ipAddress?: {
>         literal?: string | null,
>         address?: string | null
>       } | null
>     }> | null,
>     metadata?: Record<string, string> | null,
>     internalIPs?: Record<string, {
>       autoDelete?: string | null,
>       ipAddress?: {
>         literal?: string | null,
>         address?: string | null
>       } | null
>     }> | null,
>     disks?: Record<string, {
>       mode?: string | null,
>       autoDelete?: string | null,
>       source?: string | null
>     }> | null
>   } | null,
>   fingerprint?: string | null,
>   status?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### instanceGroupManagers.patch

`compute.instanceGroupManagers.patch`

Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.patch({
	project: 'demo-project',
	zone: 'us-central1-a',
	instanceGroupManager: 'web-mig',
	targetSize: 3,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone where you want to create the managed instance group. |
| `instanceGroupManager` | `string` | Yes | The name of the instance group manager. |
| `name` | `string` | No | The name of the managed instance group. The name must be 1-63 characters long, and comply withRFC1035. |
| `statefulPolicy` | `object` | No | — |
| `standbyPolicy` | `object` | No | — |
| `targetSizePolicy` | `object` | No | — |
| `versions` | `object[]` | No | Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and aname. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about therelationships between these fields. Exactly one version must leave thetargetSize field unset. That version will be applied to all remaining instances. For more information, read aboutcanary updates. |
| `fingerprint` | `string` | No | Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager. (base64) |
| `distributionPolicy` | `object` | No | — |
| `allInstancesConfig` | `object` | No | — |
| `listManagedInstancesResults` | `PAGELESS \| PAGINATED` | No | Pagination behavior of the listManagedInstances API method for this managed instance group. |
| `targetStoppedSize` | `number` | No | The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method. |
| `instanceLifecyclePolicy` | `object` | No | — |
| `namedPorts` | `object[]` | No | \[Output Only] Named ports configured on the Instance Groups complementary to this Instance Group Manager. |
| `targetPools` | `string[]` | No | The URLs for all TargetPool resources to which instances in theinstanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. |
| `description` | `string` | No | An optional description of this resource. |
| `autoHealingPolicies` | `object[]` | No | The autohealing policy for this managed instance group. You can specify only one value. |
| `instanceFlexibilityPolicy` | `object` | No | — |
| `baseInstanceName` | `string` | No | The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. The maximum character length is 58 and the name must comply with RFC1035 format. When a VM is created in the group, the MIG appends a hyphen and a random four-character string to the base instance name. If you want the MIG to assign sequential numbers instead of a random string, then end the base instance name with a hyphen followed by one or more hash symbols. The hash symbols indicate the number of digits. For example, a base instance name of "vm-###" results in "vm-001" as a VM name. |
| `targetSize` | `number` | No | The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number. |
| `targetSuspendedSize` | `number` | No | The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method. |
| `instanceTemplate` | `string` | No | The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE. |
| `updatePolicy` | `object` | No | — |
| `resourcePolicies` | `object` | No | — |

> [accordion] statefulPolicy full type
>
> ```ts theme={null}
> {
>   preservedState?: {
>     internalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION
>     }>,
>     disks?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION
>     }>,
>     externalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION
>     }>
>   }
> }
> ```

> [accordion] standbyPolicy full type
>
> ```ts theme={null}
> {
>   mode?: MANUAL | SCALE_OUT_POOL,
>   initialDelaySec?: number
> }
> ```

> [accordion] targetSizePolicy full type
>
> ```ts theme={null}
> {
>   mode?: BULK | INDIVIDUAL | UNSPECIFIED_MODE
> }
> ```

> [accordion] versions full type
>
> ```ts theme={null}
> {
>   name?: string,
>   instanceTemplate?: string,
>   targetSize?: {
>     fixed?: number,
>     percent?: number
>   }
> }[]
> ```

> [accordion] distributionPolicy full type
>
> ```ts theme={null}
> {
>   zones?: {
>     zone?: string
>   }[],
>   targetShape?: ANY | ANY_SINGLE_ZONE | BALANCED | EVEN
> }
> ```

> [accordion] allInstancesConfig full type
>
> ```ts theme={null}
> {
>   properties?: {
>     exposeHostTopology?: boolean,
>     metadata?: Record<string, string>,
>     labels?: Record<string, string>
>   }
> }
> ```

> [accordion] instanceLifecyclePolicy full type
>
> ```ts theme={null}
> {
>   forceUpdateOnRepair?: NO | YES,
>   defaultActionOnFailure?: DO_NOTHING | REPAIR,
>   onFailedHealthCheck?: DEFAULT_ACTION | DO_NOTHING | REPAIR,
>   onRepair?: {
>     allowChangingZone?: NO | YES
>   }
> }
> ```

> [accordion] namedPorts full type
>
> ```ts theme={null}
> {
>   name?: string,
>   port?: number
> }[]
> ```

> [accordion] autoHealingPolicies full type
>
> ```ts theme={null}
> {
>   healthCheck?: string,
>   initialDelaySec?: number
> }[]
> ```

> [accordion] instanceFlexibilityPolicy full type
>
> ```ts theme={null}
> {
>   instanceSelections?: Record<string, {
>     minCpuPlatform?: string,
>     disks?: {
>       forceAttach?: boolean,
>       deviceName?: string,
>       mode?: READ_ONLY | READ_WRITE,
>       source?: string,
>       initializeParams?: {
>         resourceManagerTags?: Record<string, string>,
>         licenses?: string[],
>         replicaZones?: string[],
>         provisionedThroughput?: string | number,
>         sourceSnapshotEncryptionKey?: {
>           rawKey?: string,
>           rsaEncryptedKey?: string,
>           kmsKeyName?: string,
>           sha256?: string,
>           kmsKeyServiceAccount?: string
>         },
>         sourceImageEncryptionKey?: {
>           rawKey?: string,
>           rsaEncryptedKey?: string,
>           kmsKeyName?: string,
>           sha256?: string,
>           kmsKeyServiceAccount?: string
>         },
>         sourceSnapshot?: string,
>         diskType?: string,
>         architecture?: ARCHITECTURE_UNSPECIFIED | ARM64 | X86_64,
>         diskName?: string,
>         provisionedIops?: string | number,
>         storagePool?: string,
>         diskSizeGb?: string | number,
>         description?: string,
>         sourceImage?: string,
>         onUpdateAction?: RECREATE_DISK | RECREATE_DISK_IF_SOURCE_CHANGED | USE_EXISTING_DISK,
>         labels?: Record<string, string>,
>         enableConfidentialCompute?: boolean,
>         resourcePolicies?: string[]
>       },
>       autoDelete?: boolean,
>       guestOsFeatures?: {
>         type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
>       }[],
>       type?: PERSISTENT | SCRATCH,
>       interface?: NVME | SCSI,
>       boot?: boolean,
>       diskEncryptionKey?: {
>         rawKey?: string,
>         rsaEncryptedKey?: string,
>         kmsKeyName?: string,
>         sha256?: string,
>         kmsKeyServiceAccount?: string
>       },
>       diskSizeGb?: string | number
>     }[],
>     rank?: number,
>     machineTypes?: string[]
>   }>
> }
> ```

> [accordion] updatePolicy full type
>
> ```ts theme={null}
> {
>   instanceRedistributionType?: NONE | PROACTIVE,
>   minimalAction?: NONE | REFRESH | REPLACE | RESTART,
>   replacementMethod?: RECREATE | SUBSTITUTE,
>   maxSurge?: {
>     fixed?: number,
>     percent?: number
>   },
>   type?: OPPORTUNISTIC | PROACTIVE,
>   maxUnavailable?: {
>     fixed?: number,
>     percent?: number
>   },
>   mostDisruptiveAllowedAction?: NONE | REFRESH | REPLACE | RESTART
> }
> ```

> [accordion] resourcePolicies full type
>
> ```ts theme={null}
> {
>   workloadPolicy?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.patchPerInstanceConfigs

`compute.instanceGroupManagers.patchPerInstanceConfigs`

Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.patchPerInstanceConfigs({
	project: 'demo-project',
	instanceGroupManager: 'web-mig',
	zone: 'us-central1-a',
	perInstanceConfigs: [{
		name: 'web-3',
		preservedState: {
			metadata: { role: 'primary' },
		},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. It should conform to RFC1035. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. It should conform to RFC1035. |
| `perInstanceConfigs` | `object[]` | No | The list of per-instance configurations to insert or patch on this managed instance group. |

> [accordion] perInstanceConfigs full type
>
> ```ts theme={null}
> {
>   preservedState?: {
>     externalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION,
>       ipAddress?: {
>         literal?: string,
>         address?: string
>       }
>     }>,
>     metadata?: Record<string, string>,
>     internalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION,
>       ipAddress?: {
>         literal?: string,
>         address?: string
>       }
>     }>,
>     disks?: Record<string, {
>       mode?: READ_ONLY | READ_WRITE,
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION,
>       source?: string
>     }>
>   },
>   fingerprint?: string,
>   status?: APPLYING | DELETING | EFFECTIVE | NONE | UNAPPLIED | UNAPPLIED_DELETION,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.recreateInstances

`compute.instanceGroupManagers.recreateInstances`

Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.recreateInstances({
	zone: 'us-central1-a',
	instanceGroupManager: 'web-mig',
	project: 'demo-project',
	instances: ['projects/demo-project/zones/us-central1-a/instances/web-1'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `noGracefulShutdown` | `boolean` | No | When set, graceful shutdown is skipped for instance recreation even if it's configured for the instances. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instances` | `string[]` | No | The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/\[ZONE]/instances/\[INSTANCE\_NAME]. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.resize

`compute.instanceGroupManagers.resize`

Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.resize({
	project: 'demo-project',
	instanceGroupManager: 'web-mig',
	size: 3,
	zone: 'us-central1-a',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `size` | `number` | Yes | The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.resumeInstances

`compute.instanceGroupManagers.resumeInstances`

Flags the specified instances in the managed instance group to be resumed. This method increases thetargetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.resumeInstances({
	project: 'demo-project',
	instanceGroupManager: 'web-mig',
	zone: 'us-central1-a',
	instances: ['projects/demo-project/zones/us-central1-a/instances/web-1'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instances` | `string[]` | No | The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/\[ZONE]/instances/\[INSTANCE\_NAME]. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.setInstanceTemplate

`compute.instanceGroupManagers.setInstanceTemplate`

Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.setInstanceTemplate({
	instanceGroupManager: 'web-mig',
	zone: 'us-central1-a',
	project: 'demo-project',
	instanceTemplate: 'projects/demo-project/global/instanceTemplates/web-template-2',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instanceTemplate` | `string` | No | The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.setTargetPools

`compute.instanceGroupManagers.setTargetPools`

Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.setTargetPools({
	instanceGroupManager: 'web-mig',
	zone: 'us-central1-a',
	project: 'demo-project',
	targetPools: ['projects/demo-project/regions/us-central1/targetPools/web'],
	fingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `fingerprint` | `string` | No | The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with theinstanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. (base64) |
| `targetPools` | `string[]` | No | The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.startInstances

`compute.instanceGroupManagers.startInstances`

Flags the specified instances in the managed instance group to be started. This method increases thetargetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.startInstances({
	zone: 'us-central1-a',
	instanceGroupManager: 'web-mig',
	project: 'demo-project',
	instances: ['projects/demo-project/zones/us-central1-a/instances/web-1'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instances` | `string[]` | No | The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/\[ZONE]/instances/\[INSTANCE\_NAME]. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.stopInstances

`compute.instanceGroupManagers.stopInstances`

Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.stopInstances({
	zone: 'us-central1-a',
	project: 'demo-project',
	instanceGroupManager: 'web-mig',
	instances: ['projects/demo-project/zones/us-central1-a/instances/web-1'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `noGracefulShutdown` | `boolean` | No | When set, graceful shutdown is skipped for instance stopping even if it's configured for the instances. |
| `instances` | `string[]` | No | The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/\[ZONE]/instances/\[INSTANCE\_NAME]. |
| `forceStop` | `boolean` | No | If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.suspendInstances

`compute.instanceGroupManagers.suspendInstances`

Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.suspendInstances({
	project: 'demo-project',
	instanceGroupManager: 'web-mig',
	zone: 'us-central1-a',
	instances: ['projects/demo-project/zones/us-central1-a/instances/web-1'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. |
| `forceSuspend` | `boolean` | No | If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them. |
| `instances` | `string[]` | No | The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/\[ZONE]/instances/\[INSTANCE\_NAME]. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroupManagers.updatePerInstanceConfigs

`compute.instanceGroupManagers.updatePerInstanceConfigs`

Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroupManagers.updatePerInstanceConfigs({
	instanceGroupManager: 'web-mig',
	zone: 'us-central1-a',
	project: 'demo-project',
	perInstanceConfigs: [{
		name: 'web-3',
		preservedState: {
			metadata: { role: 'primary' },
		},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instanceGroupManager` | `string` | Yes | The name of the managed instance group. It should conform to RFC1035. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of thezone where the managed instance group is located. It should conform to RFC1035. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `perInstanceConfigs` | `object[]` | No | The list of per-instance configurations to insert or patch on this managed instance group. |

> [accordion] perInstanceConfigs full type
>
> ```ts theme={null}
> {
>   preservedState?: {
>     externalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION,
>       ipAddress?: {
>         literal?: string,
>         address?: string
>       }
>     }>,
>     metadata?: Record<string, string>,
>     internalIPs?: Record<string, {
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION,
>       ipAddress?: {
>         literal?: string,
>         address?: string
>       }
>     }>,
>     disks?: Record<string, {
>       mode?: READ_ONLY | READ_WRITE,
>       autoDelete?: NEVER | ON_PERMANENT_INSTANCE_DELETION,
>       source?: string
>     }>
>   },
>   fingerprint?: string,
>   status?: APPLYING | DELETING | EFFECTIVE | NONE | UNAPPLIED | UNAPPLIED_DELETION,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroups.addInstances

`compute.instanceGroups.addInstances`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.addInstances({
	project: 'demo-project',
	instanceGroup: 'web-group',
	zone: 'us-central1-a',
	instances: [{ instance: 'projects/demo-project/zones/us-central1-a/instances/web-1' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instanceGroup` | `string` | Yes | The name of the instance group where you are adding instances. |
| `zone` | `string` | Yes | The name of the zone where the instance group is located. |
| `instances` | `object[]` | No | The list of instances to add to the instance group. |

> [accordion] instances full type
>
> ```ts theme={null}
> {
>   instance?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroups.aggregatedList

`compute.instanceGroups.aggregatedList`

Retrieves the list of instance groups and sorts them by zone. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `maxResults` | `number` | No | 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`) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Output only. \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `id` | `string \| null` | No | Output only. \[Output Only] Unique identifier for the resource; defined by the server. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The resource type, which is alwayscompute#instanceGroupAggregatedList for aggregated lists of instance groups. |
| `warning` | `object \| null` | No | Output only. \[Output Only] Informational warning message. |
| `items` | `object \| null` | No | A list of InstanceGroupsScopedList resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   warning?: {
>     message?: string | null,
>     code?: string | null,
>     data?: {
>       value?: string | null,
>       key?: string | null
>     }[] | null
>   } | null,
>   instanceGroups?: {
>     selfLink?: string | null,
>     description?: string | null,
>     subnetwork?: string | null,
>     zone?: string | null,
>     creationTimestamp?: string | null,
>     namedPorts?: {
>       name?: string | null,
>       port?: number | null
>     }[] | null,
>     name?: string | null,
>     kind?: string | null,
>     fingerprint?: string | null,
>     id?: string | number | null,
>     network?: string | null,
>     size?: number | null,
>     region?: string | null
>   }[] | null
> }> | null
> ```

***

### instanceGroups.delete

`compute.instanceGroups.delete`

Deletes the specified instance group. The instances in the group are not deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.delete({ project: 'demo-project', zone: 'us-central1-a', instanceGroup: 'web-group' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone where the instance group is located. |
| `instanceGroup` | `string` | Yes | The name of the instance group to delete. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroups.get

`compute.instanceGroups.get`

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

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.get({ instanceGroup: 'web-group', project: 'demo-project', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instanceGroup` | `string` | Yes | The name of the instance group. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone where the instance group is located. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] The URL for this instance group. The server generates this URL. |
| `description` | `string \| null` | No | An optional description of this resource. Provide this property when you create the resource. |
| `subnetwork` | `string \| null` | No | Output only. \[Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0). |
| `zone` | `string \| null` | No | Output only. \[Output Only] The URL of thezone where the instance group is located (for zonal resources). |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] The creation timestamp for this instance group inRFC3339 text format. |
| `namedPorts` | `object[] \| null` | No | Optional. Assigns a name to a port number. For example:\{name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example:\[\{name: "app1", port: 8080}, \{name: "app1", port: 8081}, \{name: "app2", port: 8082}] Named ports apply to all instances in this instance group. |
| `name` | `string \| null` | No | The name of the instance group. The name must be 1-63 characters long, and comply withRFC1035. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The resource type, which is alwayscompute#instanceGroup for instance groups. |
| `fingerprint` | `string \| null` | No | Output only. \[Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. (base64) |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] A unique identifier for this instance group, generated by the server. |
| `network` | `string \| null` | No | \[Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0). |
| `size` | `number \| null` | No | Output only. \[Output Only] The total number of instances in the instance group. |
| `region` | `string \| null` | No | Output only. \[Output Only] The URL of theregion where the instance group is located (for regional resources). |

> [accordion] namedPorts full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   port?: number | null
> }[] | null
> ```

***

### instanceGroups.insert

`compute.instanceGroups.insert`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.insert({ project: 'demo-project', zone: 'us-central1-a', name: 'web-group' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone where you want to create the instance group. |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `namedPorts` | `object[]` | No | Optional. Assigns a name to a port number. For example:\{name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example:\[\{name: "app1", port: 8080}, \{name: "app1", port: 8081}, \{name: "app2", port: 8082}] Named ports apply to all instances in this instance group. |
| `name` | `string` | No | The name of the instance group. The name must be 1-63 characters long, and comply withRFC1035. |
| `network` | `string` | No | \[Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0). |

> [accordion] namedPorts full type
>
> ```ts theme={null}
> {
>   name?: string,
>   port?: number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroups.list

`compute.instanceGroups.list`

Retrieves the list of zonal instance group resources contained within the specified zone. For managed instance groups, use theinstanceGroupManagers or regionInstanceGroupManagers methods instead (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.list({ zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `zone` | `string` | Yes | The name of thezone where the instance group is located. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `maxResults` | `number` | No | 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`) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Output only. \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `id` | `string \| null` | No | Output only. \[Output Only] Unique identifier for the resource; defined by the server. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The resource type, which is alwayscompute#instanceGroupList for instance group lists. |
| `warning` | `object \| null` | No | Output only. \[Output Only] Informational warning message. |
| `items` | `object[] \| null` | No | A list of InstanceGroup resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   code?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   selfLink?: string | null,
>   description?: string | null,
>   subnetwork?: string | null,
>   zone?: string | null,
>   creationTimestamp?: string | null,
>   namedPorts?: {
>     name?: string | null,
>     port?: number | null
>   }[] | null,
>   name?: string | null,
>   kind?: string | null,
>   fingerprint?: string | null,
>   id?: string | number | null,
>   network?: string | null,
>   size?: number | null,
>   region?: string | null
> }[] | null
> ```

***

### instanceGroups.listInstances

`compute.instanceGroups.listInstances`

Lists the instances in the specified instance group. The orderBy query parameter is not supported

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.listInstances({
	project: 'demo-project',
	instanceGroup: 'web-group',
	zone: 'us-central1-a',
	instanceState: 'RUNNING',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `instanceGroup` | `string` | Yes | The name of the instance group from which you want to generate a list of included instances. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `zone` | `string` | Yes | The name of the zone where the instance group is located. |
| `maxResults` | `number` | No | 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`) |
| `instanceState` | `ALL \| RUNNING` | No | 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. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | A list of InstanceWithNamedPorts resources. |
| `nextPageToken` | `string \| null` | No | Output only. \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `id` | `string \| null` | No | Output only. \[Output Only] Unique identifier for the resource; defined by the server. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `warning` | `object \| null` | No | Output only. \[Output Only] Informational warning message. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The resource type, which is alwayscompute#instanceGroupsListInstances for the list of instances in the specified instance group. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   instance?: string | null,
>   namedPorts?: {
>     name?: string | null,
>     port?: number | null
>   }[] | null,
>   status?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   code?: string | null,
>   message?: string | null
> } | null
> ```

***

### instanceGroups.removeInstances

`compute.instanceGroups.removeInstances`

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

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.removeInstances({
	instanceGroup: 'web-group',
	project: 'demo-project',
	zone: 'us-central1-a',
	instances: [{ instance: 'projects/demo-project/zones/us-central1-a/instances/web-1' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instanceGroup` | `string` | Yes | The name of the instance group where the specified instances will be removed. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone where the instance group is located. |
| `instances` | `object[]` | No | The list of instances to remove from the instance group. |

> [accordion] instances full type
>
> ```ts theme={null}
> {
>   instance?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroups.setNamedPorts

`compute.instanceGroups.setNamedPorts`

Sets the named ports for the specified instance group

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.setNamedPorts({
	project: 'demo-project',
	instanceGroup: 'web-group',
	zone: 'us-central1-a',
	namedPorts: [{ name: 'http', port: 80 }],
	fingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instanceGroup` | `string` | Yes | The name of the instance group where the named ports are updated. |
| `zone` | `string` | Yes | The name of the zone where the instance group is located. |
| `namedPorts` | `object[]` | No | The list of named ports to set for this instance group. |
| `fingerprint` | `string` | No | 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 theinstanceGroups.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 error412 conditionNotMet. (base64) |

> [accordion] namedPorts full type
>
> ```ts theme={null}
> {
>   name?: string,
>   port?: number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceGroups.testIamPermissions

`compute.instanceGroups.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceGroups.testIamPermissions({
	project: 'demo-project',
	resource: 'web-group',
	zone: 'us-central1-a',
	permissions: ['compute.instanceGroups.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### instances.addAccessConfig

`compute.instances.addAccessConfig`

Adds an access config to an instance's network interface

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.addAccessConfig({
	networkInterface: 'nic0',
	project: 'demo-project',
	instance: 'web-1',
	zone: 'us-central1-a',
	name: 'External NAT',
	type: 'ONE_TO_ONE_NAT',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `networkInterface` | `string` | Yes | The name of the network interface to add to this instance. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | The instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `type` | `DIRECT_IPV6 \| ONE_TO_ONE_NAT` | No | The type of configuration. In accessConfigs (IPv4), the default and only option is ONE\_TO\_ONE\_NAT. Inipv6AccessConfigs, the default and only option isDIRECT\_IPV6. |
| `securityPolicy` | `string` | No | The resource URL for the security policy associated with this access config. |
| `name` | `string` | No | The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP orNetwork Access. In ipv6AccessConfigs, the recommend name is External IPv6. |
| `networkTier` | `FIXED_STANDARD \| PREMIUM \| STANDARD \| STANDARD_OVERRIDES_FIXED_STANDARD` | No | This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM,STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. |
| `publicPtrDomainName` | `string` | No | The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled inaccessConfig. If this field is unspecified inipv6AccessConfig, a default PTR record will be created for first IP in associated external IPv6 range. |
| `setPublicPtr` | `boolean` | No | Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated. |
| `externalIpv6` | `string` | No | Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored inexternalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork. |
| `natIP` | `string` | No | Applies to accessConfigs (IPv4) only. Anexternal 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. |
| `externalIpv6PrefixLength` | `number` | No | Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.addNetworkInterface

`compute.instances.addNetworkInterface`

Adds one dynamic network interface to an active instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.addNetworkInterface({
	project: 'demo-project',
	zone: 'us-central1-a',
	instance: 'web-1',
	network: 'projects/demo-project/global/networks/vpc-2',
	subnetwork: 'projects/demo-project/regions/us-central1/subnetworks/vpc-2',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instance` | `string` | Yes | The instance name for this request stored as resource\_id. Name should conform to RFC1035 or be an unsigned long integer. |
| `vlan` | `number` | No | VLAN tag of a dynamic network interface, must be an integer in the range from 2 to 255 inclusively. |
| `stackType` | `IPV4_IPV6 \| IPV4_ONLY \| IPV6_ONLY` | No | The stack type for this network interface. To assign only IPv4 addresses, use IPV4\_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4\_IPV6. If not specified, IPV4\_ONLY is used. This field can be both set at instance creation and update network interface operations. |
| `nicType` | `GVNIC \| IDPF \| IRDMA \| MRDMA \| UNSPECIFIED_NIC_TYPE \| VIRTIO_NET` | No | The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. |
| `serviceClassId` | `string` | No | Optional. Producer Service's Service class Id for the region of this network interface. Can only be used with network\_attachment. It is not possible to use on its own however, network\_attachment can be used without service\_class\_id. |
| `enableVpcScopedDns` | `boolean` | No | Optional. If true, DNS resolution will be enabled over this interface. Only valid with network\_attachment. |
| `igmpQuery` | `IGMP_QUERY_DISABLED \| IGMP_QUERY_V2` | No | Indicate whether igmp query is enabled on the network interface or not. If enabled, also indicates the version of IGMP supported. |
| `name` | `string` | No | \[Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and7. The default interface value is nic0. |
| `aliasIpRanges` | `object[]` | No | An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks. |
| `internalIpv6PrefixLength` | `number` | No | The prefix length of the primary internal IPv6 range. |
| `subnetwork` | `string` | No | The URL of the Subnetwork resource for this instance. If the network resource is inlegacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: - [https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork](https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork) - regions/region/subnetworks/subnetwork |
| `fingerprint` | `string` | No | 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 theNetworkInterface. The request will fail with error400 Bad Request if the fingerprint is not provided, or412 Precondition Failed if the fingerprint is out of date. (base64) |
| `queueCount` | `number` | No | The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It'll be empty if not specified by the users. |
| `aliasIpv6Ranges` | `object[]` | No | An array of alias IPv6 ranges for this network interface. You can only specify this field for network interfaces in VPC networks. |
| `accessConfigs` | `object[]` | No | An array of configurations for this interface. Currently, only one access config, ONE\_TO\_ONE\_NAT, is supported. If there are noaccessConfigs specified, then this instance will have no external internet access. |
| `networkAttachment` | `string` | No | The URL of the network attachment that this interface should connect to in the following format: projects/\{project\_number}/regions/\{region\_name}/networkAttachments/\{network\_attachment\_name}. |
| `networkIP` | `string` | No | An IPv4 internal IP 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. |
| `ipv6Address` | `string` | No | An IPv6 internal network address for this network interface. To use a static internal IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an internal IPv6 address from the instance's subnetwork. |
| `ipv6AccessConfigs` | `object[]` | No | An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT\_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. |
| `network` | `string` | No | URL of the VPC 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 selected project doesn't have the default network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is inferred. If you specify this property, you can specify the network as a full or partial URL. |
| `parentNicName` | `string` | No | Name of the parent network interface of a dynamic network interface. |

> [accordion] aliasIpRanges full type
>
> ```ts theme={null}
> {
>   subnetworkRangeName?: string,
>   ipCidrRange?: string
> }[]
> ```

> [accordion] aliasIpv6Ranges full type
>
> ```ts theme={null}
> {
>   subnetworkRangeName?: string,
>   ipCidrRange?: string
> }[]
> ```

> [accordion] accessConfigs full type
>
> ```ts theme={null}
> {
>   type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>   securityPolicy?: string,
>   name?: string,
>   networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>   publicPtrDomainName?: string,
>   setPublicPtr?: boolean,
>   externalIpv6?: string,
>   natIP?: string,
>   externalIpv6PrefixLength?: number
> }[]
> ```

> [accordion] ipv6AccessConfigs full type
>
> ```ts theme={null}
> {
>   type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>   securityPolicy?: string,
>   name?: string,
>   networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>   publicPtrDomainName?: string,
>   setPublicPtr?: boolean,
>   externalIpv6?: string,
>   natIP?: string,
>   externalIpv6PrefixLength?: number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.addResourcePolicies

`compute.instances.addResourcePolicies`

Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.addResourcePolicies({
	instance: 'web-1',
	zone: 'us-central1-a',
	project: 'demo-project',
	resourcePolicies: ['projects/demo-project/regions/us-central1/resourcePolicies/night-off'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | The instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resourcePolicies` | `string[]` | No | Resource policies to be added to this instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.aggregatedList

`compute.instances.aggregatedList`

Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `maxResults` | `number` | No | 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`) |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#instanceAggregatedList for aggregated lists of Instance resources. |
| `items` | `object \| null` | No | An object that contains a list of instances scoped by zone. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   instances?: {
>     description?: string | null,
>     networkInterfaces?: {
>       vlan?: number | null,
>       stackType?: string | null,
>       nicType?: string | null,
>       serviceClassId?: string | null,
>       enableVpcScopedDns?: boolean | null,
>       igmpQuery?: string | null,
>       kind?: string | null,
>       name?: string | null,
>       aliasIpRanges?: {
>         subnetworkRangeName?: string | null,
>         ipCidrRange?: string | null
>       }[] | null,
>       internalIpv6PrefixLength?: number | null,
>       subnetwork?: string | null,
>       fingerprint?: string | null,
>       queueCount?: number | null,
>       aliasIpv6Ranges?: {
>         subnetworkRangeName?: string | null,
>         ipCidrRange?: string | null
>       }[] | null,
>       accessConfigs?: {
>         type?: string | null,
>         securityPolicy?: string | null,
>         name?: string | null,
>         kind?: string | null,
>         networkTier?: string | null,
>         publicPtrDomainName?: string | null,
>         setPublicPtr?: boolean | null,
>         externalIpv6?: string | null,
>         natIP?: string | null,
>         externalIpv6PrefixLength?: number | null
>       }[] | null,
>       networkAttachment?: string | null,
>       networkIP?: string | null,
>       ipv6Address?: string | null,
>       ipv6AccessType?: string | null,
>       ipv6AccessConfigs?: {
>         type?: string | null,
>         securityPolicy?: string | null,
>         name?: string | null,
>         kind?: string | null,
>         networkTier?: string | null,
>         publicPtrDomainName?: string | null,
>         setPublicPtr?: boolean | null,
>         externalIpv6?: string | null,
>         natIP?: string | null,
>         externalIpv6PrefixLength?: number | null
>       }[] | null,
>       network?: string | null,
>       parentNicName?: string | null
>     }[] | null,
>     hostname?: string | null,
>     status?: string | null,
>     reservationAffinity?: {
>       values?: string[] | null,
>       key?: string | null,
>       consumeReservationType?: string | null
>     } | null,
>     metadata?: {
>       kind?: string | null,
>       items?: {
>         key?: string | null,
>         value?: string | null
>       }[] | null,
>       fingerprint?: string | null
>     } | null,
>     deletionProtection?: boolean | null,
>     lastStartTimestamp?: string | null,
>     keyRevocationActionType?: string | null,
>     shieldedInstanceConfig?: {
>       enableSecureBoot?: boolean | null,
>       enableVtpm?: boolean | null,
>       enableIntegrityMonitoring?: boolean | null
>     } | null,
>     machineType?: string | null,
>     advancedMachineFeatures?: {
>       threadsPerCore?: number | null,
>       turboMode?: string | null,
>       visibleCoreCount?: number | null,
>       enableUefiNetworking?: boolean | null,
>       performanceMonitoringUnit?: string | null,
>       enableNestedVirtualization?: boolean | null
>     } | null,
>     tags?: {
>       items?: string[] | null,
>       fingerprint?: string | null
>     } | null,
>     startRestricted?: boolean | null,
>     lastSuspendedTimestamp?: string | null,
>     confidentialInstanceConfig?: {
>       enableConfidentialCompute?: boolean | null,
>       confidentialInstanceType?: string | null
>     } | null,
>     satisfiesPzi?: boolean | null,
>     displayDevice?: {
>       enableDisplay?: boolean | null
>     } | null,
>     cpuPlatform?: string | null,
>     labels?: Record<string, string> | null,
>     fingerprint?: string | null,
>     name?: string | null,
>     resourcePolicies?: string[] | null,
>     serviceAccounts?: {
>       scopes?: string[] | null,
>       email?: string | null
>     }[] | null,
>     minCpuPlatform?: string | null,
>     lastStopTimestamp?: string | null,
>     id?: string | number | null,
>     resourceStatus?: {
>       reservationConsumptionInfo?: {
>         consumedReservation?: string | null,
>         consumedReservationSubBlock?: string | null,
>         consumedReservationBlock?: string | null
>       } | null,
>       upcomingMaintenance?: {
>         type?: string | null,
>         windowStartTime?: string | null,
>         latestWindowStartTime?: string | null,
>         maintenanceOnShutdown?: boolean | null,
>         canReschedule?: boolean | null,
>         maintenanceReasons?: string[] | null,
>         maintenanceStatus?: string | null,
>         windowEndTime?: string | null
>       } | null,
>       physicalHostTopology?: {
>         subblock?: string | null,
>         additionalAttributes?: {
>           acceleratorTopologyIds?: Record<string, string> | null
>         } | null,
>         host?: string | null,
>         block?: string | null,
>         cluster?: string | null
>       } | null,
>       scheduling?: {
>         gracefulShutdownTimestamp?: string | null,
>         terminationTimestamp?: string | null,
>         availabilityDomain?: number | null
>       } | null,
>       shutdownDetails?: {
>         targetState?: string | null,
>         maxDuration?: {
>           nanos?: number | null,
>           seconds?: string | number | null
>         } | null,
>         requestTimestamp?: string | null,
>         stopState?: string | null
>       } | null,
>       physicalHost?: string | null,
>       effectiveInstanceMetadata?: {
>         vmDnsSettingMetadataValue?: string | null,
>         enableOsInventoryMetadataValue?: boolean | null,
>         enableOsloginMetadataValue?: boolean | null,
>         enableGuestAttributesMetadataValue?: boolean | null,
>         gceContainerDeclarationMetadataValue?: boolean | null,
>         blockProjectSshKeysMetadataValue?: boolean | null,
>         serialPortLoggingEnableMetadataValue?: boolean | null,
>         serialPortEnableMetadataValue?: boolean | null,
>         enableOsconfigMetadataValue?: boolean | null
>       } | null
>     } | null,
>     instanceEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     creationTimestamp?: string | null,
>     scheduling?: {
>       hostErrorTimeoutSeconds?: number | null,
>       localSsdRecoveryTimeout?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       exposeHostTopology?: boolean | null,
>       preemptionNoticeDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       skipGuestOsShutdown?: boolean | null,
>       availabilityDomain?: number | null,
>       automaticRestart?: boolean | null,
>       terminationTime?: string | null,
>       onInstanceStopAction?: {
>         discardLocalSsd?: boolean | null
>       } | null,
>       locationHint?: string | null,
>       onHostMaintenance?: string | null,
>       maxRunDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       nodeAffinities?: {
>         operator?: string | null,
>         key?: string | null,
>         values?: string[] | null
>       }[] | null,
>       provisioningModel?: string | null,
>       instanceTerminationAction?: string | null,
>       gracefulShutdown?: {
>         maxDuration?: {
>           nanos?: number | null,
>           seconds?: string | number | null
>         } | null,
>         enabled?: boolean | null
>       } | null,
>       preemptible?: boolean | null,
>       minNodeCpus?: number | null
>     } | null,
>     canIpForward?: boolean | null,
>     satisfiesPzs?: boolean | null,
>     zone?: string | null,
>     selfLink?: string | null,
>     workloadIdentityConfig?: {
>       identityCertificateEnabled?: boolean | null,
>       identity?: string | null
>     } | null,
>     sourceMachineImage?: string | null,
>     statusMessage?: string | null,
>     sourceMachineImageEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     networkPerformanceConfig?: {
>       totalEgressBandwidthTier?: string | null
>     } | null,
>     kind?: string | null,
>     localSsdEncryptionMode?: string | null,
>     shieldedInstanceIntegrityPolicy?: {
>       updateAutoLearnPolicy?: boolean | null
>     } | null,
>     disks?: {
>       forceAttach?: boolean | null,
>       index?: number | null,
>       savedState?: string | null,
>       deviceName?: string | null,
>       mode?: string | null,
>       source?: string | null,
>       shieldedInstanceInitialState?: {
>         keks?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbxs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         pk?: {
>           fileType?: string | null,
>           content?: string | null
>         } | null
>       } | null,
>       licenses?: string[] | null,
>       architecture?: string | null,
>       initializeParams?: {
>         resourceManagerTags?: Record<string, string> | null,
>         licenses?: string[] | null,
>         replicaZones?: string[] | null,
>         provisionedThroughput?: string | number | null,
>         sourceSnapshotEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceImageEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceSnapshot?: string | null,
>         diskType?: string | null,
>         architecture?: string | null,
>         diskName?: string | null,
>         provisionedIops?: string | number | null,
>         storagePool?: string | null,
>         diskSizeGb?: string | number | null,
>         description?: string | null,
>         sourceImage?: string | null,
>         onUpdateAction?: string | null,
>         labels?: Record<string, string> | null,
>         enableConfidentialCompute?: boolean | null,
>         resourcePolicies?: string[] | null
>       } | null,
>       autoDelete?: boolean | null,
>       guestOsFeatures?: {
>         type?: string | null
>       }[] | null,
>       type?: string | null,
>       interface?: string | null,
>       kind?: string | null,
>       boot?: boolean | null,
>       diskEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       diskSizeGb?: string | number | null
>     }[] | null,
>     labelFingerprint?: string | null,
>     guestAccelerators?: {
>       acceleratorCount?: number | null,
>       acceleratorType?: string | null
>     }[] | null,
>     params?: {
>       resourceManagerTags?: Record<string, string> | null,
>       requestValidForDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null
>     } | null,
>     privateIpv6GoogleAccess?: string | null
>   }[] | null,
>   warning?: {
>     message?: string | null,
>     code?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null
>   } | null
> }> | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

***

### instances.attachDisk

`compute.instances.attachDisk`

Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.attachDisk({
	zone: 'us-central1-a',
	instance: 'web-1',
	project: 'demo-project',
	source: 'projects/demo-project/zones/us-central1-a/disks/data-1',
	deviceName: 'data-1',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `forceAttach` | `boolean` | No | 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. |
| `instance` | `string` | Yes | The instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `body_forceAttach` | `boolean` | No | \[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. |
| `deviceName` | `string` | No | 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. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks. |
| `mode` | `READ_ONLY \| READ_WRITE` | No | The mode in which to attach this disk, either READ\_WRITE orREAD\_ONLY. If not specified, the default is to attach the disk in READ\_WRITE mode. |
| `source` | `string` | No | Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance boot disk, one ofinitializeParams.sourceImage orinitializeParams.sourceSnapshot or disks.source is required. 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 for zonal disk, and the URL for regional disk. |
| `initializeParams` | `object` | No | \[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. This field is persisted and returned for instanceTemplate and not returned in the context of instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both. |
| `autoDelete` | `boolean` | No | Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). |
| `guestOsFeatures` | `object[]` | No | 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` | `PERSISTENT \| SCRATCH` | No | Specifies the type of the disk, either SCRATCH orPERSISTENT. If not specified, the default isPERSISTENT. |
| `interface` | `NVME \| SCSI` | No | Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, seeAbout persistent disks. |
| `boot` | `boolean` | No | Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| `diskEncryptionKey` | `object` | No | — |
| `diskSizeGb` | `string \| number` | No | The size of the disk in GB. |

> [accordion] initializeParams full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>,
>   licenses?: string[],
>   replicaZones?: string[],
>   provisionedThroughput?: string | number,
>   sourceSnapshotEncryptionKey?: {
>     rawKey?: string,
>     rsaEncryptedKey?: string,
>     kmsKeyName?: string,
>     sha256?: string,
>     kmsKeyServiceAccount?: string
>   },
>   sourceImageEncryptionKey?: {
>     rawKey?: string,
>     rsaEncryptedKey?: string,
>     kmsKeyName?: string,
>     sha256?: string,
>     kmsKeyServiceAccount?: string
>   },
>   sourceSnapshot?: string,
>   diskType?: string,
>   architecture?: ARCHITECTURE_UNSPECIFIED | ARM64 | X86_64,
>   diskName?: string,
>   provisionedIops?: string | number,
>   storagePool?: string,
>   diskSizeGb?: string | number,
>   description?: string,
>   sourceImage?: string,
>   onUpdateAction?: RECREATE_DISK | RECREATE_DISK_IF_SOURCE_CHANGED | USE_EXISTING_DISK,
>   labels?: Record<string, string>,
>   enableConfidentialCompute?: boolean,
>   resourcePolicies?: string[]
> }
> ```

> [accordion] guestOsFeatures full type
>
> ```ts theme={null}
> {
>   type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
> }[]
> ```

> [accordion] diskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.bulkInsert

`compute.instances.bulkInsert`

Creates multiple instances. Count specifies the number of instances to create

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.bulkInsert({
	project: 'demo-project',
	zone: 'us-central1-a',
	count: '3',
	namePattern: 'worker-##',
	sourceInstanceTemplate: 'projects/demo-project/global/instanceTemplates/web-template',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `perInstanceProperties` | `object` | No | Per-instance properties to be set on individual instances. Keys of this map specify requested instance names. Can be empty if name\_pattern is used. |
| `count` | `string \| number` | No | The maximum number of instances to create. |
| `instanceProperties` | `object` | No | — |
| `sourceInstanceTemplate` | `string` | No | Specifies the instance template from which to create instances. You may combine sourceInstanceTemplate withinstanceProperties to override specific values from an existing instance template. Bulk API follows the semantics of JSON Merge Patch described by RFC 7396. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - [https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate](https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate) - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate This field is optional. |
| `minCount` | `string \| number` | No | The minimum number of instances to create. If no min\_count is specified then count is used as the default value. Ifmin\_count instances cannot be created, then no instances will be created and instances already created will be deleted. |
| `namePattern` | `string` | No | The string pattern used for the names of the VMs. Either name\_pattern or per\_instance\_properties must be set. The pattern must contain one continuous sequence of placeholder hash characters (#) with each character corresponding to one digit of the generated instance name. Example: a name\_pattern of inst-#### generates instance names such asinst-0001 and inst-0002. If existing instances in the same project and zone have names that match the name pattern then the generated instance numbers start after the biggest existing number. |
| `instanceFlexibilityPolicy` | `object` | No | A flexible specification of machine types for instances to create. |
| `locationPolicy` | `object` | No | Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region). |

> [accordion] perInstanceProperties full type
>
> ```ts theme={null}
> Record<string, {
>   hostname?: string
> }>
> ```

> [accordion] instanceProperties full type
>
> ```ts theme={null}
> {
>   disks?: {
>     forceAttach?: boolean,
>     deviceName?: string,
>     mode?: READ_ONLY | READ_WRITE,
>     source?: string,
>     initializeParams?: {
>       resourceManagerTags?: Record<string, string>,
>       licenses?: string[],
>       replicaZones?: string[],
>       provisionedThroughput?: string | number,
>       sourceSnapshotEncryptionKey?: {
>         rawKey?: string,
>         rsaEncryptedKey?: string,
>         kmsKeyName?: string,
>         sha256?: string,
>         kmsKeyServiceAccount?: string
>       },
>       sourceImageEncryptionKey?: {
>         rawKey?: string,
>         rsaEncryptedKey?: string,
>         kmsKeyName?: string,
>         sha256?: string,
>         kmsKeyServiceAccount?: string
>       },
>       sourceSnapshot?: string,
>       diskType?: string,
>       architecture?: ARCHITECTURE_UNSPECIFIED | ARM64 | X86_64,
>       diskName?: string,
>       provisionedIops?: string | number,
>       storagePool?: string,
>       diskSizeGb?: string | number,
>       description?: string,
>       sourceImage?: string,
>       onUpdateAction?: RECREATE_DISK | RECREATE_DISK_IF_SOURCE_CHANGED | USE_EXISTING_DISK,
>       labels?: Record<string, string>,
>       enableConfidentialCompute?: boolean,
>       resourcePolicies?: string[]
>     },
>     autoDelete?: boolean,
>     guestOsFeatures?: {
>       type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
>     }[],
>     type?: PERSISTENT | SCRATCH,
>     interface?: NVME | SCSI,
>     boot?: boolean,
>     diskEncryptionKey?: {
>       rawKey?: string,
>       rsaEncryptedKey?: string,
>       kmsKeyName?: string,
>       sha256?: string,
>       kmsKeyServiceAccount?: string
>     },
>     diskSizeGb?: string | number
>   }[],
>   labels?: Record<string, string>,
>   guestAccelerators?: {
>     acceleratorCount?: number,
>     acceleratorType?: string
>   }[],
>   machineType?: string,
>   tags?: {
>     items?: string[],
>     fingerprint?: string
>   },
>   confidentialInstanceConfig?: {
>     enableConfidentialCompute?: boolean,
>     confidentialInstanceType?: BMSAI | CCA | CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED | SEV | SEV_SNP | TDX
>   },
>   resourceManagerTags?: Record<string, string>,
>   metadata?: {
>     items?: {
>       key?: string,
>       value?: string
>     }[],
>     fingerprint?: string
>   },
>   resourcePolicies?: string[],
>   shieldedInstanceConfig?: {
>     enableSecureBoot?: boolean,
>     enableVtpm?: boolean,
>     enableIntegrityMonitoring?: boolean
>   },
>   reservationAffinity?: {
>     values?: string[],
>     key?: string,
>     consumeReservationType?: ANY_RESERVATION | NO_RESERVATION | SPECIFIC_RESERVATION | UNSPECIFIED
>   },
>   workloadIdentityConfig?: {
>     identityCertificateEnabled?: boolean,
>     identity?: string
>   },
>   privateIpv6GoogleAccess?: ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE | ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE | INHERIT_FROM_SUBNETWORK,
>   description?: string,
>   canIpForward?: boolean,
>   localSsdEncryptionMode?: EPHEMERAL_KEY_ENCRYPTION | LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED | STANDARD_ENCRYPTION,
>   minCpuPlatform?: string,
>   scheduling?: {
>     hostErrorTimeoutSeconds?: number,
>     localSsdRecoveryTimeout?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     exposeHostTopology?: boolean,
>     preemptionNoticeDuration?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     skipGuestOsShutdown?: boolean,
>     availabilityDomain?: number,
>     automaticRestart?: boolean,
>     terminationTime?: string,
>     onInstanceStopAction?: {
>       discardLocalSsd?: boolean
>     },
>     locationHint?: string,
>     onHostMaintenance?: MIGRATE | TERMINATE,
>     maxRunDuration?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     nodeAffinities?: {
>       operator?: IN | NOT_IN | OPERATOR_UNSPECIFIED,
>       key?: string,
>       values?: string[]
>     }[],
>     provisioningModel?: FLEX_START | RESERVATION_BOUND | SPOT | STANDARD,
>     instanceTerminationAction?: DELETE | INSTANCE_TERMINATION_ACTION_UNSPECIFIED | STOP,
>     gracefulShutdown?: {
>       maxDuration?: {
>         nanos?: number,
>         seconds?: string | number
>       },
>       enabled?: boolean
>     },
>     preemptible?: boolean,
>     minNodeCpus?: number
>   },
>   networkPerformanceConfig?: {
>     totalEgressBandwidthTier?: DEFAULT | TIER_1
>   },
>   keyRevocationActionType?: KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED | NONE | STOP,
>   networkInterfaces?: {
>     vlan?: number,
>     stackType?: IPV4_IPV6 | IPV4_ONLY | IPV6_ONLY,
>     nicType?: GVNIC | IDPF | IRDMA | MRDMA | UNSPECIFIED_NIC_TYPE | VIRTIO_NET,
>     serviceClassId?: string,
>     enableVpcScopedDns?: boolean,
>     igmpQuery?: IGMP_QUERY_DISABLED | IGMP_QUERY_V2,
>     name?: string,
>     aliasIpRanges?: {
>       subnetworkRangeName?: string,
>       ipCidrRange?: string
>     }[],
>     internalIpv6PrefixLength?: number,
>     subnetwork?: string,
>     fingerprint?: string,
>     queueCount?: number,
>     aliasIpv6Ranges?: {
>       subnetworkRangeName?: string,
>       ipCidrRange?: string
>     }[],
>     accessConfigs?: {
>       type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>       securityPolicy?: string,
>       name?: string,
>       networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>       publicPtrDomainName?: string,
>       setPublicPtr?: boolean,
>       externalIpv6?: string,
>       natIP?: string,
>       externalIpv6PrefixLength?: number
>     }[],
>     networkAttachment?: string,
>     networkIP?: string,
>     ipv6Address?: string,
>     ipv6AccessConfigs?: {
>       type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>       securityPolicy?: string,
>       name?: string,
>       networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>       publicPtrDomainName?: string,
>       setPublicPtr?: boolean,
>       externalIpv6?: string,
>       natIP?: string,
>       externalIpv6PrefixLength?: number
>     }[],
>     network?: string,
>     parentNicName?: string
>   }[],
>   advancedMachineFeatures?: {
>     threadsPerCore?: number,
>     turboMode?: string,
>     visibleCoreCount?: number,
>     enableUefiNetworking?: boolean,
>     performanceMonitoringUnit?: ARCHITECTURAL | ENHANCED | PERFORMANCE_MONITORING_UNIT_UNSPECIFIED | STANDARD,
>     enableNestedVirtualization?: boolean
>   },
>   serviceAccounts?: {
>     scopes?: string[],
>     email?: string
>   }[]
> }
> ```

> [accordion] instanceFlexibilityPolicy full type
>
> ```ts theme={null}
> {
>   instanceSelections?: Record<string, {
>     rank?: string | number,
>     disks?: {
>       forceAttach?: boolean,
>       deviceName?: string,
>       mode?: READ_ONLY | READ_WRITE,
>       source?: string,
>       initializeParams?: {
>         resourceManagerTags?: Record<string, string>,
>         licenses?: string[],
>         replicaZones?: string[],
>         provisionedThroughput?: string | number,
>         sourceSnapshotEncryptionKey?: {
>           rawKey?: string,
>           rsaEncryptedKey?: string,
>           kmsKeyName?: string,
>           sha256?: string,
>           kmsKeyServiceAccount?: string
>         },
>         sourceImageEncryptionKey?: {
>           rawKey?: string,
>           rsaEncryptedKey?: string,
>           kmsKeyName?: string,
>           sha256?: string,
>           kmsKeyServiceAccount?: string
>         },
>         sourceSnapshot?: string,
>         diskType?: string,
>         architecture?: ARCHITECTURE_UNSPECIFIED | ARM64 | X86_64,
>         diskName?: string,
>         provisionedIops?: string | number,
>         storagePool?: string,
>         diskSizeGb?: string | number,
>         description?: string,
>         sourceImage?: string,
>         onUpdateAction?: RECREATE_DISK | RECREATE_DISK_IF_SOURCE_CHANGED | USE_EXISTING_DISK,
>         labels?: Record<string, string>,
>         enableConfidentialCompute?: boolean,
>         resourcePolicies?: string[]
>       },
>       autoDelete?: boolean,
>       guestOsFeatures?: {
>         type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
>       }[],
>       type?: PERSISTENT | SCRATCH,
>       interface?: NVME | SCSI,
>       boot?: boolean,
>       diskEncryptionKey?: {
>         rawKey?: string,
>         rsaEncryptedKey?: string,
>         kmsKeyName?: string,
>         sha256?: string,
>         kmsKeyServiceAccount?: string
>       },
>       diskSizeGb?: string | number
>     }[],
>     minCpuPlatform?: string,
>     machineTypes?: string[]
>   }>
> }
> ```

> [accordion] locationPolicy full type
>
> ```ts theme={null}
> {
>   locations?: Record<string, {
>     constraints?: {
>       maxCount?: number
>     },
>     preference?: ALLOW | DENY | PREFERENCE_UNSPECIFIED
>   }>,
>   targetShape?: ANY | ANY_SINGLE_ZONE | BALANCED,
>   zones?: {
>     zone?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.delete

`compute.instances.delete`

Deletes the specified Instance resource. For more information, seeDeleting an instance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instances.delete({ zone: 'us-central1-a', project: 'demo-project', instance: 'web-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noGracefulShutdown` | `boolean` | No | If set to true, Graceful Shutdown is skipped. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Name of the instance resource to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.deleteAccessConfig

`compute.instances.deleteAccessConfig`

Deletes an access config from an instance's network interface

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instances.deleteAccessConfig({
	networkInterface: 'nic0',
	accessConfig: 'External NAT',
	instance: 'web-1',
	zone: 'us-central1-a',
	project: 'demo-project',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `networkInterface` | `string` | Yes | The name of the network interface. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `accessConfig` | `string` | Yes | The name of the access config to delete. |
| `instance` | `string` | Yes | The instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.deleteNetworkInterface

`compute.instances.deleteNetworkInterface`

Deletes one dynamic network interface from an active instance. InstancesDeleteNetworkInterfaceRequest indicates: - instance from which to delete, using project+zone+resource\_id fields; - dynamic network interface to be deleted, using network\_interface\_name field;

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instances.deleteNetworkInterface({
	networkInterfaceName: 'nic1',
	zone: 'us-central1-a',
	instance: 'web-1',
	project: 'demo-project',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `networkInterfaceName` | `string` | Yes | The name of the dynamic network interface to be deleted from the instance. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instance` | `string` | Yes | The instance name for this request stored as resource\_id. Name should conform to RFC1035 or be an unsigned long integer. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.detachDisk

`compute.instances.detachDisk`

Detaches a disk from an instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.detachDisk({
	project: 'demo-project',
	instance: 'web-1',
	deviceName: 'data-1',
	zone: 'us-central1-a',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `deviceName` | `string` | Yes | The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.get

`compute.instances.get`

Returns the specified Instance resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.get({ instance: 'web-1', zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Name of the instance resource to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | An optional description of this resource. Provide this property when you create the resource. |
| `networkInterfaces` | `object[] \| null` | No | 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. |
| `hostname` | `string \| null` | No | Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is \[INSTANCE\_NAME].c.\[PROJECT\_ID].internal when using the global DNS, and \[INSTANCE\_NAME].\[ZONE].c.\[PROJECT\_ID].internal when using zonal DNS. |
| `status` | `string \| null` | No | Output only. \[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING,RUNNING, STOPPING, SUSPENDING,SUSPENDED, REPAIRING, andTERMINATED. For more information about the status of the instance, see Instance life cycle. |
| `reservationAffinity` | `object \| null` | No | Specifies the reservations that this instance can consume from. |
| `metadata` | `object \| null` | No | A metadata key/value entry. |
| `deletionProtection` | `boolean \| null` | No | Whether the resource should be protected against deletion. |
| `lastStartTimestamp` | `string \| null` | No | Output only. \[Output Only] Last start timestamp inRFC3339 text format. |
| `keyRevocationActionType` | `string \| null` | No | KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. |
| `shieldedInstanceConfig` | `object \| null` | No | A set of Shielded Instance options. |
| `machineType` | `string \| null` | No | Full or partial URL of the machine type resource to use for this instance, in the format:zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create acustom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. |
| `advancedMachineFeatures` | `object \| null` | No | Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of anImage (e.g., whether or not the OS in theImage supports nested virtualization being enabled or disabled). |
| `tags` | `object \| null` | No | A set of instance tags. |
| `startRestricted` | `boolean \| null` | No | Output only. \[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity. |
| `lastSuspendedTimestamp` | `string \| null` | No | Output only. \[Output Only] Last suspended timestamp inRFC3339 text format. |
| `confidentialInstanceConfig` | `object \| null` | No | A set of Confidential Instance options. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. \[Output Only] Reserved for future use. |
| `displayDevice` | `object \| null` | No | A set of Display Device options |
| `cpuPlatform` | `string \| null` | No | Output only. \[Output Only] The CPU platform used by this instance. |
| `labels` | `Record<string, string> \| null` | No | Labels to apply to this instance. These can be later modified by the setLabels method. |
| `fingerprint` | `string \| null` | No | Specifies a fingerprint for this resource, which is essentially a hash of the instance's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance. To see the latest fingerprint, make get() request to the instance. (base64) |
| `name` | `string \| null` | No | 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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `resourcePolicies` | `string[] \| null` | No | Resource policies applied to this instance. |
| `serviceAccounts` | `object[] \| null` | No | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. SeeService Accounts for more information. |
| `minCpuPlatform` | `string \| null` | No | Specifies aminimum 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". |
| `lastStopTimestamp` | `string \| null` | No | Output only. \[Output Only] Last stop timestamp inRFC3339 text format. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `resourceStatus` | `object \| null` | No | Contains output only fields. Use this sub-message for actual values set on Instance attributes as compared to the value requested by the user (intent) in their instance CRUD calls. |
| `instanceEncryptionKey` | `object \| null` | No | — |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `scheduling` | `object \| null` | No | Sets the scheduling options for an Instance. |
| `canIpForward` | `boolean \| null` | No | 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, seeEnabling IP Forwarding. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. \[Output Only] Reserved for future use. |
| `zone` | `string \| null` | No | Output only. \[Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `workloadIdentityConfig` | `object \| null` | No | — |
| `sourceMachineImage` | `string \| null` | No | Source machine image |
| `statusMessage` | `string \| null` | No | Output only. \[Output Only] An optional, human-readable explanation of the status. |
| `sourceMachineImageEncryptionKey` | `object \| null` | No | — |
| `networkPerformanceConfig` | `object \| null` | No | — |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#instance for instances. |
| `localSsdEncryptionMode` | `string \| null` | No | Specifies which method should be used for encrypting the Local SSDs attached to the VM. |
| `shieldedInstanceIntegrityPolicy` | `object \| null` | No | The policy describes the baseline against which Instance boot integrity is measured. |
| `disks` | `object[] \| null` | No | Array of disks associated with this instance. Persistent disks must be created before you can assign them. |
| `labelFingerprint` | `string \| null` | No | A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the instance. (base64) |
| `guestAccelerators` | `object[] \| null` | No | A list of the type and count of accelerator cards attached to the instance. |
| `params` | `object \| null` | No | Additional instance params. |
| `privateIpv6GoogleAccess` | `string \| null` | No | The private IPv6 google access type for the VM. If not specified, use INHERIT\_FROM\_SUBNETWORK as default. |

> [accordion] networkInterfaces full type
>
> ```ts theme={null}
> {
>   vlan?: number | null,
>   stackType?: string | null,
>   nicType?: string | null,
>   serviceClassId?: string | null,
>   enableVpcScopedDns?: boolean | null,
>   igmpQuery?: string | null,
>   kind?: string | null,
>   name?: string | null,
>   aliasIpRanges?: {
>     subnetworkRangeName?: string | null,
>     ipCidrRange?: string | null
>   }[] | null,
>   internalIpv6PrefixLength?: number | null,
>   subnetwork?: string | null,
>   fingerprint?: string | null,
>   queueCount?: number | null,
>   aliasIpv6Ranges?: {
>     subnetworkRangeName?: string | null,
>     ipCidrRange?: string | null
>   }[] | null,
>   accessConfigs?: {
>     type?: string | null,
>     securityPolicy?: string | null,
>     name?: string | null,
>     kind?: string | null,
>     networkTier?: string | null,
>     publicPtrDomainName?: string | null,
>     setPublicPtr?: boolean | null,
>     externalIpv6?: string | null,
>     natIP?: string | null,
>     externalIpv6PrefixLength?: number | null
>   }[] | null,
>   networkAttachment?: string | null,
>   networkIP?: string | null,
>   ipv6Address?: string | null,
>   ipv6AccessType?: string | null,
>   ipv6AccessConfigs?: {
>     type?: string | null,
>     securityPolicy?: string | null,
>     name?: string | null,
>     kind?: string | null,
>     networkTier?: string | null,
>     publicPtrDomainName?: string | null,
>     setPublicPtr?: boolean | null,
>     externalIpv6?: string | null,
>     natIP?: string | null,
>     externalIpv6PrefixLength?: number | null
>   }[] | null,
>   network?: string | null,
>   parentNicName?: string | null
> }[] | null
> ```

> [accordion] reservationAffinity full type
>
> ```ts theme={null}
> {
>   values?: string[] | null,
>   key?: string | null,
>   consumeReservationType?: string | null
> } | null
> ```

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   items?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   fingerprint?: string | null
> } | null
> ```

> [accordion] shieldedInstanceConfig full type
>
> ```ts theme={null}
> {
>   enableSecureBoot?: boolean | null,
>   enableVtpm?: boolean | null,
>   enableIntegrityMonitoring?: boolean | null
> } | null
> ```

> [accordion] advancedMachineFeatures full type
>
> ```ts theme={null}
> {
>   threadsPerCore?: number | null,
>   turboMode?: string | null,
>   visibleCoreCount?: number | null,
>   enableUefiNetworking?: boolean | null,
>   performanceMonitoringUnit?: string | null,
>   enableNestedVirtualization?: boolean | null
> } | null
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   items?: string[] | null,
>   fingerprint?: string | null
> } | null
> ```

> [accordion] confidentialInstanceConfig full type
>
> ```ts theme={null}
> {
>   enableConfidentialCompute?: boolean | null,
>   confidentialInstanceType?: string | null
> } | null
> ```

> [accordion] displayDevice full type
>
> ```ts theme={null}
> {
>   enableDisplay?: boolean | null
> } | null
> ```

> [accordion] serviceAccounts full type
>
> ```ts theme={null}
> {
>   scopes?: string[] | null,
>   email?: string | null
> }[] | null
> ```

> [accordion] resourceStatus full type
>
> ```ts theme={null}
> {
>   reservationConsumptionInfo?: {
>     consumedReservation?: string | null,
>     consumedReservationSubBlock?: string | null,
>     consumedReservationBlock?: string | null
>   } | null,
>   upcomingMaintenance?: {
>     type?: string | null,
>     windowStartTime?: string | null,
>     latestWindowStartTime?: string | null,
>     maintenanceOnShutdown?: boolean | null,
>     canReschedule?: boolean | null,
>     maintenanceReasons?: string[] | null,
>     maintenanceStatus?: string | null,
>     windowEndTime?: string | null
>   } | null,
>   physicalHostTopology?: {
>     subblock?: string | null,
>     additionalAttributes?: {
>       acceleratorTopologyIds?: Record<string, string> | null
>     } | null,
>     host?: string | null,
>     block?: string | null,
>     cluster?: string | null
>   } | null,
>   scheduling?: {
>     gracefulShutdownTimestamp?: string | null,
>     terminationTimestamp?: string | null,
>     availabilityDomain?: number | null
>   } | null,
>   shutdownDetails?: {
>     targetState?: string | null,
>     maxDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     requestTimestamp?: string | null,
>     stopState?: string | null
>   } | null,
>   physicalHost?: string | null,
>   effectiveInstanceMetadata?: {
>     vmDnsSettingMetadataValue?: string | null,
>     enableOsInventoryMetadataValue?: boolean | null,
>     enableOsloginMetadataValue?: boolean | null,
>     enableGuestAttributesMetadataValue?: boolean | null,
>     gceContainerDeclarationMetadataValue?: boolean | null,
>     blockProjectSshKeysMetadataValue?: boolean | null,
>     serialPortLoggingEnableMetadataValue?: boolean | null,
>     serialPortEnableMetadataValue?: boolean | null,
>     enableOsconfigMetadataValue?: boolean | null
>   } | null
> } | null
> ```

> [accordion] instanceEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] scheduling full type
>
> ```ts theme={null}
> {
>   hostErrorTimeoutSeconds?: number | null,
>   localSsdRecoveryTimeout?: {
>     nanos?: number | null,
>     seconds?: string | number | null
>   } | null,
>   exposeHostTopology?: boolean | null,
>   preemptionNoticeDuration?: {
>     nanos?: number | null,
>     seconds?: string | number | null
>   } | null,
>   skipGuestOsShutdown?: boolean | null,
>   availabilityDomain?: number | null,
>   automaticRestart?: boolean | null,
>   terminationTime?: string | null,
>   onInstanceStopAction?: {
>     discardLocalSsd?: boolean | null
>   } | null,
>   locationHint?: string | null,
>   onHostMaintenance?: string | null,
>   maxRunDuration?: {
>     nanos?: number | null,
>     seconds?: string | number | null
>   } | null,
>   nodeAffinities?: {
>     operator?: string | null,
>     key?: string | null,
>     values?: string[] | null
>   }[] | null,
>   provisioningModel?: string | null,
>   instanceTerminationAction?: string | null,
>   gracefulShutdown?: {
>     maxDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     enabled?: boolean | null
>   } | null,
>   preemptible?: boolean | null,
>   minNodeCpus?: number | null
> } | null
> ```

> [accordion] workloadIdentityConfig full type
>
> ```ts theme={null}
> {
>   identityCertificateEnabled?: boolean | null,
>   identity?: string | null
> } | null
> ```

> [accordion] sourceMachineImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] networkPerformanceConfig full type
>
> ```ts theme={null}
> {
>   totalEgressBandwidthTier?: string | null
> } | null
> ```

> [accordion] shieldedInstanceIntegrityPolicy full type
>
> ```ts theme={null}
> {
>   updateAutoLearnPolicy?: boolean | null
> } | null
> ```

> [accordion] disks full type
>
> ```ts theme={null}
> {
>   forceAttach?: boolean | null,
>   index?: number | null,
>   savedState?: string | null,
>   deviceName?: string | null,
>   mode?: string | null,
>   source?: string | null,
>   shieldedInstanceInitialState?: {
>     keks?: {
>       fileType?: string | null,
>       content?: string | null
>     }[] | null,
>     dbs?: {
>       fileType?: string | null,
>       content?: string | null
>     }[] | null,
>     dbxs?: {
>       fileType?: string | null,
>       content?: string | null
>     }[] | null,
>     pk?: {
>       fileType?: string | null,
>       content?: string | null
>     } | null
>   } | null,
>   licenses?: string[] | null,
>   architecture?: string | null,
>   initializeParams?: {
>     resourceManagerTags?: Record<string, string> | null,
>     licenses?: string[] | null,
>     replicaZones?: string[] | null,
>     provisionedThroughput?: string | number | null,
>     sourceSnapshotEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     sourceImageEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     sourceSnapshot?: string | null,
>     diskType?: string | null,
>     architecture?: string | null,
>     diskName?: string | null,
>     provisionedIops?: string | number | null,
>     storagePool?: string | null,
>     diskSizeGb?: string | number | null,
>     description?: string | null,
>     sourceImage?: string | null,
>     onUpdateAction?: string | null,
>     labels?: Record<string, string> | null,
>     enableConfidentialCompute?: boolean | null,
>     resourcePolicies?: string[] | null
>   } | null,
>   autoDelete?: boolean | null,
>   guestOsFeatures?: {
>     type?: string | null
>   }[] | null,
>   type?: string | null,
>   interface?: string | null,
>   kind?: string | null,
>   boot?: boolean | null,
>   diskEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   diskSizeGb?: string | number | null
> }[] | null
> ```

> [accordion] guestAccelerators full type
>
> ```ts theme={null}
> {
>   acceleratorCount?: number | null,
>   acceleratorType?: string | null
> }[] | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null,
>   requestValidForDuration?: {
>     nanos?: number | null,
>     seconds?: string | number | null
>   } | null
> } | null
> ```

***

### instances.getEffectiveFirewalls

`compute.instances.getEffectiveFirewalls`

Returns effective firewalls applied to an interface of the instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.getEffectiveFirewalls({
	networkInterface: 'nic0',
	zone: 'us-central1-a',
	instance: 'web-1',
	project: 'demo-project',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `networkInterface` | `string` | Yes | The name of the network interface to get the effective firewalls. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `firewalls` | `object[] \| null` | No | Effective firewalls on the instance. |
| `firewallPolicys` | `object[] \| null` | No | \[Output Only] Effective firewalls from firewall policies. |

> [accordion] firewalls full type
>
> ```ts theme={null}
> {
>   creationTimestamp?: string | null,
>   logConfig?: {
>     enable?: boolean | null,
>     metadata?: string | null
>   } | null,
>   id?: string | number | null,
>   direction?: string | null,
>   allowed?: {
>     IPProtocol?: string | null,
>     ports?: string[] | null
>   }[] | null,
>   targetTags?: string[] | null,
>   kind?: string | null,
>   destinationRanges?: string[] | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   sourceTags?: string[] | null,
>   targetServiceAccounts?: string[] | null,
>   sourceServiceAccounts?: string[] | null,
>   name?: string | null,
>   priority?: number | null,
>   network?: string | null,
>   sourceRanges?: string[] | null,
>   selfLink?: string | null,
>   description?: string | null,
>   denied?: {
>     IPProtocol?: string | null,
>     ports?: string[] | null
>   }[] | null,
>   disabled?: boolean | null
> }[] | null
> ```

> [accordion] firewallPolicys full type
>
> ```ts theme={null}
> {
>   shortName?: string | null,
>   type?: string | null,
>   displayName?: string | null,
>   priority?: number | null,
>   rules?: {
>     enableLogging?: boolean | null,
>     securityProfileGroup?: string | null,
>     description?: string | null,
>     match?: {
>       srcSecureTags?: {
>         state?: string | null,
>         name?: string | null
>       }[] | null,
>       srcThreatIntelligences?: string[] | null,
>       destNetworkContext?: string | null,
>       srcRegionCodes?: string[] | null,
>       srcFqdns?: string[] | null,
>       srcNetworkContext?: string | null,
>       srcAddressGroups?: string[] | null,
>       srcNetworks?: string[] | null,
>       srcIpRanges?: string[] | null,
>       layer4Configs?: {
>         ports?: string[] | null,
>         ipProtocol?: string | null
>       }[] | null,
>       destThreatIntelligences?: string[] | null,
>       destNetworkType?: string | null,
>       destFqdns?: string[] | null,
>       destRegionCodes?: string[] | null,
>       srcNetworkType?: string | null,
>       destIpRanges?: string[] | null,
>       destAddressGroups?: string[] | null
>     } | null,
>     direction?: string | null,
>     targetResources?: string[] | null,
>     targetType?: string | null,
>     targetServiceAccounts?: string[] | null,
>     disabled?: boolean | null,
>     tlsInspect?: boolean | null,
>     ruleName?: string | null,
>     priority?: number | null,
>     ruleTupleCount?: number | null,
>     action?: string | null,
>     targetForwardingRules?: string[] | null,
>     kind?: string | null,
>     targetSecureTags?: {
>       state?: string | null,
>       name?: string | null
>     }[] | null
>   }[] | null,
>   name?: string | null,
>   packetMirroringRules?: {
>     enableLogging?: boolean | null,
>     securityProfileGroup?: string | null,
>     description?: string | null,
>     match?: {
>       srcSecureTags?: {
>         state?: string | null,
>         name?: string | null
>       }[] | null,
>       srcThreatIntelligences?: string[] | null,
>       destNetworkContext?: string | null,
>       srcRegionCodes?: string[] | null,
>       srcFqdns?: string[] | null,
>       srcNetworkContext?: string | null,
>       srcAddressGroups?: string[] | null,
>       srcNetworks?: string[] | null,
>       srcIpRanges?: string[] | null,
>       layer4Configs?: {
>         ports?: string[] | null,
>         ipProtocol?: string | null
>       }[] | null,
>       destThreatIntelligences?: string[] | null,
>       destNetworkType?: string | null,
>       destFqdns?: string[] | null,
>       destRegionCodes?: string[] | null,
>       srcNetworkType?: string | null,
>       destIpRanges?: string[] | null,
>       destAddressGroups?: string[] | null
>     } | null,
>     direction?: string | null,
>     targetResources?: string[] | null,
>     targetType?: string | null,
>     targetServiceAccounts?: string[] | null,
>     disabled?: boolean | null,
>     tlsInspect?: boolean | null,
>     ruleName?: string | null,
>     priority?: number | null,
>     ruleTupleCount?: number | null,
>     action?: string | null,
>     targetForwardingRules?: string[] | null,
>     kind?: string | null,
>     targetSecureTags?: {
>       state?: string | null,
>       name?: string | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

***

### instances.getGuestAttributes

`compute.instances.getGuestAttributes`

Returns the specified guest attributes entry

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.getGuestAttributes({ project: 'demo-project', instance: 'web-1', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `variableKey` | `string` | No | Specifies the key for the guest attributes entry. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `queryPath` | `string` | No | Specifies the guest attributes path to be queried. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `queryPath` | `string \| null` | No | The path to be queried. This can be the default namespace ('') or a nested namespace ('\\/') or a specified key ('\\/\\'). |
| `queryValue` | `object \| null` | No | Array of guest attribute namespace/key/value tuples. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `variableValue` | `string \| null` | No | Output only. \[Output Only] The value found for the requested key. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Alwayscompute#guestAttributes for guest attributes entry. |
| `variableKey` | `string \| null` | No | The key to search for. |

> [accordion] queryValue full type
>
> ```ts theme={null}
> {
>   items?: {
>     namespace?: string | null,
>     key?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

***

### instances.getIamPolicy

`compute.instances.getIamPolicy`

Gets the access control policy for a resource. May be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.getIamPolicy({ zone: 'us-central1-a', resource: 'web-1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `optionsRequestedPolicyVersion` | `number` | No | Requested IAM Policy version. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### instances.getScreenshot

`compute.instances.getScreenshot`

Returns the screenshot from the specified instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.getScreenshot({ instance: 'web-1', project: 'demo-project', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contents` | `string \| null` | No | \[Output Only] The Base64-encoded screenshot data. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#screenshot for the screenshots. |

***

### instances.getSerialPortOutput

`compute.instances.getSerialPortOutput`

Returns the last 1 MB of serial port output from the specified instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.getSerialPortOutput({ project: 'demo-project', instance: 'web-1', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Name of the instance for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `start` | `string \| number` | No | Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. |
| `port` | `number` | No | Specifies which COM or serial port to retrieve data from. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `contents` | `string \| null` | No | \[Output Only] The contents of the console output. |
| `next` | `string \| number \| null` | No | \[Output Only] The position of the next byte of content, regardless of whether the content exists, following the output returned in the `contents` property. Use this value in the next request as the start parameter. |
| `start` | `string \| number \| null` | No | The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer (1 MB), older output is overwritten by newer content. The output start value will indicate the byte position of the output that was returned, which might be different than the `start` value that was specified in the request. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Alwayscompute#serialPortOutput for serial port output. |

***

### instances.getShieldedInstanceIdentity

`compute.instances.getShieldedInstanceIdentity`

Returns the Shielded Instance Identity of an instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.getShieldedInstanceIdentity({ instance: 'web-1', project: 'demo-project', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Name or id of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `eccP256EncryptionKey` | `object \| null` | No | A Shielded Instance Identity Entry. |
| `eccP256SigningKey` | `object \| null` | No | A Shielded Instance Identity Entry. |
| `encryptionKey` | `object \| null` | No | A Shielded Instance Identity Entry. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Alwayscompute#shieldedInstanceIdentity for shielded Instance identity entry. |
| `signingKey` | `object \| null` | No | A Shielded Instance Identity Entry. |

> [accordion] eccP256EncryptionKey full type
>
> ```ts theme={null}
> {
>   ekPub?: string | null,
>   ekCert?: string | null
> } | null
> ```

> [accordion] eccP256SigningKey full type
>
> ```ts theme={null}
> {
>   ekPub?: string | null,
>   ekCert?: string | null
> } | null
> ```

> [accordion] encryptionKey full type
>
> ```ts theme={null}
> {
>   ekPub?: string | null,
>   ekCert?: string | null
> } | null
> ```

> [accordion] signingKey full type
>
> ```ts theme={null}
> {
>   ekPub?: string | null,
>   ekCert?: string | null
> } | null
> ```

***

### instances.insert

`compute.instances.insert`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.insert({
	project: 'demo-project',
	zone: 'us-central1-a',
	name: 'web-1',
	machineType: 'projects/demo-project/zones/us-central1-a/machineTypes/e2-medium',
	disks: [{
		boot: true,
		autoDelete: true,
		initializeParams: { sourceImage: 'projects/debian-cloud/global/images/family/debian-12' },
	}],
	networkInterfaces: [{
		network: 'global/networks/default',
		accessConfigs: [{ type: 'ONE_TO_ONE_NAT', name: 'External NAT' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `sourceInstanceTemplate` | `string` | No | Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - [https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate](https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate) - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `sourceMachineImage` | `string` | No | Specifies the machine image to use to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image: - [https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage](https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage) - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `networkInterfaces` | `object[]` | No | 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. |
| `hostname` | `string` | No | Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is \[INSTANCE\_NAME].c.\[PROJECT\_ID].internal when using the global DNS, and \[INSTANCE\_NAME].\[ZONE].c.\[PROJECT\_ID].internal when using zonal DNS. |
| `reservationAffinity` | `object` | No | Specifies the reservations that this instance can consume from. |
| `metadata` | `object` | No | A metadata key/value entry. |
| `deletionProtection` | `boolean` | No | Whether the resource should be protected against deletion. |
| `keyRevocationActionType` | `KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED \| NONE \| STOP` | No | KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. |
| `shieldedInstanceConfig` | `object` | No | A set of Shielded Instance options. |
| `machineType` | `string` | No | Full or partial URL of the machine type resource to use for this instance, in the format:zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create acustom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. |
| `advancedMachineFeatures` | `object` | No | Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of anImage (e.g., whether or not the OS in theImage supports nested virtualization being enabled or disabled). |
| `tags` | `object` | No | A set of instance tags. |
| `confidentialInstanceConfig` | `object` | No | A set of Confidential Instance options. |
| `displayDevice` | `object` | No | A set of Display Device options |
| `labels` | `Record<string, string>` | No | Labels to apply to this instance. These can be later modified by the setLabels method. |
| `fingerprint` | `string` | No | Specifies a fingerprint for this resource, which is essentially a hash of the instance's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance. To see the latest fingerprint, make get() request to the instance. (base64) |
| `name` | `string` | No | 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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `resourcePolicies` | `string[]` | No | Resource policies applied to this instance. |
| `serviceAccounts` | `object[]` | No | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. SeeService Accounts for more information. |
| `minCpuPlatform` | `string` | No | Specifies aminimum 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". |
| `instanceEncryptionKey` | `object` | No | — |
| `scheduling` | `object` | No | Sets the scheduling options for an Instance. |
| `canIpForward` | `boolean` | No | 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, seeEnabling IP Forwarding. |
| `workloadIdentityConfig` | `object` | No | — |
| `body_sourceMachineImage` | `string` | No | Source machine image |
| `sourceMachineImageEncryptionKey` | `object` | No | — |
| `networkPerformanceConfig` | `object` | No | — |
| `localSsdEncryptionMode` | `EPHEMERAL_KEY_ENCRYPTION \| LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED \| STANDARD_ENCRYPTION` | No | Specifies which method should be used for encrypting the Local SSDs attached to the VM. |
| `shieldedInstanceIntegrityPolicy` | `object` | No | The policy describes the baseline against which Instance boot integrity is measured. |
| `disks` | `object[]` | No | Array of disks associated with this instance. Persistent disks must be created before you can assign them. |
| `labelFingerprint` | `string` | No | A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the instance. (base64) |
| `guestAccelerators` | `object[]` | No | A list of the type and count of accelerator cards attached to the instance. |
| `params` | `object` | No | Additional instance params. |
| `privateIpv6GoogleAccess` | `ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE \| ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE \| INHERIT_FROM_SUBNETWORK` | No | The private IPv6 google access type for the VM. If not specified, use INHERIT\_FROM\_SUBNETWORK as default. |

> [accordion] networkInterfaces full type
>
> ```ts theme={null}
> {
>   vlan?: number,
>   stackType?: IPV4_IPV6 | IPV4_ONLY | IPV6_ONLY,
>   nicType?: GVNIC | IDPF | IRDMA | MRDMA | UNSPECIFIED_NIC_TYPE | VIRTIO_NET,
>   serviceClassId?: string,
>   enableVpcScopedDns?: boolean,
>   igmpQuery?: IGMP_QUERY_DISABLED | IGMP_QUERY_V2,
>   name?: string,
>   aliasIpRanges?: {
>     subnetworkRangeName?: string,
>     ipCidrRange?: string
>   }[],
>   internalIpv6PrefixLength?: number,
>   subnetwork?: string,
>   fingerprint?: string,
>   queueCount?: number,
>   aliasIpv6Ranges?: {
>     subnetworkRangeName?: string,
>     ipCidrRange?: string
>   }[],
>   accessConfigs?: {
>     type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>     securityPolicy?: string,
>     name?: string,
>     networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>     publicPtrDomainName?: string,
>     setPublicPtr?: boolean,
>     externalIpv6?: string,
>     natIP?: string,
>     externalIpv6PrefixLength?: number
>   }[],
>   networkAttachment?: string,
>   networkIP?: string,
>   ipv6Address?: string,
>   ipv6AccessConfigs?: {
>     type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>     securityPolicy?: string,
>     name?: string,
>     networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>     publicPtrDomainName?: string,
>     setPublicPtr?: boolean,
>     externalIpv6?: string,
>     natIP?: string,
>     externalIpv6PrefixLength?: number
>   }[],
>   network?: string,
>   parentNicName?: string
> }[]
> ```

> [accordion] reservationAffinity full type
>
> ```ts theme={null}
> {
>   values?: string[],
>   key?: string,
>   consumeReservationType?: ANY_RESERVATION | NO_RESERVATION | SPECIFIC_RESERVATION | UNSPECIFIED
> }
> ```

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   items?: {
>     key?: string,
>     value?: string
>   }[],
>   fingerprint?: string
> }
> ```

> [accordion] shieldedInstanceConfig full type
>
> ```ts theme={null}
> {
>   enableSecureBoot?: boolean,
>   enableVtpm?: boolean,
>   enableIntegrityMonitoring?: boolean
> }
> ```

> [accordion] advancedMachineFeatures full type
>
> ```ts theme={null}
> {
>   threadsPerCore?: number,
>   turboMode?: string,
>   visibleCoreCount?: number,
>   enableUefiNetworking?: boolean,
>   performanceMonitoringUnit?: ARCHITECTURAL | ENHANCED | PERFORMANCE_MONITORING_UNIT_UNSPECIFIED | STANDARD,
>   enableNestedVirtualization?: boolean
> }
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   items?: string[],
>   fingerprint?: string
> }
> ```

> [accordion] confidentialInstanceConfig full type
>
> ```ts theme={null}
> {
>   enableConfidentialCompute?: boolean,
>   confidentialInstanceType?: BMSAI | CCA | CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED | SEV | SEV_SNP | TDX
> }
> ```

> [accordion] displayDevice full type
>
> ```ts theme={null}
> {
>   enableDisplay?: boolean
> }
> ```

> [accordion] serviceAccounts full type
>
> ```ts theme={null}
> {
>   scopes?: string[],
>   email?: string
> }[]
> ```

> [accordion] instanceEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] scheduling full type
>
> ```ts theme={null}
> {
>   hostErrorTimeoutSeconds?: number,
>   localSsdRecoveryTimeout?: {
>     nanos?: number,
>     seconds?: string | number
>   },
>   exposeHostTopology?: boolean,
>   preemptionNoticeDuration?: {
>     nanos?: number,
>     seconds?: string | number
>   },
>   skipGuestOsShutdown?: boolean,
>   availabilityDomain?: number,
>   automaticRestart?: boolean,
>   terminationTime?: string,
>   onInstanceStopAction?: {
>     discardLocalSsd?: boolean
>   },
>   locationHint?: string,
>   onHostMaintenance?: MIGRATE | TERMINATE,
>   maxRunDuration?: {
>     nanos?: number,
>     seconds?: string | number
>   },
>   nodeAffinities?: {
>     operator?: IN | NOT_IN | OPERATOR_UNSPECIFIED,
>     key?: string,
>     values?: string[]
>   }[],
>   provisioningModel?: FLEX_START | RESERVATION_BOUND | SPOT | STANDARD,
>   instanceTerminationAction?: DELETE | INSTANCE_TERMINATION_ACTION_UNSPECIFIED | STOP,
>   gracefulShutdown?: {
>     maxDuration?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     enabled?: boolean
>   },
>   preemptible?: boolean,
>   minNodeCpus?: number
> }
> ```

> [accordion] workloadIdentityConfig full type
>
> ```ts theme={null}
> {
>   identityCertificateEnabled?: boolean,
>   identity?: string
> }
> ```

> [accordion] sourceMachineImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] networkPerformanceConfig full type
>
> ```ts theme={null}
> {
>   totalEgressBandwidthTier?: DEFAULT | TIER_1
> }
> ```

> [accordion] shieldedInstanceIntegrityPolicy full type
>
> ```ts theme={null}
> {
>   updateAutoLearnPolicy?: boolean
> }
> ```

> [accordion] disks full type
>
> ```ts theme={null}
> {
>   forceAttach?: boolean,
>   deviceName?: string,
>   mode?: READ_ONLY | READ_WRITE,
>   source?: string,
>   initializeParams?: {
>     resourceManagerTags?: Record<string, string>,
>     licenses?: string[],
>     replicaZones?: string[],
>     provisionedThroughput?: string | number,
>     sourceSnapshotEncryptionKey?: {
>       rawKey?: string,
>       rsaEncryptedKey?: string,
>       kmsKeyName?: string,
>       sha256?: string,
>       kmsKeyServiceAccount?: string
>     },
>     sourceImageEncryptionKey?: {
>       rawKey?: string,
>       rsaEncryptedKey?: string,
>       kmsKeyName?: string,
>       sha256?: string,
>       kmsKeyServiceAccount?: string
>     },
>     sourceSnapshot?: string,
>     diskType?: string,
>     architecture?: ARCHITECTURE_UNSPECIFIED | ARM64 | X86_64,
>     diskName?: string,
>     provisionedIops?: string | number,
>     storagePool?: string,
>     diskSizeGb?: string | number,
>     description?: string,
>     sourceImage?: string,
>     onUpdateAction?: RECREATE_DISK | RECREATE_DISK_IF_SOURCE_CHANGED | USE_EXISTING_DISK,
>     labels?: Record<string, string>,
>     enableConfidentialCompute?: boolean,
>     resourcePolicies?: string[]
>   },
>   autoDelete?: boolean,
>   guestOsFeatures?: {
>     type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
>   }[],
>   type?: PERSISTENT | SCRATCH,
>   interface?: NVME | SCSI,
>   boot?: boolean,
>   diskEncryptionKey?: {
>     rawKey?: string,
>     rsaEncryptedKey?: string,
>     kmsKeyName?: string,
>     sha256?: string,
>     kmsKeyServiceAccount?: string
>   },
>   diskSizeGb?: string | number
> }[]
> ```

> [accordion] guestAccelerators full type
>
> ```ts theme={null}
> {
>   acceleratorCount?: number,
>   acceleratorType?: string
> }[]
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>,
>   requestValidForDuration?: {
>     nanos?: number,
>     seconds?: string | number
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.list

`compute.instances.list`

Retrieves the list of instances contained within the specified zone (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.list({ project: 'demo-project', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `maxResults` | `number` | No | 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`) |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#instanceList for lists of Instance resources. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `items` | `object[] \| null` | No | A list of Instance resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   code?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   networkInterfaces?: {
>     vlan?: number | null,
>     stackType?: string | null,
>     nicType?: string | null,
>     serviceClassId?: string | null,
>     enableVpcScopedDns?: boolean | null,
>     igmpQuery?: string | null,
>     kind?: string | null,
>     name?: string | null,
>     aliasIpRanges?: {
>       subnetworkRangeName?: string | null,
>       ipCidrRange?: string | null
>     }[] | null,
>     internalIpv6PrefixLength?: number | null,
>     subnetwork?: string | null,
>     fingerprint?: string | null,
>     queueCount?: number | null,
>     aliasIpv6Ranges?: {
>       subnetworkRangeName?: string | null,
>       ipCidrRange?: string | null
>     }[] | null,
>     accessConfigs?: {
>       type?: string | null,
>       securityPolicy?: string | null,
>       name?: string | null,
>       kind?: string | null,
>       networkTier?: string | null,
>       publicPtrDomainName?: string | null,
>       setPublicPtr?: boolean | null,
>       externalIpv6?: string | null,
>       natIP?: string | null,
>       externalIpv6PrefixLength?: number | null
>     }[] | null,
>     networkAttachment?: string | null,
>     networkIP?: string | null,
>     ipv6Address?: string | null,
>     ipv6AccessType?: string | null,
>     ipv6AccessConfigs?: {
>       type?: string | null,
>       securityPolicy?: string | null,
>       name?: string | null,
>       kind?: string | null,
>       networkTier?: string | null,
>       publicPtrDomainName?: string | null,
>       setPublicPtr?: boolean | null,
>       externalIpv6?: string | null,
>       natIP?: string | null,
>       externalIpv6PrefixLength?: number | null
>     }[] | null,
>     network?: string | null,
>     parentNicName?: string | null
>   }[] | null,
>   hostname?: string | null,
>   status?: string | null,
>   reservationAffinity?: {
>     values?: string[] | null,
>     key?: string | null,
>     consumeReservationType?: string | null
>   } | null,
>   metadata?: {
>     kind?: string | null,
>     items?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     fingerprint?: string | null
>   } | null,
>   deletionProtection?: boolean | null,
>   lastStartTimestamp?: string | null,
>   keyRevocationActionType?: string | null,
>   shieldedInstanceConfig?: {
>     enableSecureBoot?: boolean | null,
>     enableVtpm?: boolean | null,
>     enableIntegrityMonitoring?: boolean | null
>   } | null,
>   machineType?: string | null,
>   advancedMachineFeatures?: {
>     threadsPerCore?: number | null,
>     turboMode?: string | null,
>     visibleCoreCount?: number | null,
>     enableUefiNetworking?: boolean | null,
>     performanceMonitoringUnit?: string | null,
>     enableNestedVirtualization?: boolean | null
>   } | null,
>   tags?: {
>     items?: string[] | null,
>     fingerprint?: string | null
>   } | null,
>   startRestricted?: boolean | null,
>   lastSuspendedTimestamp?: string | null,
>   confidentialInstanceConfig?: {
>     enableConfidentialCompute?: boolean | null,
>     confidentialInstanceType?: string | null
>   } | null,
>   satisfiesPzi?: boolean | null,
>   displayDevice?: {
>     enableDisplay?: boolean | null
>   } | null,
>   cpuPlatform?: string | null,
>   labels?: Record<string, string> | null,
>   fingerprint?: string | null,
>   name?: string | null,
>   resourcePolicies?: string[] | null,
>   serviceAccounts?: {
>     scopes?: string[] | null,
>     email?: string | null
>   }[] | null,
>   minCpuPlatform?: string | null,
>   lastStopTimestamp?: string | null,
>   id?: string | number | null,
>   resourceStatus?: {
>     reservationConsumptionInfo?: {
>       consumedReservation?: string | null,
>       consumedReservationSubBlock?: string | null,
>       consumedReservationBlock?: string | null
>     } | null,
>     upcomingMaintenance?: {
>       type?: string | null,
>       windowStartTime?: string | null,
>       latestWindowStartTime?: string | null,
>       maintenanceOnShutdown?: boolean | null,
>       canReschedule?: boolean | null,
>       maintenanceReasons?: string[] | null,
>       maintenanceStatus?: string | null,
>       windowEndTime?: string | null
>     } | null,
>     physicalHostTopology?: {
>       subblock?: string | null,
>       additionalAttributes?: {
>         acceleratorTopologyIds?: Record<string, string> | null
>       } | null,
>       host?: string | null,
>       block?: string | null,
>       cluster?: string | null
>     } | null,
>     scheduling?: {
>       gracefulShutdownTimestamp?: string | null,
>       terminationTimestamp?: string | null,
>       availabilityDomain?: number | null
>     } | null,
>     shutdownDetails?: {
>       targetState?: string | null,
>       maxDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       requestTimestamp?: string | null,
>       stopState?: string | null
>     } | null,
>     physicalHost?: string | null,
>     effectiveInstanceMetadata?: {
>       vmDnsSettingMetadataValue?: string | null,
>       enableOsInventoryMetadataValue?: boolean | null,
>       enableOsloginMetadataValue?: boolean | null,
>       enableGuestAttributesMetadataValue?: boolean | null,
>       gceContainerDeclarationMetadataValue?: boolean | null,
>       blockProjectSshKeysMetadataValue?: boolean | null,
>       serialPortLoggingEnableMetadataValue?: boolean | null,
>       serialPortEnableMetadataValue?: boolean | null,
>       enableOsconfigMetadataValue?: boolean | null
>     } | null
>   } | null,
>   instanceEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   creationTimestamp?: string | null,
>   scheduling?: {
>     hostErrorTimeoutSeconds?: number | null,
>     localSsdRecoveryTimeout?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     exposeHostTopology?: boolean | null,
>     preemptionNoticeDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     skipGuestOsShutdown?: boolean | null,
>     availabilityDomain?: number | null,
>     automaticRestart?: boolean | null,
>     terminationTime?: string | null,
>     onInstanceStopAction?: {
>       discardLocalSsd?: boolean | null
>     } | null,
>     locationHint?: string | null,
>     onHostMaintenance?: string | null,
>     maxRunDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     nodeAffinities?: {
>       operator?: string | null,
>       key?: string | null,
>       values?: string[] | null
>     }[] | null,
>     provisioningModel?: string | null,
>     instanceTerminationAction?: string | null,
>     gracefulShutdown?: {
>       maxDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       enabled?: boolean | null
>     } | null,
>     preemptible?: boolean | null,
>     minNodeCpus?: number | null
>   } | null,
>   canIpForward?: boolean | null,
>   satisfiesPzs?: boolean | null,
>   zone?: string | null,
>   selfLink?: string | null,
>   workloadIdentityConfig?: {
>     identityCertificateEnabled?: boolean | null,
>     identity?: string | null
>   } | null,
>   sourceMachineImage?: string | null,
>   statusMessage?: string | null,
>   sourceMachineImageEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   networkPerformanceConfig?: {
>     totalEgressBandwidthTier?: string | null
>   } | null,
>   kind?: string | null,
>   localSsdEncryptionMode?: string | null,
>   shieldedInstanceIntegrityPolicy?: {
>     updateAutoLearnPolicy?: boolean | null
>   } | null,
>   disks?: {
>     forceAttach?: boolean | null,
>     index?: number | null,
>     savedState?: string | null,
>     deviceName?: string | null,
>     mode?: string | null,
>     source?: string | null,
>     shieldedInstanceInitialState?: {
>       keks?: {
>         fileType?: string | null,
>         content?: string | null
>       }[] | null,
>       dbs?: {
>         fileType?: string | null,
>         content?: string | null
>       }[] | null,
>       dbxs?: {
>         fileType?: string | null,
>         content?: string | null
>       }[] | null,
>       pk?: {
>         fileType?: string | null,
>         content?: string | null
>       } | null
>     } | null,
>     licenses?: string[] | null,
>     architecture?: string | null,
>     initializeParams?: {
>       resourceManagerTags?: Record<string, string> | null,
>       licenses?: string[] | null,
>       replicaZones?: string[] | null,
>       provisionedThroughput?: string | number | null,
>       sourceSnapshotEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       sourceImageEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       sourceSnapshot?: string | null,
>       diskType?: string | null,
>       architecture?: string | null,
>       diskName?: string | null,
>       provisionedIops?: string | number | null,
>       storagePool?: string | null,
>       diskSizeGb?: string | number | null,
>       description?: string | null,
>       sourceImage?: string | null,
>       onUpdateAction?: string | null,
>       labels?: Record<string, string> | null,
>       enableConfidentialCompute?: boolean | null,
>       resourcePolicies?: string[] | null
>     } | null,
>     autoDelete?: boolean | null,
>     guestOsFeatures?: {
>       type?: string | null
>     }[] | null,
>     type?: string | null,
>     interface?: string | null,
>     kind?: string | null,
>     boot?: boolean | null,
>     diskEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     diskSizeGb?: string | number | null
>   }[] | null,
>   labelFingerprint?: string | null,
>   guestAccelerators?: {
>     acceleratorCount?: number | null,
>     acceleratorType?: string | null
>   }[] | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null,
>     requestValidForDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null
>   } | null,
>   privateIpv6GoogleAccess?: string | null
> }[] | null
> ```

***

### instances.listReferrers

`compute.instances.listReferrers`

Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.listReferrers({ project: 'demo-project', instance: 'web-1', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `maxResults` | `number` | No | 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`) |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. Format: `-\|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#instanceListReferrers for lists of Instance referrers. |
| `items` | `object[] \| null` | No | A list of Reference resources. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   target?: string | null,
>   referrer?: string | null,
>   referenceType?: string | null,
>   kind?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

***

### instances.performMaintenance

`compute.instances.performMaintenance`

Perform a manual maintenance on the instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.performMaintenance({ zone: 'us-central1-a', instance: 'web-1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.removeResourcePolicies

`compute.instances.removeResourcePolicies`

Removes resource policies from an instance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instances.removeResourcePolicies({
	zone: 'us-central1-a',
	project: 'demo-project',
	instance: 'web-1',
	resourcePolicies: ['projects/demo-project/regions/us-central1/resourcePolicies/night-off'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | The instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `resourcePolicies` | `string[]` | No | Resource policies to be removed from this instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.reportHostAsFaulty

`compute.instances.reportHostAsFaulty`

Mark the host as faulty and try to restart the instance on a new host

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.reportHostAsFaulty({
	project: 'demo-project',
	instance: 'web-1',
	zone: 'us-central1-a',
	disruptionSchedule: 'IMMEDIATE',
	faultReasons: [{ behavior: 'PERFORMANCE', description: 'Slow disk' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `faultReasons` | `object[]` | No | — |
| `disruptionSchedule` | `DISRUPTION_SCHEDULE_UNSPECIFIED \| FUTURE \| IMMEDIATE` | No | The disruption schedule for the VM. Required field, only allows IMMEDIATE. |

> [accordion] faultReasons full type
>
> ```ts theme={null}
> {
>   behavior?: BEHAVIOR_UNSPECIFIED | CHIP_ERROR | PERFORMANCE | SILENT_DATA_CORRUPTION | UNRECOVERABLE_GPU_ERROR,
>   description?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.reset

`compute.instances.reset`

Performs a reset on the instance. This is a hard reset

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.reset({ zone: 'us-central1-a', instance: 'web-1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.resume

`compute.instances.resume`

Resumes an instance that was suspended using theinstances().suspend method

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.resume({ instance: 'web-1', zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instance` | `string` | Yes | Name of the instance resource to resume. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.sendDiagnosticInterrupt

`compute.instances.sendDiagnosticInterrupt`

Sends diagnostic interrupt to the instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.sendDiagnosticInterrupt({ zone: 'us-central1-a', instance: 'web-1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### instances.setDeletionProtection

`compute.instances.setDeletionProtection`

Sets deletion protection on the instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setDeletionProtection({ zone: 'us-central1-a', project: 'demo-project', resource: 'web-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `deletionProtection` | `boolean` | No | Whether the resource should be protected against deletion. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setDiskAutoDelete

`compute.instances.setDiskAutoDelete`

Sets the auto-delete flag for a disk attached to an instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setDiskAutoDelete({
	autoDelete: true,
	project: 'demo-project',
	instance: 'web-1',
	zone: 'us-central1-a',
	deviceName: 'data-1',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `autoDelete` | `boolean` | Yes | Whether to auto-delete the disk when the instance is deleted. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | The instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `deviceName` | `string` | Yes | The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. Format: `\\w[\\w.-]{0,254}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setIamPolicy

`compute.instances.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setIamPolicy({
	zone: 'us-central1-a',
	resource: 'web-1',
	project: 'demo-project',
	policy: {
		bindings: [{
			role: 'roles/compute.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `bindings` | `object[]` | No | Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. |
| `etag` | `string` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. (base64) |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: ADMIN_READ | DATA_READ | DATA_WRITE | LOG_TYPE_UNSPECIFIED,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   bindings?: {
>     role?: string,
>     members?: string[],
>     condition?: {
>       title?: string,
>       description?: string,
>       expression?: string,
>       location?: string
>     }
>   }[],
>   etag?: string
> }
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string,
>   members?: string[],
>   condition?: {
>     title?: string,
>     description?: string,
>     expression?: string,
>     location?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### instances.setLabels

`compute.instances.setLabels`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setLabels({
	project: 'demo-project',
	zone: 'us-central1-a',
	instance: 'web-1',
	labels: { env: 'prod' },
	labelFingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `labels` | `Record<string, string>` | No | — |
| `labelFingerprint` | `string` | No | 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. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setMachineResources

`compute.instances.setMachineResources`

Changes the number and/or type of accelerator for a stopped instance to the values specified in the request

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setMachineResources({
	project: 'demo-project',
	instance: 'web-1',
	zone: 'us-central1-a',
	guestAccelerators: [{ acceleratorType: 'projects/demo-project/zones/us-central1-a/acceleratorTypes/nvidia-l4', acceleratorCount: 1 }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `guestAccelerators` | `object[]` | No | A list of the type and count of accelerator cards attached to the instance. |

> [accordion] guestAccelerators full type
>
> ```ts theme={null}
> {
>   acceleratorCount?: number,
>   acceleratorType?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setMachineType

`compute.instances.setMachineType`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setMachineType({
	project: 'demo-project',
	zone: 'us-central1-a',
	instance: 'web-1',
	machineType: 'zones/us-central1-a/machineTypes/e2-standard-2',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `machineType` | `string` | No | 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 |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setMetadata

`compute.instances.setMetadata`

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

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setMetadata({
	project: 'demo-project',
	instance: 'web-1',
	zone: 'us-central1-a',
	fingerprint: '42WmSpB8rSM=',
	items: [{ key: 'enable-oslogin', value: 'TRUE' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `items` | `object[]` | No | Array of key/value pairs. The total size of all keys and values must be less than 512 KB. |
| `fingerprint` | `string` | No | Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource. (base64) |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   key?: string,
>   value?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setMinCpuPlatform

`compute.instances.setMinCpuPlatform`

Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setMinCpuPlatform({
	instance: 'web-1',
	zone: 'us-central1-a',
	project: 'demo-project',
	minCpuPlatform: 'Intel Ice Lake',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `minCpuPlatform` | `string` | No | Minimum cpu/platform this instance should be started at. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setName

`compute.instances.setName`

Sets name of an instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setName({
	zone: 'us-central1-a',
	project: 'demo-project',
	instance: 'web-1',
	currentName: 'web-1',
	name: 'web-01',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | The instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `currentName` | `string` | No | The current name of this resource, used to prevent conflicts. Provide the latest name when making a request to change name. |
| `name` | `string` | No | The name to be applied to the instance. Needs to be RFC 1035 compliant. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setScheduling

`compute.instances.setScheduling`

Sets an instance's scheduling options. You can only call this method on astopped instance, that is, a VM instance that is in a `TERMINATED` state

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setScheduling({
	project: 'demo-project',
	instance: 'web-1',
	zone: 'us-central1-a',
	automaticRestart: true,
	onHostMaintenance: 'MIGRATE',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `hostErrorTimeoutSeconds` | `number` | No | Specify the time in seconds for host error detection, the value must be within the range of \[90, 330] with the increment of 30, if unset, the default behavior of host error recovery will be used. |
| `localSsdRecoveryTimeout` | `object` | No | A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. |
| `exposeHostTopology` | `boolean` | No | This optional flag exposes the hashed physical host ID in the ResourceStatus resource of the VM. |
| `preemptionNoticeDuration` | `object` | No | A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. |
| `skipGuestOsShutdown` | `boolean` | No | Defines whether GCE ACPI G2 Soft Off signal should be skipped during shutdown operation of VM. Default is false, meaning there will be 120 seconds between GCE ACPI G2 Soft Off and ACPI G3 Mechanical Off for Standard VMs and 30 seconds for Spot VMs. |
| `availabilityDomain` | `number` | No | Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance. |
| `automaticRestart` | `boolean` | No | 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. |
| `terminationTime` | `string` | No | Specifies the timestamp, when the instance will be terminated, inRFC3339 text format. If specified, the instance termination action will be performed at the termination time. |
| `onInstanceStopAction` | `object` | No | Defines the behaviour for instances with the instance\_termination\_actionSTOP. |
| `locationHint` | `string` | No | An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API. |
| `onHostMaintenance` | `MIGRATE \| TERMINATE` | No | Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. Forpreemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. |
| `maxRunDuration` | `object` | No | A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. |
| `nodeAffinities` | `object[]` | No | A set of node affinity and anti-affinity configurations. Refer toConfiguring node affinity for more information. Overrides reservationAffinity. |
| `provisioningModel` | `FLEX_START \| RESERVATION_BOUND \| SPOT \| STANDARD` | No | Specifies the provisioning model of the instance. |
| `instanceTerminationAction` | `DELETE \| INSTANCE_TERMINATION_ACTION_UNSPECIFIED \| STOP` | No | Specifies the termination action for the instance. |
| `gracefulShutdown` | `object` | No | The configuration for gracefully shutting down the instance. |
| `preemptible` | `boolean` | No | Defines whether the instance is preemptible. This can only be set during instance creation or while the instance isstopped and therefore, in a `TERMINATED` state. SeeInstance Life Cycle for more information on the possible instance states. |
| `minNodeCpus` | `number` | No | The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. |

> [accordion] localSsdRecoveryTimeout full type
>
> ```ts theme={null}
> {
>   nanos?: number,
>   seconds?: string | number
> }
> ```

> [accordion] preemptionNoticeDuration full type
>
> ```ts theme={null}
> {
>   nanos?: number,
>   seconds?: string | number
> }
> ```

> [accordion] onInstanceStopAction full type
>
> ```ts theme={null}
> {
>   discardLocalSsd?: boolean
> }
> ```

> [accordion] maxRunDuration full type
>
> ```ts theme={null}
> {
>   nanos?: number,
>   seconds?: string | number
> }
> ```

> [accordion] nodeAffinities full type
>
> ```ts theme={null}
> {
>   operator?: IN | NOT_IN | OPERATOR_UNSPECIFIED,
>   key?: string,
>   values?: string[]
> }[]
> ```

> [accordion] gracefulShutdown full type
>
> ```ts theme={null}
> {
>   maxDuration?: {
>     nanos?: number,
>     seconds?: string | number
>   },
>   enabled?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setSecurityPolicy

`compute.instances.setSecurityPolicy`

Sets the Google Cloud Armor security policy for the specified instance. For more information, seeGoogle Cloud Armor Overview

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setSecurityPolicy({
	project: 'demo-project',
	zone: 'us-central1-a',
	instance: 'web-1',
	securityPolicy: 'projects/demo-project/regions/us-central1/securityPolicies/edge',
	networkInterfaces: ['nic0'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | Name of the zone scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `instance` | `string` | Yes | Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035. |
| `networkInterfaces` | `string[]` | No | The network interfaces that the security policy will be applied to. Network interfaces use the nicN naming format. You can only set a security policy for network interfaces with an access config. |
| `securityPolicy` | `string` | No | A full or partial URL to a security policy to add to this instance. If this field is set to an empty string it will remove the associated security policy. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setServiceAccount

`compute.instances.setServiceAccount`

Sets the service account on the instance. For more information, readChanging the service account and access scopes for an instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setServiceAccount({
	zone: 'us-central1-a',
	project: 'demo-project',
	instance: 'web-1',
	email: 'deployer@demo-project.iam.gserviceaccount.com',
	scopes: ['https://www.googleapis.com/auth/cloud-platform'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Name of the instance resource to start. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `scopes` | `string[]` | No | The list of scopes to be made available for this service account. |
| `email` | `string` | No | Email address of the service account. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setShieldedInstanceIntegrityPolicy

`compute.instances.setShieldedInstanceIntegrityPolicy`

Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setShieldedInstanceIntegrityPolicy({
	zone: 'us-central1-a',
	instance: 'web-1',
	project: 'demo-project',
	updateAutoLearnPolicy: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `instance` | `string` | Yes | Name or id of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `updateAutoLearnPolicy` | `boolean` | No | Updates the integrity policy baseline using the measurements from the VM instance's most recent boot. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.setTags

`compute.instances.setTags`

Sets network tags for the specified instance to the data included in the request

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.setTags({
	project: 'demo-project',
	instance: 'web-1',
	zone: 'us-central1-a',
	fingerprint: '42WmSpB8rSM=',
	items: ['web'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `items` | `string[]` | No | An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
| `fingerprint` | `string` | No | 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. To see the latest fingerprint, make get() request to the instance. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.simulateMaintenanceEvent

`compute.instances.simulateMaintenanceEvent`

Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.simulateMaintenanceEvent({ project: 'demo-project', instance: 'web-1', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `withExtendedNotifications` | `boolean` | No | Determines whether the customers receive notifications before migration. Only applicable to SF vms. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.start

`compute.instances.start`

Starts an instance that was stopped using theinstances().stop method. For more information, seeRestart an instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.start({ instance: 'web-1', project: 'demo-project', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Name of the instance resource to start. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.startWithEncryptionKey

`compute.instances.startWithEncryptionKey`

Starts an instance that was stopped using theinstances().stop method. For more information, seeRestart an instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.startWithEncryptionKey({
	instance: 'web-1',
	project: 'demo-project',
	zone: 'us-central1-a',
	disks: [{
		source: 'projects/demo-project/zones/us-central1-a/disks/web-1',
		diskEncryptionKey: { rawKey: 'the base64 key the disk was created with' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Name of the instance resource to start. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `disks` | `object[]` | No | Array of disks associated with this instance that are protected with acustomer-supplied encryption key. In order to start the instance, the disk url and its corresponding key must be provided. If the disk is not protected with a customer-supplied encryption key it should not be specified. |

> [accordion] disks full type
>
> ```ts theme={null}
> {
>   source?: string,
>   diskEncryptionKey?: {
>     rawKey?: string,
>     rsaEncryptedKey?: string,
>     kmsKeyName?: string,
>     sha256?: string,
>     kmsKeyServiceAccount?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.stop

`compute.instances.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

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.stop({ project: 'demo-project', zone: 'us-central1-a', instance: 'web-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Name of the instance resource to stop. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `noGracefulShutdown` | `boolean` | No | If set to true, Graceful Shutdown is skipped. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `discardLocalSsd` | `boolean` | No | This property is required if the instance has any attached Local SSD disks. If false, Local SSD data will be preserved when the instance is suspended. If true, the contents of any attached Local SSD disks will be discarded. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.suspend

`compute.instances.suspend`

This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.suspend({ zone: 'us-central1-a', instance: 'web-1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `discardLocalSsd` | `boolean` | No | This property is required if the instance has any attached Local SSD disks. If false, Local SSD data will be preserved when the instance is suspended. If true, the contents of any attached Local SSD disks will be discarded. |
| `instance` | `string` | Yes | Name of the instance resource to suspend. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.testIamPermissions

`compute.instances.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.testIamPermissions({
	zone: 'us-central1-a',
	resource: 'web-1',
	project: 'demo-project',
	permissions: ['compute.instances.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### instances.update

`compute.instances.update`

Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.update({
	zone: 'us-central1-a',
	project: 'demo-project',
	instance: 'web-1',
	name: 'web-1',
	machineType: 'projects/demo-project/zones/us-central1-a/machineTypes/e2-medium',
	description: 'Web server',
	fingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `discardLocalSsd` | `boolean` | No | Whether to discard local SSDs from the instance during restart default value is false. |
| `minimalAction` | `INVALID \| NO_EFFECT \| REFRESH \| RESTART` | No | Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `mostDisruptiveAllowedAction` | `INVALID \| NO_EFFECT \| REFRESH \| RESTART` | No | Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO\_EFFECT, REFRESH, and RESTART. |
| `instance` | `string` | Yes | Name of the instance resource to update. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `networkInterfaces` | `object[]` | No | 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. |
| `hostname` | `string` | No | Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is \[INSTANCE\_NAME].c.\[PROJECT\_ID].internal when using the global DNS, and \[INSTANCE\_NAME].\[ZONE].c.\[PROJECT\_ID].internal when using zonal DNS. |
| `reservationAffinity` | `object` | No | Specifies the reservations that this instance can consume from. |
| `metadata` | `object` | No | A metadata key/value entry. |
| `deletionProtection` | `boolean` | No | Whether the resource should be protected against deletion. |
| `keyRevocationActionType` | `KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED \| NONE \| STOP` | No | KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. |
| `shieldedInstanceConfig` | `object` | No | A set of Shielded Instance options. |
| `machineType` | `string` | No | Full or partial URL of the machine type resource to use for this instance, in the format:zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create acustom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. |
| `advancedMachineFeatures` | `object` | No | Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of anImage (e.g., whether or not the OS in theImage supports nested virtualization being enabled or disabled). |
| `tags` | `object` | No | A set of instance tags. |
| `confidentialInstanceConfig` | `object` | No | A set of Confidential Instance options. |
| `displayDevice` | `object` | No | A set of Display Device options |
| `labels` | `Record<string, string>` | No | Labels to apply to this instance. These can be later modified by the setLabels method. |
| `fingerprint` | `string` | No | Specifies a fingerprint for this resource, which is essentially a hash of the instance's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance. To see the latest fingerprint, make get() request to the instance. (base64) |
| `name` | `string` | No | 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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `resourcePolicies` | `string[]` | No | Resource policies applied to this instance. |
| `serviceAccounts` | `object[]` | No | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. SeeService Accounts for more information. |
| `minCpuPlatform` | `string` | No | Specifies aminimum 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". |
| `instanceEncryptionKey` | `object` | No | — |
| `scheduling` | `object` | No | Sets the scheduling options for an Instance. |
| `canIpForward` | `boolean` | No | 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, seeEnabling IP Forwarding. |
| `workloadIdentityConfig` | `object` | No | — |
| `sourceMachineImage` | `string` | No | Source machine image |
| `sourceMachineImageEncryptionKey` | `object` | No | — |
| `networkPerformanceConfig` | `object` | No | — |
| `localSsdEncryptionMode` | `EPHEMERAL_KEY_ENCRYPTION \| LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED \| STANDARD_ENCRYPTION` | No | Specifies which method should be used for encrypting the Local SSDs attached to the VM. |
| `shieldedInstanceIntegrityPolicy` | `object` | No | The policy describes the baseline against which Instance boot integrity is measured. |
| `disks` | `object[]` | No | Array of disks associated with this instance. Persistent disks must be created before you can assign them. |
| `labelFingerprint` | `string` | No | A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the instance. (base64) |
| `guestAccelerators` | `object[]` | No | A list of the type and count of accelerator cards attached to the instance. |
| `params` | `object` | No | Additional instance params. |
| `privateIpv6GoogleAccess` | `ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE \| ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE \| INHERIT_FROM_SUBNETWORK` | No | The private IPv6 google access type for the VM. If not specified, use INHERIT\_FROM\_SUBNETWORK as default. |

> [accordion] networkInterfaces full type
>
> ```ts theme={null}
> {
>   vlan?: number,
>   stackType?: IPV4_IPV6 | IPV4_ONLY | IPV6_ONLY,
>   nicType?: GVNIC | IDPF | IRDMA | MRDMA | UNSPECIFIED_NIC_TYPE | VIRTIO_NET,
>   serviceClassId?: string,
>   enableVpcScopedDns?: boolean,
>   igmpQuery?: IGMP_QUERY_DISABLED | IGMP_QUERY_V2,
>   name?: string,
>   aliasIpRanges?: {
>     subnetworkRangeName?: string,
>     ipCidrRange?: string
>   }[],
>   internalIpv6PrefixLength?: number,
>   subnetwork?: string,
>   fingerprint?: string,
>   queueCount?: number,
>   aliasIpv6Ranges?: {
>     subnetworkRangeName?: string,
>     ipCidrRange?: string
>   }[],
>   accessConfigs?: {
>     type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>     securityPolicy?: string,
>     name?: string,
>     networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>     publicPtrDomainName?: string,
>     setPublicPtr?: boolean,
>     externalIpv6?: string,
>     natIP?: string,
>     externalIpv6PrefixLength?: number
>   }[],
>   networkAttachment?: string,
>   networkIP?: string,
>   ipv6Address?: string,
>   ipv6AccessConfigs?: {
>     type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>     securityPolicy?: string,
>     name?: string,
>     networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>     publicPtrDomainName?: string,
>     setPublicPtr?: boolean,
>     externalIpv6?: string,
>     natIP?: string,
>     externalIpv6PrefixLength?: number
>   }[],
>   network?: string,
>   parentNicName?: string
> }[]
> ```

> [accordion] reservationAffinity full type
>
> ```ts theme={null}
> {
>   values?: string[],
>   key?: string,
>   consumeReservationType?: ANY_RESERVATION | NO_RESERVATION | SPECIFIC_RESERVATION | UNSPECIFIED
> }
> ```

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   items?: {
>     key?: string,
>     value?: string
>   }[],
>   fingerprint?: string
> }
> ```

> [accordion] shieldedInstanceConfig full type
>
> ```ts theme={null}
> {
>   enableSecureBoot?: boolean,
>   enableVtpm?: boolean,
>   enableIntegrityMonitoring?: boolean
> }
> ```

> [accordion] advancedMachineFeatures full type
>
> ```ts theme={null}
> {
>   threadsPerCore?: number,
>   turboMode?: string,
>   visibleCoreCount?: number,
>   enableUefiNetworking?: boolean,
>   performanceMonitoringUnit?: ARCHITECTURAL | ENHANCED | PERFORMANCE_MONITORING_UNIT_UNSPECIFIED | STANDARD,
>   enableNestedVirtualization?: boolean
> }
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   items?: string[],
>   fingerprint?: string
> }
> ```

> [accordion] confidentialInstanceConfig full type
>
> ```ts theme={null}
> {
>   enableConfidentialCompute?: boolean,
>   confidentialInstanceType?: BMSAI | CCA | CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED | SEV | SEV_SNP | TDX
> }
> ```

> [accordion] displayDevice full type
>
> ```ts theme={null}
> {
>   enableDisplay?: boolean
> }
> ```

> [accordion] serviceAccounts full type
>
> ```ts theme={null}
> {
>   scopes?: string[],
>   email?: string
> }[]
> ```

> [accordion] instanceEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] scheduling full type
>
> ```ts theme={null}
> {
>   hostErrorTimeoutSeconds?: number,
>   localSsdRecoveryTimeout?: {
>     nanos?: number,
>     seconds?: string | number
>   },
>   exposeHostTopology?: boolean,
>   preemptionNoticeDuration?: {
>     nanos?: number,
>     seconds?: string | number
>   },
>   skipGuestOsShutdown?: boolean,
>   availabilityDomain?: number,
>   automaticRestart?: boolean,
>   terminationTime?: string,
>   onInstanceStopAction?: {
>     discardLocalSsd?: boolean
>   },
>   locationHint?: string,
>   onHostMaintenance?: MIGRATE | TERMINATE,
>   maxRunDuration?: {
>     nanos?: number,
>     seconds?: string | number
>   },
>   nodeAffinities?: {
>     operator?: IN | NOT_IN | OPERATOR_UNSPECIFIED,
>     key?: string,
>     values?: string[]
>   }[],
>   provisioningModel?: FLEX_START | RESERVATION_BOUND | SPOT | STANDARD,
>   instanceTerminationAction?: DELETE | INSTANCE_TERMINATION_ACTION_UNSPECIFIED | STOP,
>   gracefulShutdown?: {
>     maxDuration?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     enabled?: boolean
>   },
>   preemptible?: boolean,
>   minNodeCpus?: number
> }
> ```

> [accordion] workloadIdentityConfig full type
>
> ```ts theme={null}
> {
>   identityCertificateEnabled?: boolean,
>   identity?: string
> }
> ```

> [accordion] sourceMachineImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] networkPerformanceConfig full type
>
> ```ts theme={null}
> {
>   totalEgressBandwidthTier?: DEFAULT | TIER_1
> }
> ```

> [accordion] shieldedInstanceIntegrityPolicy full type
>
> ```ts theme={null}
> {
>   updateAutoLearnPolicy?: boolean
> }
> ```

> [accordion] disks full type
>
> ```ts theme={null}
> {
>   forceAttach?: boolean,
>   deviceName?: string,
>   mode?: READ_ONLY | READ_WRITE,
>   source?: string,
>   initializeParams?: {
>     resourceManagerTags?: Record<string, string>,
>     licenses?: string[],
>     replicaZones?: string[],
>     provisionedThroughput?: string | number,
>     sourceSnapshotEncryptionKey?: {
>       rawKey?: string,
>       rsaEncryptedKey?: string,
>       kmsKeyName?: string,
>       sha256?: string,
>       kmsKeyServiceAccount?: string
>     },
>     sourceImageEncryptionKey?: {
>       rawKey?: string,
>       rsaEncryptedKey?: string,
>       kmsKeyName?: string,
>       sha256?: string,
>       kmsKeyServiceAccount?: string
>     },
>     sourceSnapshot?: string,
>     diskType?: string,
>     architecture?: ARCHITECTURE_UNSPECIFIED | ARM64 | X86_64,
>     diskName?: string,
>     provisionedIops?: string | number,
>     storagePool?: string,
>     diskSizeGb?: string | number,
>     description?: string,
>     sourceImage?: string,
>     onUpdateAction?: RECREATE_DISK | RECREATE_DISK_IF_SOURCE_CHANGED | USE_EXISTING_DISK,
>     labels?: Record<string, string>,
>     enableConfidentialCompute?: boolean,
>     resourcePolicies?: string[]
>   },
>   autoDelete?: boolean,
>   guestOsFeatures?: {
>     type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
>   }[],
>   type?: PERSISTENT | SCRATCH,
>   interface?: NVME | SCSI,
>   boot?: boolean,
>   diskEncryptionKey?: {
>     rawKey?: string,
>     rsaEncryptedKey?: string,
>     kmsKeyName?: string,
>     sha256?: string,
>     kmsKeyServiceAccount?: string
>   },
>   diskSizeGb?: string | number
> }[]
> ```

> [accordion] guestAccelerators full type
>
> ```ts theme={null}
> {
>   acceleratorCount?: number,
>   acceleratorType?: string
> }[]
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>,
>   requestValidForDuration?: {
>     nanos?: number,
>     seconds?: string | number
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.updateAccessConfig

`compute.instances.updateAccessConfig`

Updates the specified access config from an instance's network interface with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.updateAccessConfig({
	networkInterface: 'nic0',
	zone: 'us-central1-a',
	project: 'demo-project',
	instance: 'web-1',
	name: 'External NAT',
	networkTier: 'PREMIUM',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `networkInterface` | `string` | Yes | The name of the network interface where the access config is attached. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instance` | `string` | Yes | The instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `type` | `DIRECT_IPV6 \| ONE_TO_ONE_NAT` | No | The type of configuration. In accessConfigs (IPv4), the default and only option is ONE\_TO\_ONE\_NAT. Inipv6AccessConfigs, the default and only option isDIRECT\_IPV6. |
| `securityPolicy` | `string` | No | The resource URL for the security policy associated with this access config. |
| `name` | `string` | No | The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP orNetwork Access. In ipv6AccessConfigs, the recommend name is External IPv6. |
| `networkTier` | `FIXED_STANDARD \| PREMIUM \| STANDARD \| STANDARD_OVERRIDES_FIXED_STANDARD` | No | This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM,STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. |
| `publicPtrDomainName` | `string` | No | The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled inaccessConfig. If this field is unspecified inipv6AccessConfig, a default PTR record will be created for first IP in associated external IPv6 range. |
| `setPublicPtr` | `boolean` | No | Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated. |
| `externalIpv6` | `string` | No | Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored inexternalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork. |
| `natIP` | `string` | No | Applies to accessConfigs (IPv4) only. Anexternal 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. |
| `externalIpv6PrefixLength` | `number` | No | Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.updateDisplayDevice

`compute.instances.updateDisplayDevice`

Updates the Display config for a VM instance. You can only use this method on a stopped VM instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.updateDisplayDevice({
	zone: 'us-central1-a',
	instance: 'web-1',
	project: 'demo-project',
	enableDisplay: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `instance` | `string` | Yes | Name of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `enableDisplay` | `boolean` | No | Defines whether the instance has Display enabled. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.updateNetworkInterface

`compute.instances.updateNetworkInterface`

Updates an instance's network interface. This method can only update an interface's alias IP range and attached network

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.updateNetworkInterface({
	zone: 'us-central1-a',
	project: 'demo-project',
	networkInterface: 'nic0',
	instance: 'web-1',
	fingerprint: '42WmSpB8rSM=',
	aliasIpRanges: [{ ipCidrRange: '10.128.0.16/28' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `networkInterface` | `string` | Yes | The name of the network interface to update. |
| `instance` | `string` | Yes | The instance name for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `vlan` | `number` | No | VLAN tag of a dynamic network interface, must be an integer in the range from 2 to 255 inclusively. |
| `stackType` | `IPV4_IPV6 \| IPV4_ONLY \| IPV6_ONLY` | No | The stack type for this network interface. To assign only IPv4 addresses, use IPV4\_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4\_IPV6. If not specified, IPV4\_ONLY is used. This field can be both set at instance creation and update network interface operations. |
| `nicType` | `GVNIC \| IDPF \| IRDMA \| MRDMA \| UNSPECIFIED_NIC_TYPE \| VIRTIO_NET` | No | The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. |
| `serviceClassId` | `string` | No | Optional. Producer Service's Service class Id for the region of this network interface. Can only be used with network\_attachment. It is not possible to use on its own however, network\_attachment can be used without service\_class\_id. |
| `enableVpcScopedDns` | `boolean` | No | Optional. If true, DNS resolution will be enabled over this interface. Only valid with network\_attachment. |
| `igmpQuery` | `IGMP_QUERY_DISABLED \| IGMP_QUERY_V2` | No | Indicate whether igmp query is enabled on the network interface or not. If enabled, also indicates the version of IGMP supported. |
| `name` | `string` | No | \[Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and7. The default interface value is nic0. |
| `aliasIpRanges` | `object[]` | No | An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks. |
| `internalIpv6PrefixLength` | `number` | No | The prefix length of the primary internal IPv6 range. |
| `subnetwork` | `string` | No | The URL of the Subnetwork resource for this instance. If the network resource is inlegacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: - [https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork](https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork) - regions/region/subnetworks/subnetwork |
| `fingerprint` | `string` | No | 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 theNetworkInterface. The request will fail with error400 Bad Request if the fingerprint is not provided, or412 Precondition Failed if the fingerprint is out of date. (base64) |
| `queueCount` | `number` | No | The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It'll be empty if not specified by the users. |
| `aliasIpv6Ranges` | `object[]` | No | An array of alias IPv6 ranges for this network interface. You can only specify this field for network interfaces in VPC networks. |
| `accessConfigs` | `object[]` | No | An array of configurations for this interface. Currently, only one access config, ONE\_TO\_ONE\_NAT, is supported. If there are noaccessConfigs specified, then this instance will have no external internet access. |
| `networkAttachment` | `string` | No | The URL of the network attachment that this interface should connect to in the following format: projects/\{project\_number}/regions/\{region\_name}/networkAttachments/\{network\_attachment\_name}. |
| `networkIP` | `string` | No | An IPv4 internal IP 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. |
| `ipv6Address` | `string` | No | An IPv6 internal network address for this network interface. To use a static internal IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an internal IPv6 address from the instance's subnetwork. |
| `ipv6AccessConfigs` | `object[]` | No | An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT\_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. |
| `network` | `string` | No | URL of the VPC 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 selected project doesn't have the default network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is inferred. If you specify this property, you can specify the network as a full or partial URL. |
| `parentNicName` | `string` | No | Name of the parent network interface of a dynamic network interface. |

> [accordion] aliasIpRanges full type
>
> ```ts theme={null}
> {
>   subnetworkRangeName?: string,
>   ipCidrRange?: string
> }[]
> ```

> [accordion] aliasIpv6Ranges full type
>
> ```ts theme={null}
> {
>   subnetworkRangeName?: string,
>   ipCidrRange?: string
> }[]
> ```

> [accordion] accessConfigs full type
>
> ```ts theme={null}
> {
>   type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>   securityPolicy?: string,
>   name?: string,
>   networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>   publicPtrDomainName?: string,
>   setPublicPtr?: boolean,
>   externalIpv6?: string,
>   natIP?: string,
>   externalIpv6PrefixLength?: number
> }[]
> ```

> [accordion] ipv6AccessConfigs full type
>
> ```ts theme={null}
> {
>   type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>   securityPolicy?: string,
>   name?: string,
>   networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>   publicPtrDomainName?: string,
>   setPublicPtr?: boolean,
>   externalIpv6?: string,
>   natIP?: string,
>   externalIpv6PrefixLength?: number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instances.updateShieldedInstanceConfig

`compute.instances.updateShieldedInstanceConfig`

Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instances.updateShieldedInstanceConfig({
	zone: 'us-central1-a',
	instance: 'web-1',
	project: 'demo-project',
	enableSecureBoot: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instance` | `string` | Yes | Name or id of the instance scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `enableSecureBoot` | `boolean` | No | Defines whether the instance has Secure Boot enabled.Disabled by default. |
| `enableVtpm` | `boolean` | No | Defines whether the instance has the vTPM enabled.Enabled by default. |
| `enableIntegrityMonitoring` | `boolean` | No | Defines whether the instance has integrity monitoring enabled.Enabled by default. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceTemplates.aggregatedList

`compute.instanceTemplates.aggregatedList`

Retrieves the list of all InstanceTemplates resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceTemplates.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `maxResults` | `number` | No | 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`) |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `project` | `string` | Yes | Name of the project scoping this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `kind` | `string \| null` | No | Output only. Type of resource. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `items` | `object \| null` | No | A list of InstanceTemplatesScopedList resources. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   instanceTemplates?: {
>     region?: string | null,
>     creationTimestamp?: string | null,
>     sourceInstance?: string | null,
>     properties?: {
>       disks?: {
>         forceAttach?: boolean | null,
>         index?: number | null,
>         savedState?: string | null,
>         deviceName?: string | null,
>         mode?: string | null,
>         source?: string | null,
>         shieldedInstanceInitialState?: {
>           keks?: {
>             fileType?: string | null,
>             content?: string | null
>           }[] | null,
>           dbs?: {
>             fileType?: string | null,
>             content?: string | null
>           }[] | null,
>           dbxs?: {
>             fileType?: string | null,
>             content?: string | null
>           }[] | null,
>           pk?: {
>             fileType?: string | null,
>             content?: string | null
>           } | null
>         } | null,
>         licenses?: string[] | null,
>         architecture?: string | null,
>         initializeParams?: {
>           resourceManagerTags?: Record<string, string> | null,
>           licenses?: string[] | null,
>           replicaZones?: string[] | null,
>           provisionedThroughput?: string | number | null,
>           sourceSnapshotEncryptionKey?: {
>             rawKey?: string | null,
>             rsaEncryptedKey?: string | null,
>             kmsKeyName?: string | null,
>             sha256?: string | null,
>             kmsKeyServiceAccount?: string | null
>           } | null,
>           sourceImageEncryptionKey?: {
>             rawKey?: string | null,
>             rsaEncryptedKey?: string | null,
>             kmsKeyName?: string | null,
>             sha256?: string | null,
>             kmsKeyServiceAccount?: string | null
>           } | null,
>           sourceSnapshot?: string | null,
>           diskType?: string | null,
>           architecture?: string | null,
>           diskName?: string | null,
>           provisionedIops?: string | number | null,
>           storagePool?: string | null,
>           diskSizeGb?: string | number | null,
>           description?: string | null,
>           sourceImage?: string | null,
>           onUpdateAction?: string | null,
>           labels?: Record<string, string> | null,
>           enableConfidentialCompute?: boolean | null,
>           resourcePolicies?: string[] | null
>         } | null,
>         autoDelete?: boolean | null,
>         guestOsFeatures?: {
>           type?: string | null
>         }[] | null,
>         type?: string | null,
>         interface?: string | null,
>         kind?: string | null,
>         boot?: boolean | null,
>         diskEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         diskSizeGb?: string | number | null
>       }[] | null,
>       labels?: Record<string, string> | null,
>       guestAccelerators?: {
>         acceleratorCount?: number | null,
>         acceleratorType?: string | null
>       }[] | null,
>       machineType?: string | null,
>       tags?: {
>         items?: string[] | null,
>         fingerprint?: string | null
>       } | null,
>       confidentialInstanceConfig?: {
>         enableConfidentialCompute?: boolean | null,
>         confidentialInstanceType?: string | null
>       } | null,
>       resourceManagerTags?: Record<string, string> | null,
>       metadata?: {
>         kind?: string | null,
>         items?: {
>           key?: string | null,
>           value?: string | null
>         }[] | null,
>         fingerprint?: string | null
>       } | null,
>       resourcePolicies?: string[] | null,
>       shieldedInstanceConfig?: {
>         enableSecureBoot?: boolean | null,
>         enableVtpm?: boolean | null,
>         enableIntegrityMonitoring?: boolean | null
>       } | null,
>       reservationAffinity?: {
>         values?: string[] | null,
>         key?: string | null,
>         consumeReservationType?: string | null
>       } | null,
>       workloadIdentityConfig?: {
>         identityCertificateEnabled?: boolean | null,
>         identity?: string | null
>       } | null,
>       privateIpv6GoogleAccess?: string | null,
>       description?: string | null,
>       canIpForward?: boolean | null,
>       localSsdEncryptionMode?: string | null,
>       minCpuPlatform?: string | null,
>       scheduling?: {
>         hostErrorTimeoutSeconds?: number | null,
>         localSsdRecoveryTimeout?: {
>           nanos?: number | null,
>           seconds?: string | number | null
>         } | null,
>         exposeHostTopology?: boolean | null,
>         preemptionNoticeDuration?: {
>           nanos?: number | null,
>           seconds?: string | number | null
>         } | null,
>         skipGuestOsShutdown?: boolean | null,
>         availabilityDomain?: number | null,
>         automaticRestart?: boolean | null,
>         terminationTime?: string | null,
>         onInstanceStopAction?: {
>           discardLocalSsd?: boolean | null
>         } | null,
>         locationHint?: string | null,
>         onHostMaintenance?: string | null,
>         maxRunDuration?: {
>           nanos?: number | null,
>           seconds?: string | number | null
>         } | null,
>         nodeAffinities?: {
>           operator?: string | null,
>           key?: string | null,
>           values?: string[] | null
>         }[] | null,
>         provisioningModel?: string | null,
>         instanceTerminationAction?: string | null,
>         gracefulShutdown?: {
>           maxDuration?: {
>             nanos?: number | null,
>             seconds?: string | number | null
>           } | null,
>           enabled?: boolean | null
>         } | null,
>         preemptible?: boolean | null,
>         minNodeCpus?: number | null
>       } | null,
>       networkPerformanceConfig?: {
>         totalEgressBandwidthTier?: string | null
>       } | null,
>       keyRevocationActionType?: string | null,
>       networkInterfaces?: {
>         vlan?: number | null,
>         stackType?: string | null,
>         nicType?: string | null,
>         serviceClassId?: string | null,
>         enableVpcScopedDns?: boolean | null,
>         igmpQuery?: string | null,
>         kind?: string | null,
>         name?: string | null,
>         aliasIpRanges?: {
>           subnetworkRangeName?: string | null,
>           ipCidrRange?: string | null
>         }[] | null,
>         internalIpv6PrefixLength?: number | null,
>         subnetwork?: string | null,
>         fingerprint?: string | null,
>         queueCount?: number | null,
>         aliasIpv6Ranges?: {
>           subnetworkRangeName?: string | null,
>           ipCidrRange?: string | null
>         }[] | null,
>         accessConfigs?: {
>           type?: string | null,
>           securityPolicy?: string | null,
>           name?: string | null,
>           kind?: string | null,
>           networkTier?: string | null,
>           publicPtrDomainName?: string | null,
>           setPublicPtr?: boolean | null,
>           externalIpv6?: string | null,
>           natIP?: string | null,
>           externalIpv6PrefixLength?: number | null
>         }[] | null,
>         networkAttachment?: string | null,
>         networkIP?: string | null,
>         ipv6Address?: string | null,
>         ipv6AccessType?: string | null,
>         ipv6AccessConfigs?: {
>           type?: string | null,
>           securityPolicy?: string | null,
>           name?: string | null,
>           kind?: string | null,
>           networkTier?: string | null,
>           publicPtrDomainName?: string | null,
>           setPublicPtr?: boolean | null,
>           externalIpv6?: string | null,
>           natIP?: string | null,
>           externalIpv6PrefixLength?: number | null
>         }[] | null,
>         network?: string | null,
>         parentNicName?: string | null
>       }[] | null,
>       advancedMachineFeatures?: {
>         threadsPerCore?: number | null,
>         turboMode?: string | null,
>         visibleCoreCount?: number | null,
>         enableUefiNetworking?: boolean | null,
>         performanceMonitoringUnit?: string | null,
>         enableNestedVirtualization?: boolean | null
>       } | null,
>       serviceAccounts?: {
>         scopes?: string[] | null,
>         email?: string | null
>       }[] | null
>     } | null,
>     id?: string | number | null,
>     sourceInstanceParams?: {
>       diskConfigs?: {
>         deviceName?: string | null,
>         autoDelete?: boolean | null,
>         customImage?: string | null,
>         instantiateFrom?: string | null
>       }[] | null
>     } | null,
>     selfLink?: string | null,
>     name?: string | null,
>     description?: string | null,
>     kind?: string | null
>   }[] | null,
>   warning?: {
>     message?: string | null,
>     code?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null
>   } | null
> }> | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   code?: string | null
> } | null
> ```

***

### instanceTemplates.delete

`compute.instanceTemplates.delete`

Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.instanceTemplates.delete({ project: 'demo-project', instanceTemplate: 'web-template' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instanceTemplate` | `string` | Yes | The name of the instance template to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceTemplates.get

`compute.instanceTemplates.get`

Returns the specified instance template

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceTemplates.get({ project: 'demo-project', instanceTemplate: 'web-template' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `instanceTemplate` | `string` | Yes | The name of the instance template. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string \| null` | No | Output only. \[Output Only] URL of the region where the instance template resides. Only applicable for regional resources. |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] The creation timestamp for this instance template inRFC3339 text format. |
| `sourceInstance` | `string \| null` | No | The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance) - projects/project/zones/zone/instances/instance |
| `properties` | `object \| null` | No | — |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] A unique identifier for this instance template. The server defines this identifier. |
| `sourceInstanceParams` | `object \| null` | No | A specification of the parameters to use when creating the instance template from a source instance. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] The URL for this instance template. The server defines this URL. |
| `name` | `string \| null` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `description` | `string \| null` | No | An optional description of this resource. Provide this property when you create the resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The resource type, which is alwayscompute#instanceTemplate for instance templates. |

> [accordion] properties full type
>
> ```ts theme={null}
> {
>   disks?: {
>     forceAttach?: boolean | null,
>     index?: number | null,
>     savedState?: string | null,
>     deviceName?: string | null,
>     mode?: string | null,
>     source?: string | null,
>     shieldedInstanceInitialState?: {
>       keks?: {
>         fileType?: string | null,
>         content?: string | null
>       }[] | null,
>       dbs?: {
>         fileType?: string | null,
>         content?: string | null
>       }[] | null,
>       dbxs?: {
>         fileType?: string | null,
>         content?: string | null
>       }[] | null,
>       pk?: {
>         fileType?: string | null,
>         content?: string | null
>       } | null
>     } | null,
>     licenses?: string[] | null,
>     architecture?: string | null,
>     initializeParams?: {
>       resourceManagerTags?: Record<string, string> | null,
>       licenses?: string[] | null,
>       replicaZones?: string[] | null,
>       provisionedThroughput?: string | number | null,
>       sourceSnapshotEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       sourceImageEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       sourceSnapshot?: string | null,
>       diskType?: string | null,
>       architecture?: string | null,
>       diskName?: string | null,
>       provisionedIops?: string | number | null,
>       storagePool?: string | null,
>       diskSizeGb?: string | number | null,
>       description?: string | null,
>       sourceImage?: string | null,
>       onUpdateAction?: string | null,
>       labels?: Record<string, string> | null,
>       enableConfidentialCompute?: boolean | null,
>       resourcePolicies?: string[] | null
>     } | null,
>     autoDelete?: boolean | null,
>     guestOsFeatures?: {
>       type?: string | null
>     }[] | null,
>     type?: string | null,
>     interface?: string | null,
>     kind?: string | null,
>     boot?: boolean | null,
>     diskEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     diskSizeGb?: string | number | null
>   }[] | null,
>   labels?: Record<string, string> | null,
>   guestAccelerators?: {
>     acceleratorCount?: number | null,
>     acceleratorType?: string | null
>   }[] | null,
>   machineType?: string | null,
>   tags?: {
>     items?: string[] | null,
>     fingerprint?: string | null
>   } | null,
>   confidentialInstanceConfig?: {
>     enableConfidentialCompute?: boolean | null,
>     confidentialInstanceType?: string | null
>   } | null,
>   resourceManagerTags?: Record<string, string> | null,
>   metadata?: {
>     kind?: string | null,
>     items?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     fingerprint?: string | null
>   } | null,
>   resourcePolicies?: string[] | null,
>   shieldedInstanceConfig?: {
>     enableSecureBoot?: boolean | null,
>     enableVtpm?: boolean | null,
>     enableIntegrityMonitoring?: boolean | null
>   } | null,
>   reservationAffinity?: {
>     values?: string[] | null,
>     key?: string | null,
>     consumeReservationType?: string | null
>   } | null,
>   workloadIdentityConfig?: {
>     identityCertificateEnabled?: boolean | null,
>     identity?: string | null
>   } | null,
>   privateIpv6GoogleAccess?: string | null,
>   description?: string | null,
>   canIpForward?: boolean | null,
>   localSsdEncryptionMode?: string | null,
>   minCpuPlatform?: string | null,
>   scheduling?: {
>     hostErrorTimeoutSeconds?: number | null,
>     localSsdRecoveryTimeout?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     exposeHostTopology?: boolean | null,
>     preemptionNoticeDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     skipGuestOsShutdown?: boolean | null,
>     availabilityDomain?: number | null,
>     automaticRestart?: boolean | null,
>     terminationTime?: string | null,
>     onInstanceStopAction?: {
>       discardLocalSsd?: boolean | null
>     } | null,
>     locationHint?: string | null,
>     onHostMaintenance?: string | null,
>     maxRunDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     nodeAffinities?: {
>       operator?: string | null,
>       key?: string | null,
>       values?: string[] | null
>     }[] | null,
>     provisioningModel?: string | null,
>     instanceTerminationAction?: string | null,
>     gracefulShutdown?: {
>       maxDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       enabled?: boolean | null
>     } | null,
>     preemptible?: boolean | null,
>     minNodeCpus?: number | null
>   } | null,
>   networkPerformanceConfig?: {
>     totalEgressBandwidthTier?: string | null
>   } | null,
>   keyRevocationActionType?: string | null,
>   networkInterfaces?: {
>     vlan?: number | null,
>     stackType?: string | null,
>     nicType?: string | null,
>     serviceClassId?: string | null,
>     enableVpcScopedDns?: boolean | null,
>     igmpQuery?: string | null,
>     kind?: string | null,
>     name?: string | null,
>     aliasIpRanges?: {
>       subnetworkRangeName?: string | null,
>       ipCidrRange?: string | null
>     }[] | null,
>     internalIpv6PrefixLength?: number | null,
>     subnetwork?: string | null,
>     fingerprint?: string | null,
>     queueCount?: number | null,
>     aliasIpv6Ranges?: {
>       subnetworkRangeName?: string | null,
>       ipCidrRange?: string | null
>     }[] | null,
>     accessConfigs?: {
>       type?: string | null,
>       securityPolicy?: string | null,
>       name?: string | null,
>       kind?: string | null,
>       networkTier?: string | null,
>       publicPtrDomainName?: string | null,
>       setPublicPtr?: boolean | null,
>       externalIpv6?: string | null,
>       natIP?: string | null,
>       externalIpv6PrefixLength?: number | null
>     }[] | null,
>     networkAttachment?: string | null,
>     networkIP?: string | null,
>     ipv6Address?: string | null,
>     ipv6AccessType?: string | null,
>     ipv6AccessConfigs?: {
>       type?: string | null,
>       securityPolicy?: string | null,
>       name?: string | null,
>       kind?: string | null,
>       networkTier?: string | null,
>       publicPtrDomainName?: string | null,
>       setPublicPtr?: boolean | null,
>       externalIpv6?: string | null,
>       natIP?: string | null,
>       externalIpv6PrefixLength?: number | null
>     }[] | null,
>     network?: string | null,
>     parentNicName?: string | null
>   }[] | null,
>   advancedMachineFeatures?: {
>     threadsPerCore?: number | null,
>     turboMode?: string | null,
>     visibleCoreCount?: number | null,
>     enableUefiNetworking?: boolean | null,
>     performanceMonitoringUnit?: string | null,
>     enableNestedVirtualization?: boolean | null
>   } | null,
>   serviceAccounts?: {
>     scopes?: string[] | null,
>     email?: string | null
>   }[] | null
> } | null
> ```

> [accordion] sourceInstanceParams full type
>
> ```ts theme={null}
> {
>   diskConfigs?: {
>     deviceName?: string | null,
>     autoDelete?: boolean | null,
>     customImage?: string | null,
>     instantiateFrom?: string | null
>   }[] | null
> } | null
> ```

***

### instanceTemplates.getIamPolicy

`compute.instanceTemplates.getIamPolicy`

Gets the access control policy for a resource. May be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceTemplates.getIamPolicy({ resource: 'web-template', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `optionsRequestedPolicyVersion` | `number` | No | Requested IAM Policy version. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### instanceTemplates.insert

`compute.instanceTemplates.insert`

Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceTemplates.insert({
	project: 'demo-project',
	name: 'web-template',
	properties: {
		machineType: 'e2-medium',
		disks: [{
			boot: true,
			autoDelete: true,
			initializeParams: { sourceImage: 'projects/debian-cloud/global/images/family/debian-12' },
		}],
		networkInterfaces: [{ network: 'global/networks/default' }],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `sourceInstance` | `string` | No | The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance) - projects/project/zones/zone/instances/instance |
| `properties` | `object` | No | — |
| `sourceInstanceParams` | `object` | No | A specification of the parameters to use when creating the instance template from a source instance. |
| `name` | `string` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |

> [accordion] properties full type
>
> ```ts theme={null}
> {
>   disks?: {
>     forceAttach?: boolean,
>     deviceName?: string,
>     mode?: READ_ONLY | READ_WRITE,
>     source?: string,
>     initializeParams?: {
>       resourceManagerTags?: Record<string, string>,
>       licenses?: string[],
>       replicaZones?: string[],
>       provisionedThroughput?: string | number,
>       sourceSnapshotEncryptionKey?: {
>         rawKey?: string,
>         rsaEncryptedKey?: string,
>         kmsKeyName?: string,
>         sha256?: string,
>         kmsKeyServiceAccount?: string
>       },
>       sourceImageEncryptionKey?: {
>         rawKey?: string,
>         rsaEncryptedKey?: string,
>         kmsKeyName?: string,
>         sha256?: string,
>         kmsKeyServiceAccount?: string
>       },
>       sourceSnapshot?: string,
>       diskType?: string,
>       architecture?: ARCHITECTURE_UNSPECIFIED | ARM64 | X86_64,
>       diskName?: string,
>       provisionedIops?: string | number,
>       storagePool?: string,
>       diskSizeGb?: string | number,
>       description?: string,
>       sourceImage?: string,
>       onUpdateAction?: RECREATE_DISK | RECREATE_DISK_IF_SOURCE_CHANGED | USE_EXISTING_DISK,
>       labels?: Record<string, string>,
>       enableConfidentialCompute?: boolean,
>       resourcePolicies?: string[]
>     },
>     autoDelete?: boolean,
>     guestOsFeatures?: {
>       type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
>     }[],
>     type?: PERSISTENT | SCRATCH,
>     interface?: NVME | SCSI,
>     boot?: boolean,
>     diskEncryptionKey?: {
>       rawKey?: string,
>       rsaEncryptedKey?: string,
>       kmsKeyName?: string,
>       sha256?: string,
>       kmsKeyServiceAccount?: string
>     },
>     diskSizeGb?: string | number
>   }[],
>   labels?: Record<string, string>,
>   guestAccelerators?: {
>     acceleratorCount?: number,
>     acceleratorType?: string
>   }[],
>   machineType?: string,
>   tags?: {
>     items?: string[],
>     fingerprint?: string
>   },
>   confidentialInstanceConfig?: {
>     enableConfidentialCompute?: boolean,
>     confidentialInstanceType?: BMSAI | CCA | CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED | SEV | SEV_SNP | TDX
>   },
>   resourceManagerTags?: Record<string, string>,
>   metadata?: {
>     items?: {
>       key?: string,
>       value?: string
>     }[],
>     fingerprint?: string
>   },
>   resourcePolicies?: string[],
>   shieldedInstanceConfig?: {
>     enableSecureBoot?: boolean,
>     enableVtpm?: boolean,
>     enableIntegrityMonitoring?: boolean
>   },
>   reservationAffinity?: {
>     values?: string[],
>     key?: string,
>     consumeReservationType?: ANY_RESERVATION | NO_RESERVATION | SPECIFIC_RESERVATION | UNSPECIFIED
>   },
>   workloadIdentityConfig?: {
>     identityCertificateEnabled?: boolean,
>     identity?: string
>   },
>   privateIpv6GoogleAccess?: ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE | ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE | INHERIT_FROM_SUBNETWORK,
>   description?: string,
>   canIpForward?: boolean,
>   localSsdEncryptionMode?: EPHEMERAL_KEY_ENCRYPTION | LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED | STANDARD_ENCRYPTION,
>   minCpuPlatform?: string,
>   scheduling?: {
>     hostErrorTimeoutSeconds?: number,
>     localSsdRecoveryTimeout?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     exposeHostTopology?: boolean,
>     preemptionNoticeDuration?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     skipGuestOsShutdown?: boolean,
>     availabilityDomain?: number,
>     automaticRestart?: boolean,
>     terminationTime?: string,
>     onInstanceStopAction?: {
>       discardLocalSsd?: boolean
>     },
>     locationHint?: string,
>     onHostMaintenance?: MIGRATE | TERMINATE,
>     maxRunDuration?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     nodeAffinities?: {
>       operator?: IN | NOT_IN | OPERATOR_UNSPECIFIED,
>       key?: string,
>       values?: string[]
>     }[],
>     provisioningModel?: FLEX_START | RESERVATION_BOUND | SPOT | STANDARD,
>     instanceTerminationAction?: DELETE | INSTANCE_TERMINATION_ACTION_UNSPECIFIED | STOP,
>     gracefulShutdown?: {
>       maxDuration?: {
>         nanos?: number,
>         seconds?: string | number
>       },
>       enabled?: boolean
>     },
>     preemptible?: boolean,
>     minNodeCpus?: number
>   },
>   networkPerformanceConfig?: {
>     totalEgressBandwidthTier?: DEFAULT | TIER_1
>   },
>   keyRevocationActionType?: KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED | NONE | STOP,
>   networkInterfaces?: {
>     vlan?: number,
>     stackType?: IPV4_IPV6 | IPV4_ONLY | IPV6_ONLY,
>     nicType?: GVNIC | IDPF | IRDMA | MRDMA | UNSPECIFIED_NIC_TYPE | VIRTIO_NET,
>     serviceClassId?: string,
>     enableVpcScopedDns?: boolean,
>     igmpQuery?: IGMP_QUERY_DISABLED | IGMP_QUERY_V2,
>     name?: string,
>     aliasIpRanges?: {
>       subnetworkRangeName?: string,
>       ipCidrRange?: string
>     }[],
>     internalIpv6PrefixLength?: number,
>     subnetwork?: string,
>     fingerprint?: string,
>     queueCount?: number,
>     aliasIpv6Ranges?: {
>       subnetworkRangeName?: string,
>       ipCidrRange?: string
>     }[],
>     accessConfigs?: {
>       type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>       securityPolicy?: string,
>       name?: string,
>       networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>       publicPtrDomainName?: string,
>       setPublicPtr?: boolean,
>       externalIpv6?: string,
>       natIP?: string,
>       externalIpv6PrefixLength?: number
>     }[],
>     networkAttachment?: string,
>     networkIP?: string,
>     ipv6Address?: string,
>     ipv6AccessConfigs?: {
>       type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>       securityPolicy?: string,
>       name?: string,
>       networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>       publicPtrDomainName?: string,
>       setPublicPtr?: boolean,
>       externalIpv6?: string,
>       natIP?: string,
>       externalIpv6PrefixLength?: number
>     }[],
>     network?: string,
>     parentNicName?: string
>   }[],
>   advancedMachineFeatures?: {
>     threadsPerCore?: number,
>     turboMode?: string,
>     visibleCoreCount?: number,
>     enableUefiNetworking?: boolean,
>     performanceMonitoringUnit?: ARCHITECTURAL | ENHANCED | PERFORMANCE_MONITORING_UNIT_UNSPECIFIED | STANDARD,
>     enableNestedVirtualization?: boolean
>   },
>   serviceAccounts?: {
>     scopes?: string[],
>     email?: string
>   }[]
> }
> ```

> [accordion] sourceInstanceParams full type
>
> ```ts theme={null}
> {
>   diskConfigs?: {
>     deviceName?: string,
>     autoDelete?: boolean,
>     customImage?: string,
>     instantiateFrom?: ATTACH_READ_ONLY | BLANK | CUSTOM_IMAGE | DEFAULT | DO_NOT_INCLUDE | SOURCE_IMAGE | SOURCE_IMAGE_FAMILY
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### instanceTemplates.list

`compute.instanceTemplates.list`

Retrieves a list of instance templates that are contained within the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceTemplates.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `maxResults` | `number` | No | 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`) |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The resource type, which is alwayscompute#instanceTemplatesListResponse for instance template lists. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `items` | `object[] \| null` | No | A list of InstanceTemplate resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   region?: string | null,
>   creationTimestamp?: string | null,
>   sourceInstance?: string | null,
>   properties?: {
>     disks?: {
>       forceAttach?: boolean | null,
>       index?: number | null,
>       savedState?: string | null,
>       deviceName?: string | null,
>       mode?: string | null,
>       source?: string | null,
>       shieldedInstanceInitialState?: {
>         keks?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbxs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         pk?: {
>           fileType?: string | null,
>           content?: string | null
>         } | null
>       } | null,
>       licenses?: string[] | null,
>       architecture?: string | null,
>       initializeParams?: {
>         resourceManagerTags?: Record<string, string> | null,
>         licenses?: string[] | null,
>         replicaZones?: string[] | null,
>         provisionedThroughput?: string | number | null,
>         sourceSnapshotEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceImageEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceSnapshot?: string | null,
>         diskType?: string | null,
>         architecture?: string | null,
>         diskName?: string | null,
>         provisionedIops?: string | number | null,
>         storagePool?: string | null,
>         diskSizeGb?: string | number | null,
>         description?: string | null,
>         sourceImage?: string | null,
>         onUpdateAction?: string | null,
>         labels?: Record<string, string> | null,
>         enableConfidentialCompute?: boolean | null,
>         resourcePolicies?: string[] | null
>       } | null,
>       autoDelete?: boolean | null,
>       guestOsFeatures?: {
>         type?: string | null
>       }[] | null,
>       type?: string | null,
>       interface?: string | null,
>       kind?: string | null,
>       boot?: boolean | null,
>       diskEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       diskSizeGb?: string | number | null
>     }[] | null,
>     labels?: Record<string, string> | null,
>     guestAccelerators?: {
>       acceleratorCount?: number | null,
>       acceleratorType?: string | null
>     }[] | null,
>     machineType?: string | null,
>     tags?: {
>       items?: string[] | null,
>       fingerprint?: string | null
>     } | null,
>     confidentialInstanceConfig?: {
>       enableConfidentialCompute?: boolean | null,
>       confidentialInstanceType?: string | null
>     } | null,
>     resourceManagerTags?: Record<string, string> | null,
>     metadata?: {
>       kind?: string | null,
>       items?: {
>         key?: string | null,
>         value?: string | null
>       }[] | null,
>       fingerprint?: string | null
>     } | null,
>     resourcePolicies?: string[] | null,
>     shieldedInstanceConfig?: {
>       enableSecureBoot?: boolean | null,
>       enableVtpm?: boolean | null,
>       enableIntegrityMonitoring?: boolean | null
>     } | null,
>     reservationAffinity?: {
>       values?: string[] | null,
>       key?: string | null,
>       consumeReservationType?: string | null
>     } | null,
>     workloadIdentityConfig?: {
>       identityCertificateEnabled?: boolean | null,
>       identity?: string | null
>     } | null,
>     privateIpv6GoogleAccess?: string | null,
>     description?: string | null,
>     canIpForward?: boolean | null,
>     localSsdEncryptionMode?: string | null,
>     minCpuPlatform?: string | null,
>     scheduling?: {
>       hostErrorTimeoutSeconds?: number | null,
>       localSsdRecoveryTimeout?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       exposeHostTopology?: boolean | null,
>       preemptionNoticeDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       skipGuestOsShutdown?: boolean | null,
>       availabilityDomain?: number | null,
>       automaticRestart?: boolean | null,
>       terminationTime?: string | null,
>       onInstanceStopAction?: {
>         discardLocalSsd?: boolean | null
>       } | null,
>       locationHint?: string | null,
>       onHostMaintenance?: string | null,
>       maxRunDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       nodeAffinities?: {
>         operator?: string | null,
>         key?: string | null,
>         values?: string[] | null
>       }[] | null,
>       provisioningModel?: string | null,
>       instanceTerminationAction?: string | null,
>       gracefulShutdown?: {
>         maxDuration?: {
>           nanos?: number | null,
>           seconds?: string | number | null
>         } | null,
>         enabled?: boolean | null
>       } | null,
>       preemptible?: boolean | null,
>       minNodeCpus?: number | null
>     } | null,
>     networkPerformanceConfig?: {
>       totalEgressBandwidthTier?: string | null
>     } | null,
>     keyRevocationActionType?: string | null,
>     networkInterfaces?: {
>       vlan?: number | null,
>       stackType?: string | null,
>       nicType?: string | null,
>       serviceClassId?: string | null,
>       enableVpcScopedDns?: boolean | null,
>       igmpQuery?: string | null,
>       kind?: string | null,
>       name?: string | null,
>       aliasIpRanges?: {
>         subnetworkRangeName?: string | null,
>         ipCidrRange?: string | null
>       }[] | null,
>       internalIpv6PrefixLength?: number | null,
>       subnetwork?: string | null,
>       fingerprint?: string | null,
>       queueCount?: number | null,
>       aliasIpv6Ranges?: {
>         subnetworkRangeName?: string | null,
>         ipCidrRange?: string | null
>       }[] | null,
>       accessConfigs?: {
>         type?: string | null,
>         securityPolicy?: string | null,
>         name?: string | null,
>         kind?: string | null,
>         networkTier?: string | null,
>         publicPtrDomainName?: string | null,
>         setPublicPtr?: boolean | null,
>         externalIpv6?: string | null,
>         natIP?: string | null,
>         externalIpv6PrefixLength?: number | null
>       }[] | null,
>       networkAttachment?: string | null,
>       networkIP?: string | null,
>       ipv6Address?: string | null,
>       ipv6AccessType?: string | null,
>       ipv6AccessConfigs?: {
>         type?: string | null,
>         securityPolicy?: string | null,
>         name?: string | null,
>         kind?: string | null,
>         networkTier?: string | null,
>         publicPtrDomainName?: string | null,
>         setPublicPtr?: boolean | null,
>         externalIpv6?: string | null,
>         natIP?: string | null,
>         externalIpv6PrefixLength?: number | null
>       }[] | null,
>       network?: string | null,
>       parentNicName?: string | null
>     }[] | null,
>     advancedMachineFeatures?: {
>       threadsPerCore?: number | null,
>       turboMode?: string | null,
>       visibleCoreCount?: number | null,
>       enableUefiNetworking?: boolean | null,
>       performanceMonitoringUnit?: string | null,
>       enableNestedVirtualization?: boolean | null
>     } | null,
>     serviceAccounts?: {
>       scopes?: string[] | null,
>       email?: string | null
>     }[] | null
>   } | null,
>   id?: string | number | null,
>   sourceInstanceParams?: {
>     diskConfigs?: {
>       deviceName?: string | null,
>       autoDelete?: boolean | null,
>       customImage?: string | null,
>       instantiateFrom?: string | null
>     }[] | null
>   } | null,
>   selfLink?: string | null,
>   name?: string | null,
>   description?: string | null,
>   kind?: string | null
> }[] | null
> ```

***

### instanceTemplates.setIamPolicy

`compute.instanceTemplates.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceTemplates.setIamPolicy({
	resource: 'web-template',
	project: 'demo-project',
	policy: {
		bindings: [{
			role: 'roles/compute.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `etag` | `string` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. (base64) |
| `bindings` | `object[]` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: ADMIN_READ | DATA_READ | DATA_WRITE | LOG_TYPE_UNSPECIFIED,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   bindings?: {
>     role?: string,
>     members?: string[],
>     condition?: {
>       title?: string,
>       description?: string,
>       expression?: string,
>       location?: string
>     }
>   }[],
>   etag?: string
> }
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string,
>   members?: string[],
>   condition?: {
>     title?: string,
>     description?: string,
>     expression?: string,
>     location?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### instanceTemplates.testIamPermissions

`compute.instanceTemplates.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.instanceTemplates.testIamPermissions({
	resource: 'web-template',
	project: 'demo-project',
	permissions: ['compute.instanceTemplates.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### machineImages.delete

`compute.machineImages.delete`

Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.machineImages.delete({ project: 'demo-project', machineImage: 'web-1-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `machineImage` | `string` | Yes | The name of the machine image to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### machineImages.get

`compute.machineImages.get`

Returns the specified machine image

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.machineImages.get({ project: 'demo-project', machineImage: 'web-1-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `machineImage` | `string` | Yes | The name of the machine image. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | An optional description of this resource. Provide this property when you create the resource. |
| `sourceInstanceProperties` | `object \| null` | No | DEPRECATED: Please use compute#instanceProperties instead. New properties will not be added to this field. |
| `sourceDiskEncryptionKeys` | `object[] \| null` | No | \[Input Only] Thecustomer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption key. |
| `labels` | `Record<string, string> \| null` | No | Labels to apply to this machine image. These can be later modified by the setLabels method. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. \[Output Only] Reserved for future use. |
| `params` | `object \| null` | No | Machine Image parameters |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] The creation timestamp for this machine image inRFC3339 text format. |
| `storageLocations` | `string[] \| null` | No | The regional or multi-regional Cloud Storage bucket location where themachine image is stored. |
| `labelFingerprint` | `string \| null` | No | A fingerprint for the labels being applied to this machine image, 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. To see the latest fingerprint, make get() request to the machine image. (base64) |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] The URL for this machine image. The server defines this URL. |
| `machineImageEncryptionKey` | `object \| null` | No | — |
| `status` | `string \| null` | No | Output only. \[Output Only] The status of the machine image. One of the following values:INVALID, CREATING, READY,DELETING, and UPLOADING. |
| `savedDisks` | `object[] \| null` | No | Output only. An array of Machine Image specific properties for disks attached to the source instance |
| `instanceProperties` | `object \| null` | No | — |
| `satisfiesPzi` | `boolean \| null` | No | Output only. Reserved for future use. |
| `totalStorageBytes` | `string \| number \| null` | No | Output only. \[Output Only] Total size of the storage used by the machine image. |
| `name` | `string \| null` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `sourceInstance` | `string \| null` | No | The source instance used to create the machine image. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance) - projects/project/zones/zone/instances/instance |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] A unique identifier for this machine image. The server defines this identifier. |
| `guestFlush` | `boolean \| null` | No | \[Input Only] Whether to attempt an application consistent machine image by informing the OS to prepare for the snapshot process. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The resource type, which is alwayscompute#machineImage for machine image. |

> [accordion] sourceInstanceProperties full type
>
> ```ts theme={null}
> {
>   machineType?: string | null,
>   labels?: Record<string, string> | null,
>   tags?: {
>     items?: string[] | null,
>     fingerprint?: string | null
>   } | null,
>   canIpForward?: boolean | null,
>   disks?: {
>     interface?: string | null,
>     licenses?: string[] | null,
>     storageBytesStatus?: string | null,
>     deviceName?: string | null,
>     diskEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     autoDelete?: boolean | null,
>     storageBytes?: string | number | null,
>     kind?: string | null,
>     boot?: boolean | null,
>     diskType?: string | null,
>     guestOsFeatures?: {
>       type?: string | null
>     }[] | null,
>     mode?: string | null,
>     source?: string | null,
>     type?: string | null,
>     index?: number | null,
>     diskSizeGb?: string | number | null
>   }[] | null,
>   networkInterfaces?: {
>     vlan?: number | null,
>     stackType?: string | null,
>     nicType?: string | null,
>     serviceClassId?: string | null,
>     enableVpcScopedDns?: boolean | null,
>     igmpQuery?: string | null,
>     kind?: string | null,
>     name?: string | null,
>     aliasIpRanges?: {
>       subnetworkRangeName?: string | null,
>       ipCidrRange?: string | null
>     }[] | null,
>     internalIpv6PrefixLength?: number | null,
>     subnetwork?: string | null,
>     fingerprint?: string | null,
>     queueCount?: number | null,
>     aliasIpv6Ranges?: {
>       subnetworkRangeName?: string | null,
>       ipCidrRange?: string | null
>     }[] | null,
>     accessConfigs?: {
>       type?: string | null,
>       securityPolicy?: string | null,
>       name?: string | null,
>       kind?: string | null,
>       networkTier?: string | null,
>       publicPtrDomainName?: string | null,
>       setPublicPtr?: boolean | null,
>       externalIpv6?: string | null,
>       natIP?: string | null,
>       externalIpv6PrefixLength?: number | null
>     }[] | null,
>     networkAttachment?: string | null,
>     networkIP?: string | null,
>     ipv6Address?: string | null,
>     ipv6AccessType?: string | null,
>     ipv6AccessConfigs?: {
>       type?: string | null,
>       securityPolicy?: string | null,
>       name?: string | null,
>       kind?: string | null,
>       networkTier?: string | null,
>       publicPtrDomainName?: string | null,
>       setPublicPtr?: boolean | null,
>       externalIpv6?: string | null,
>       natIP?: string | null,
>       externalIpv6PrefixLength?: number | null
>     }[] | null,
>     network?: string | null,
>     parentNicName?: string | null
>   }[] | null,
>   keyRevocationActionType?: string | null,
>   description?: string | null,
>   minCpuPlatform?: string | null,
>   scheduling?: {
>     hostErrorTimeoutSeconds?: number | null,
>     localSsdRecoveryTimeout?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     exposeHostTopology?: boolean | null,
>     preemptionNoticeDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     skipGuestOsShutdown?: boolean | null,
>     availabilityDomain?: number | null,
>     automaticRestart?: boolean | null,
>     terminationTime?: string | null,
>     onInstanceStopAction?: {
>       discardLocalSsd?: boolean | null
>     } | null,
>     locationHint?: string | null,
>     onHostMaintenance?: string | null,
>     maxRunDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     nodeAffinities?: {
>       operator?: string | null,
>       key?: string | null,
>       values?: string[] | null
>     }[] | null,
>     provisioningModel?: string | null,
>     instanceTerminationAction?: string | null,
>     gracefulShutdown?: {
>       maxDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       enabled?: boolean | null
>     } | null,
>     preemptible?: boolean | null,
>     minNodeCpus?: number | null
>   } | null,
>   postKeyRevocationActionType?: string | null,
>   deletionProtection?: boolean | null,
>   metadata?: {
>     kind?: string | null,
>     items?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     fingerprint?: string | null
>   } | null,
>   guestAccelerators?: {
>     acceleratorCount?: number | null,
>     acceleratorType?: string | null
>   }[] | null,
>   serviceAccounts?: {
>     scopes?: string[] | null,
>     email?: string | null
>   }[] | null
> } | null
> ```

> [accordion] sourceDiskEncryptionKeys full type
>
> ```ts theme={null}
> {
>   diskEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   sourceDisk?: string | null
> }[] | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null
> } | null
> ```

> [accordion] machineImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] savedDisks full type
>
> ```ts theme={null}
> {
>   storageBytesStatus?: string | null,
>   storageBytes?: string | number | null,
>   kind?: string | null,
>   architecture?: string | null,
>   sourceDisk?: string | null
> }[] | null
> ```

> [accordion] instanceProperties full type
>
> ```ts theme={null}
> {
>   disks?: {
>     forceAttach?: boolean | null,
>     index?: number | null,
>     savedState?: string | null,
>     deviceName?: string | null,
>     mode?: string | null,
>     source?: string | null,
>     shieldedInstanceInitialState?: {
>       keks?: {
>         fileType?: string | null,
>         content?: string | null
>       }[] | null,
>       dbs?: {
>         fileType?: string | null,
>         content?: string | null
>       }[] | null,
>       dbxs?: {
>         fileType?: string | null,
>         content?: string | null
>       }[] | null,
>       pk?: {
>         fileType?: string | null,
>         content?: string | null
>       } | null
>     } | null,
>     licenses?: string[] | null,
>     architecture?: string | null,
>     initializeParams?: {
>       resourceManagerTags?: Record<string, string> | null,
>       licenses?: string[] | null,
>       replicaZones?: string[] | null,
>       provisionedThroughput?: string | number | null,
>       sourceSnapshotEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       sourceImageEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       sourceSnapshot?: string | null,
>       diskType?: string | null,
>       architecture?: string | null,
>       diskName?: string | null,
>       provisionedIops?: string | number | null,
>       storagePool?: string | null,
>       diskSizeGb?: string | number | null,
>       description?: string | null,
>       sourceImage?: string | null,
>       onUpdateAction?: string | null,
>       labels?: Record<string, string> | null,
>       enableConfidentialCompute?: boolean | null,
>       resourcePolicies?: string[] | null
>     } | null,
>     autoDelete?: boolean | null,
>     guestOsFeatures?: {
>       type?: string | null
>     }[] | null,
>     type?: string | null,
>     interface?: string | null,
>     kind?: string | null,
>     boot?: boolean | null,
>     diskEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     diskSizeGb?: string | number | null
>   }[] | null,
>   labels?: Record<string, string> | null,
>   guestAccelerators?: {
>     acceleratorCount?: number | null,
>     acceleratorType?: string | null
>   }[] | null,
>   machineType?: string | null,
>   tags?: {
>     items?: string[] | null,
>     fingerprint?: string | null
>   } | null,
>   confidentialInstanceConfig?: {
>     enableConfidentialCompute?: boolean | null,
>     confidentialInstanceType?: string | null
>   } | null,
>   resourceManagerTags?: Record<string, string> | null,
>   metadata?: {
>     kind?: string | null,
>     items?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     fingerprint?: string | null
>   } | null,
>   resourcePolicies?: string[] | null,
>   shieldedInstanceConfig?: {
>     enableSecureBoot?: boolean | null,
>     enableVtpm?: boolean | null,
>     enableIntegrityMonitoring?: boolean | null
>   } | null,
>   reservationAffinity?: {
>     values?: string[] | null,
>     key?: string | null,
>     consumeReservationType?: string | null
>   } | null,
>   workloadIdentityConfig?: {
>     identityCertificateEnabled?: boolean | null,
>     identity?: string | null
>   } | null,
>   privateIpv6GoogleAccess?: string | null,
>   description?: string | null,
>   canIpForward?: boolean | null,
>   localSsdEncryptionMode?: string | null,
>   minCpuPlatform?: string | null,
>   scheduling?: {
>     hostErrorTimeoutSeconds?: number | null,
>     localSsdRecoveryTimeout?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     exposeHostTopology?: boolean | null,
>     preemptionNoticeDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     skipGuestOsShutdown?: boolean | null,
>     availabilityDomain?: number | null,
>     automaticRestart?: boolean | null,
>     terminationTime?: string | null,
>     onInstanceStopAction?: {
>       discardLocalSsd?: boolean | null
>     } | null,
>     locationHint?: string | null,
>     onHostMaintenance?: string | null,
>     maxRunDuration?: {
>       nanos?: number | null,
>       seconds?: string | number | null
>     } | null,
>     nodeAffinities?: {
>       operator?: string | null,
>       key?: string | null,
>       values?: string[] | null
>     }[] | null,
>     provisioningModel?: string | null,
>     instanceTerminationAction?: string | null,
>     gracefulShutdown?: {
>       maxDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       enabled?: boolean | null
>     } | null,
>     preemptible?: boolean | null,
>     minNodeCpus?: number | null
>   } | null,
>   networkPerformanceConfig?: {
>     totalEgressBandwidthTier?: string | null
>   } | null,
>   keyRevocationActionType?: string | null,
>   networkInterfaces?: {
>     vlan?: number | null,
>     stackType?: string | null,
>     nicType?: string | null,
>     serviceClassId?: string | null,
>     enableVpcScopedDns?: boolean | null,
>     igmpQuery?: string | null,
>     kind?: string | null,
>     name?: string | null,
>     aliasIpRanges?: {
>       subnetworkRangeName?: string | null,
>       ipCidrRange?: string | null
>     }[] | null,
>     internalIpv6PrefixLength?: number | null,
>     subnetwork?: string | null,
>     fingerprint?: string | null,
>     queueCount?: number | null,
>     aliasIpv6Ranges?: {
>       subnetworkRangeName?: string | null,
>       ipCidrRange?: string | null
>     }[] | null,
>     accessConfigs?: {
>       type?: string | null,
>       securityPolicy?: string | null,
>       name?: string | null,
>       kind?: string | null,
>       networkTier?: string | null,
>       publicPtrDomainName?: string | null,
>       setPublicPtr?: boolean | null,
>       externalIpv6?: string | null,
>       natIP?: string | null,
>       externalIpv6PrefixLength?: number | null
>     }[] | null,
>     networkAttachment?: string | null,
>     networkIP?: string | null,
>     ipv6Address?: string | null,
>     ipv6AccessType?: string | null,
>     ipv6AccessConfigs?: {
>       type?: string | null,
>       securityPolicy?: string | null,
>       name?: string | null,
>       kind?: string | null,
>       networkTier?: string | null,
>       publicPtrDomainName?: string | null,
>       setPublicPtr?: boolean | null,
>       externalIpv6?: string | null,
>       natIP?: string | null,
>       externalIpv6PrefixLength?: number | null
>     }[] | null,
>     network?: string | null,
>     parentNicName?: string | null
>   }[] | null,
>   advancedMachineFeatures?: {
>     threadsPerCore?: number | null,
>     turboMode?: string | null,
>     visibleCoreCount?: number | null,
>     enableUefiNetworking?: boolean | null,
>     performanceMonitoringUnit?: string | null,
>     enableNestedVirtualization?: boolean | null
>   } | null,
>   serviceAccounts?: {
>     scopes?: string[] | null,
>     email?: string | null
>   }[] | null
> } | null
> ```

***

### machineImages.getIamPolicy

`compute.machineImages.getIamPolicy`

Gets the access control policy for a resource. May be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.machineImages.getIamPolicy({ resource: 'web-1-image', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `optionsRequestedPolicyVersion` | `number` | No | Requested IAM Policy version. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### machineImages.insert

`compute.machineImages.insert`

Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.machineImages.insert({ project: 'demo-project', name: 'web-1-image', sourceInstance: 'projects/demo-project/zones/us-central1-a/instances/web-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `sourceInstance` | `string` | No | Required. Source instance that is used to create the machine image from. |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `sourceDiskEncryptionKeys` | `object[]` | No | \[Input Only] Thecustomer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption key. |
| `labels` | `Record<string, string>` | No | Labels to apply to this machine image. These can be later modified by the setLabels method. |
| `params` | `object` | No | Machine Image parameters |
| `storageLocations` | `string[]` | No | The regional or multi-regional Cloud Storage bucket location where themachine image is stored. |
| `labelFingerprint` | `string` | No | A fingerprint for the labels being applied to this machine image, 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. To see the latest fingerprint, make get() request to the machine image. (base64) |
| `machineImageEncryptionKey` | `object` | No | — |
| `instanceProperties` | `object` | No | — |
| `name` | `string` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `body_sourceInstance` | `string` | No | The source instance used to create the machine image. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance) - projects/project/zones/zone/instances/instance |
| `guestFlush` | `boolean` | No | \[Input Only] Whether to attempt an application consistent machine image by informing the OS to prepare for the snapshot process. |

> [accordion] sourceDiskEncryptionKeys full type
>
> ```ts theme={null}
> {
>   diskEncryptionKey?: {
>     rawKey?: string,
>     rsaEncryptedKey?: string,
>     kmsKeyName?: string,
>     sha256?: string,
>     kmsKeyServiceAccount?: string
>   },
>   sourceDisk?: string
> }[]
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] machineImageEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] instanceProperties full type
>
> ```ts theme={null}
> {
>   disks?: {
>     forceAttach?: boolean,
>     deviceName?: string,
>     mode?: READ_ONLY | READ_WRITE,
>     source?: string,
>     initializeParams?: {
>       resourceManagerTags?: Record<string, string>,
>       licenses?: string[],
>       replicaZones?: string[],
>       provisionedThroughput?: string | number,
>       sourceSnapshotEncryptionKey?: {
>         rawKey?: string,
>         rsaEncryptedKey?: string,
>         kmsKeyName?: string,
>         sha256?: string,
>         kmsKeyServiceAccount?: string
>       },
>       sourceImageEncryptionKey?: {
>         rawKey?: string,
>         rsaEncryptedKey?: string,
>         kmsKeyName?: string,
>         sha256?: string,
>         kmsKeyServiceAccount?: string
>       },
>       sourceSnapshot?: string,
>       diskType?: string,
>       architecture?: ARCHITECTURE_UNSPECIFIED | ARM64 | X86_64,
>       diskName?: string,
>       provisionedIops?: string | number,
>       storagePool?: string,
>       diskSizeGb?: string | number,
>       description?: string,
>       sourceImage?: string,
>       onUpdateAction?: RECREATE_DISK | RECREATE_DISK_IF_SOURCE_CHANGED | USE_EXISTING_DISK,
>       labels?: Record<string, string>,
>       enableConfidentialCompute?: boolean,
>       resourcePolicies?: string[]
>     },
>     autoDelete?: boolean,
>     guestOsFeatures?: {
>       type?: BARE_METAL_LINUX_COMPATIBLE | BMSAI_CAPABLE | CCA_CAPABLE | FEATURE_TYPE_UNSPECIFIED | GVNIC | IDPF | MULTI_IP_SUBNET | SECURE_BOOT | SEV_CAPABLE | SEV_LIVE_MIGRATABLE | SEV_LIVE_MIGRATABLE_V2 | SEV_SNP_CAPABLE | SNP_SVSM_CAPABLE | SUSPEND_SAFE_FPR | TDX_CAPABLE | UEFI_COMPATIBLE | VIRTIO_SCSI_MULTIQUEUE | WINDOWS
>     }[],
>     type?: PERSISTENT | SCRATCH,
>     interface?: NVME | SCSI,
>     boot?: boolean,
>     diskEncryptionKey?: {
>       rawKey?: string,
>       rsaEncryptedKey?: string,
>       kmsKeyName?: string,
>       sha256?: string,
>       kmsKeyServiceAccount?: string
>     },
>     diskSizeGb?: string | number
>   }[],
>   labels?: Record<string, string>,
>   guestAccelerators?: {
>     acceleratorCount?: number,
>     acceleratorType?: string
>   }[],
>   machineType?: string,
>   tags?: {
>     items?: string[],
>     fingerprint?: string
>   },
>   confidentialInstanceConfig?: {
>     enableConfidentialCompute?: boolean,
>     confidentialInstanceType?: BMSAI | CCA | CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED | SEV | SEV_SNP | TDX
>   },
>   resourceManagerTags?: Record<string, string>,
>   metadata?: {
>     items?: {
>       key?: string,
>       value?: string
>     }[],
>     fingerprint?: string
>   },
>   resourcePolicies?: string[],
>   shieldedInstanceConfig?: {
>     enableSecureBoot?: boolean,
>     enableVtpm?: boolean,
>     enableIntegrityMonitoring?: boolean
>   },
>   reservationAffinity?: {
>     values?: string[],
>     key?: string,
>     consumeReservationType?: ANY_RESERVATION | NO_RESERVATION | SPECIFIC_RESERVATION | UNSPECIFIED
>   },
>   workloadIdentityConfig?: {
>     identityCertificateEnabled?: boolean,
>     identity?: string
>   },
>   privateIpv6GoogleAccess?: ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE | ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE | INHERIT_FROM_SUBNETWORK,
>   description?: string,
>   canIpForward?: boolean,
>   localSsdEncryptionMode?: EPHEMERAL_KEY_ENCRYPTION | LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED | STANDARD_ENCRYPTION,
>   minCpuPlatform?: string,
>   scheduling?: {
>     hostErrorTimeoutSeconds?: number,
>     localSsdRecoveryTimeout?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     exposeHostTopology?: boolean,
>     preemptionNoticeDuration?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     skipGuestOsShutdown?: boolean,
>     availabilityDomain?: number,
>     automaticRestart?: boolean,
>     terminationTime?: string,
>     onInstanceStopAction?: {
>       discardLocalSsd?: boolean
>     },
>     locationHint?: string,
>     onHostMaintenance?: MIGRATE | TERMINATE,
>     maxRunDuration?: {
>       nanos?: number,
>       seconds?: string | number
>     },
>     nodeAffinities?: {
>       operator?: IN | NOT_IN | OPERATOR_UNSPECIFIED,
>       key?: string,
>       values?: string[]
>     }[],
>     provisioningModel?: FLEX_START | RESERVATION_BOUND | SPOT | STANDARD,
>     instanceTerminationAction?: DELETE | INSTANCE_TERMINATION_ACTION_UNSPECIFIED | STOP,
>     gracefulShutdown?: {
>       maxDuration?: {
>         nanos?: number,
>         seconds?: string | number
>       },
>       enabled?: boolean
>     },
>     preemptible?: boolean,
>     minNodeCpus?: number
>   },
>   networkPerformanceConfig?: {
>     totalEgressBandwidthTier?: DEFAULT | TIER_1
>   },
>   keyRevocationActionType?: KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED | NONE | STOP,
>   networkInterfaces?: {
>     vlan?: number,
>     stackType?: IPV4_IPV6 | IPV4_ONLY | IPV6_ONLY,
>     nicType?: GVNIC | IDPF | IRDMA | MRDMA | UNSPECIFIED_NIC_TYPE | VIRTIO_NET,
>     serviceClassId?: string,
>     enableVpcScopedDns?: boolean,
>     igmpQuery?: IGMP_QUERY_DISABLED | IGMP_QUERY_V2,
>     name?: string,
>     aliasIpRanges?: {
>       subnetworkRangeName?: string,
>       ipCidrRange?: string
>     }[],
>     internalIpv6PrefixLength?: number,
>     subnetwork?: string,
>     fingerprint?: string,
>     queueCount?: number,
>     aliasIpv6Ranges?: {
>       subnetworkRangeName?: string,
>       ipCidrRange?: string
>     }[],
>     accessConfigs?: {
>       type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>       securityPolicy?: string,
>       name?: string,
>       networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>       publicPtrDomainName?: string,
>       setPublicPtr?: boolean,
>       externalIpv6?: string,
>       natIP?: string,
>       externalIpv6PrefixLength?: number
>     }[],
>     networkAttachment?: string,
>     networkIP?: string,
>     ipv6Address?: string,
>     ipv6AccessConfigs?: {
>       type?: DIRECT_IPV6 | ONE_TO_ONE_NAT,
>       securityPolicy?: string,
>       name?: string,
>       networkTier?: FIXED_STANDARD | PREMIUM | STANDARD | STANDARD_OVERRIDES_FIXED_STANDARD,
>       publicPtrDomainName?: string,
>       setPublicPtr?: boolean,
>       externalIpv6?: string,
>       natIP?: string,
>       externalIpv6PrefixLength?: number
>     }[],
>     network?: string,
>     parentNicName?: string
>   }[],
>   advancedMachineFeatures?: {
>     threadsPerCore?: number,
>     turboMode?: string,
>     visibleCoreCount?: number,
>     enableUefiNetworking?: boolean,
>     performanceMonitoringUnit?: ARCHITECTURAL | ENHANCED | PERFORMANCE_MONITORING_UNIT_UNSPECIFIED | STANDARD,
>     enableNestedVirtualization?: boolean
>   },
>   serviceAccounts?: {
>     scopes?: string[],
>     email?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### machineImages.list

`compute.machineImages.list`

Retrieves a list of machine images that are contained within the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.machineImages.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `maxResults` | `number` | No | 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`) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `items` | `object[] \| null` | No | A list of MachineImage resources. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The resource type, which is alwayscompute#machineImagesListResponse for machine image lists. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   sourceInstanceProperties?: {
>     machineType?: string | null,
>     labels?: Record<string, string> | null,
>     tags?: {
>       items?: string[] | null,
>       fingerprint?: string | null
>     } | null,
>     canIpForward?: boolean | null,
>     disks?: {
>       interface?: string | null,
>       licenses?: string[] | null,
>       storageBytesStatus?: string | null,
>       deviceName?: string | null,
>       diskEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       autoDelete?: boolean | null,
>       storageBytes?: string | number | null,
>       kind?: string | null,
>       boot?: boolean | null,
>       diskType?: string | null,
>       guestOsFeatures?: {
>         type?: string | null
>       }[] | null,
>       mode?: string | null,
>       source?: string | null,
>       type?: string | null,
>       index?: number | null,
>       diskSizeGb?: string | number | null
>     }[] | null,
>     networkInterfaces?: {
>       vlan?: number | null,
>       stackType?: string | null,
>       nicType?: string | null,
>       serviceClassId?: string | null,
>       enableVpcScopedDns?: boolean | null,
>       igmpQuery?: string | null,
>       kind?: string | null,
>       name?: string | null,
>       aliasIpRanges?: {
>         subnetworkRangeName?: string | null,
>         ipCidrRange?: string | null
>       }[] | null,
>       internalIpv6PrefixLength?: number | null,
>       subnetwork?: string | null,
>       fingerprint?: string | null,
>       queueCount?: number | null,
>       aliasIpv6Ranges?: {
>         subnetworkRangeName?: string | null,
>         ipCidrRange?: string | null
>       }[] | null,
>       accessConfigs?: {
>         type?: string | null,
>         securityPolicy?: string | null,
>         name?: string | null,
>         kind?: string | null,
>         networkTier?: string | null,
>         publicPtrDomainName?: string | null,
>         setPublicPtr?: boolean | null,
>         externalIpv6?: string | null,
>         natIP?: string | null,
>         externalIpv6PrefixLength?: number | null
>       }[] | null,
>       networkAttachment?: string | null,
>       networkIP?: string | null,
>       ipv6Address?: string | null,
>       ipv6AccessType?: string | null,
>       ipv6AccessConfigs?: {
>         type?: string | null,
>         securityPolicy?: string | null,
>         name?: string | null,
>         kind?: string | null,
>         networkTier?: string | null,
>         publicPtrDomainName?: string | null,
>         setPublicPtr?: boolean | null,
>         externalIpv6?: string | null,
>         natIP?: string | null,
>         externalIpv6PrefixLength?: number | null
>       }[] | null,
>       network?: string | null,
>       parentNicName?: string | null
>     }[] | null,
>     keyRevocationActionType?: string | null,
>     description?: string | null,
>     minCpuPlatform?: string | null,
>     scheduling?: {
>       hostErrorTimeoutSeconds?: number | null,
>       localSsdRecoveryTimeout?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       exposeHostTopology?: boolean | null,
>       preemptionNoticeDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       skipGuestOsShutdown?: boolean | null,
>       availabilityDomain?: number | null,
>       automaticRestart?: boolean | null,
>       terminationTime?: string | null,
>       onInstanceStopAction?: {
>         discardLocalSsd?: boolean | null
>       } | null,
>       locationHint?: string | null,
>       onHostMaintenance?: string | null,
>       maxRunDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       nodeAffinities?: {
>         operator?: string | null,
>         key?: string | null,
>         values?: string[] | null
>       }[] | null,
>       provisioningModel?: string | null,
>       instanceTerminationAction?: string | null,
>       gracefulShutdown?: {
>         maxDuration?: {
>           nanos?: number | null,
>           seconds?: string | number | null
>         } | null,
>         enabled?: boolean | null
>       } | null,
>       preemptible?: boolean | null,
>       minNodeCpus?: number | null
>     } | null,
>     postKeyRevocationActionType?: string | null,
>     deletionProtection?: boolean | null,
>     metadata?: {
>       kind?: string | null,
>       items?: {
>         key?: string | null,
>         value?: string | null
>       }[] | null,
>       fingerprint?: string | null
>     } | null,
>     guestAccelerators?: {
>       acceleratorCount?: number | null,
>       acceleratorType?: string | null
>     }[] | null,
>     serviceAccounts?: {
>       scopes?: string[] | null,
>       email?: string | null
>     }[] | null
>   } | null,
>   sourceDiskEncryptionKeys?: {
>     diskEncryptionKey?: {
>       rawKey?: string | null,
>       rsaEncryptedKey?: string | null,
>       kmsKeyName?: string | null,
>       sha256?: string | null,
>       kmsKeyServiceAccount?: string | null
>     } | null,
>     sourceDisk?: string | null
>   }[] | null,
>   labels?: Record<string, string> | null,
>   satisfiesPzs?: boolean | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   creationTimestamp?: string | null,
>   storageLocations?: string[] | null,
>   labelFingerprint?: string | null,
>   selfLink?: string | null,
>   machineImageEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   status?: string | null,
>   savedDisks?: {
>     storageBytesStatus?: string | null,
>     storageBytes?: string | number | null,
>     kind?: string | null,
>     architecture?: string | null,
>     sourceDisk?: string | null
>   }[] | null,
>   instanceProperties?: {
>     disks?: {
>       forceAttach?: boolean | null,
>       index?: number | null,
>       savedState?: string | null,
>       deviceName?: string | null,
>       mode?: string | null,
>       source?: string | null,
>       shieldedInstanceInitialState?: {
>         keks?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         dbxs?: {
>           fileType?: string | null,
>           content?: string | null
>         }[] | null,
>         pk?: {
>           fileType?: string | null,
>           content?: string | null
>         } | null
>       } | null,
>       licenses?: string[] | null,
>       architecture?: string | null,
>       initializeParams?: {
>         resourceManagerTags?: Record<string, string> | null,
>         licenses?: string[] | null,
>         replicaZones?: string[] | null,
>         provisionedThroughput?: string | number | null,
>         sourceSnapshotEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceImageEncryptionKey?: {
>           rawKey?: string | null,
>           rsaEncryptedKey?: string | null,
>           kmsKeyName?: string | null,
>           sha256?: string | null,
>           kmsKeyServiceAccount?: string | null
>         } | null,
>         sourceSnapshot?: string | null,
>         diskType?: string | null,
>         architecture?: string | null,
>         diskName?: string | null,
>         provisionedIops?: string | number | null,
>         storagePool?: string | null,
>         diskSizeGb?: string | number | null,
>         description?: string | null,
>         sourceImage?: string | null,
>         onUpdateAction?: string | null,
>         labels?: Record<string, string> | null,
>         enableConfidentialCompute?: boolean | null,
>         resourcePolicies?: string[] | null
>       } | null,
>       autoDelete?: boolean | null,
>       guestOsFeatures?: {
>         type?: string | null
>       }[] | null,
>       type?: string | null,
>       interface?: string | null,
>       kind?: string | null,
>       boot?: boolean | null,
>       diskEncryptionKey?: {
>         rawKey?: string | null,
>         rsaEncryptedKey?: string | null,
>         kmsKeyName?: string | null,
>         sha256?: string | null,
>         kmsKeyServiceAccount?: string | null
>       } | null,
>       diskSizeGb?: string | number | null
>     }[] | null,
>     labels?: Record<string, string> | null,
>     guestAccelerators?: {
>       acceleratorCount?: number | null,
>       acceleratorType?: string | null
>     }[] | null,
>     machineType?: string | null,
>     tags?: {
>       items?: string[] | null,
>       fingerprint?: string | null
>     } | null,
>     confidentialInstanceConfig?: {
>       enableConfidentialCompute?: boolean | null,
>       confidentialInstanceType?: string | null
>     } | null,
>     resourceManagerTags?: Record<string, string> | null,
>     metadata?: {
>       kind?: string | null,
>       items?: {
>         key?: string | null,
>         value?: string | null
>       }[] | null,
>       fingerprint?: string | null
>     } | null,
>     resourcePolicies?: string[] | null,
>     shieldedInstanceConfig?: {
>       enableSecureBoot?: boolean | null,
>       enableVtpm?: boolean | null,
>       enableIntegrityMonitoring?: boolean | null
>     } | null,
>     reservationAffinity?: {
>       values?: string[] | null,
>       key?: string | null,
>       consumeReservationType?: string | null
>     } | null,
>     workloadIdentityConfig?: {
>       identityCertificateEnabled?: boolean | null,
>       identity?: string | null
>     } | null,
>     privateIpv6GoogleAccess?: string | null,
>     description?: string | null,
>     canIpForward?: boolean | null,
>     localSsdEncryptionMode?: string | null,
>     minCpuPlatform?: string | null,
>     scheduling?: {
>       hostErrorTimeoutSeconds?: number | null,
>       localSsdRecoveryTimeout?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       exposeHostTopology?: boolean | null,
>       preemptionNoticeDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       skipGuestOsShutdown?: boolean | null,
>       availabilityDomain?: number | null,
>       automaticRestart?: boolean | null,
>       terminationTime?: string | null,
>       onInstanceStopAction?: {
>         discardLocalSsd?: boolean | null
>       } | null,
>       locationHint?: string | null,
>       onHostMaintenance?: string | null,
>       maxRunDuration?: {
>         nanos?: number | null,
>         seconds?: string | number | null
>       } | null,
>       nodeAffinities?: {
>         operator?: string | null,
>         key?: string | null,
>         values?: string[] | null
>       }[] | null,
>       provisioningModel?: string | null,
>       instanceTerminationAction?: string | null,
>       gracefulShutdown?: {
>         maxDuration?: {
>           nanos?: number | null,
>           seconds?: string | number | null
>         } | null,
>         enabled?: boolean | null
>       } | null,
>       preemptible?: boolean | null,
>       minNodeCpus?: number | null
>     } | null,
>     networkPerformanceConfig?: {
>       totalEgressBandwidthTier?: string | null
>     } | null,
>     keyRevocationActionType?: string | null,
>     networkInterfaces?: {
>       vlan?: number | null,
>       stackType?: string | null,
>       nicType?: string | null,
>       serviceClassId?: string | null,
>       enableVpcScopedDns?: boolean | null,
>       igmpQuery?: string | null,
>       kind?: string | null,
>       name?: string | null,
>       aliasIpRanges?: {
>         subnetworkRangeName?: string | null,
>         ipCidrRange?: string | null
>       }[] | null,
>       internalIpv6PrefixLength?: number | null,
>       subnetwork?: string | null,
>       fingerprint?: string | null,
>       queueCount?: number | null,
>       aliasIpv6Ranges?: {
>         subnetworkRangeName?: string | null,
>         ipCidrRange?: string | null
>       }[] | null,
>       accessConfigs?: {
>         type?: string | null,
>         securityPolicy?: string | null,
>         name?: string | null,
>         kind?: string | null,
>         networkTier?: string | null,
>         publicPtrDomainName?: string | null,
>         setPublicPtr?: boolean | null,
>         externalIpv6?: string | null,
>         natIP?: string | null,
>         externalIpv6PrefixLength?: number | null
>       }[] | null,
>       networkAttachment?: string | null,
>       networkIP?: string | null,
>       ipv6Address?: string | null,
>       ipv6AccessType?: string | null,
>       ipv6AccessConfigs?: {
>         type?: string | null,
>         securityPolicy?: string | null,
>         name?: string | null,
>         kind?: string | null,
>         networkTier?: string | null,
>         publicPtrDomainName?: string | null,
>         setPublicPtr?: boolean | null,
>         externalIpv6?: string | null,
>         natIP?: string | null,
>         externalIpv6PrefixLength?: number | null
>       }[] | null,
>       network?: string | null,
>       parentNicName?: string | null
>     }[] | null,
>     advancedMachineFeatures?: {
>       threadsPerCore?: number | null,
>       turboMode?: string | null,
>       visibleCoreCount?: number | null,
>       enableUefiNetworking?: boolean | null,
>       performanceMonitoringUnit?: string | null,
>       enableNestedVirtualization?: boolean | null
>     } | null,
>     serviceAccounts?: {
>       scopes?: string[] | null,
>       email?: string | null
>     }[] | null
>   } | null,
>   satisfiesPzi?: boolean | null,
>   totalStorageBytes?: string | number | null,
>   name?: string | null,
>   sourceInstance?: string | null,
>   id?: string | number | null,
>   guestFlush?: boolean | null,
>   kind?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

***

### machineImages.setIamPolicy

`compute.machineImages.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.machineImages.setIamPolicy({
	resource: 'web-1-image',
	project: 'demo-project',
	policy: {
		bindings: [{
			role: 'roles/compute.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `etag` | `string` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. (base64) |
| `bindings` | `object[]` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: ADMIN_READ | DATA_READ | DATA_WRITE | LOG_TYPE_UNSPECIFIED,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   bindings?: {
>     role?: string,
>     members?: string[],
>     condition?: {
>       title?: string,
>       description?: string,
>       expression?: string,
>       location?: string
>     }
>   }[],
>   etag?: string
> }
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string,
>   members?: string[],
>   condition?: {
>     title?: string,
>     description?: string,
>     expression?: string,
>     location?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### machineImages.setLabels

`compute.machineImages.setLabels`

Sets the labels on a machine image. To learn more about labels, read theLabeling Resources documentation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.machineImages.setLabels({
	project: 'demo-project',
	resource: 'web-1-image',
	labels: { env: 'prod' },
	labelFingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint. (base64) |
| `labels` | `Record<string, string>` | No | A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example,"webserver-frontend": "images". A label value can also be empty (e.g. "my-label": ""). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### machineImages.testIamPermissions

`compute.machineImages.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.machineImages.testIamPermissions({
	resource: 'web-1-image',
	project: 'demo-project',
	permissions: ['compute.machineImages.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### machineTypes.aggregatedList

`compute.machineTypes.aggregatedList`

Retrieves an aggregated list of machine types. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.machineTypes.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `maxResults` | `number` | No | 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`) |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#machineTypeAggregatedList for aggregated lists of machine types. |
| `items` | `object \| null` | No | A list of MachineTypesScopedList resources. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   code?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   warning?: {
>     message?: string | null,
>     code?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null
>   } | null,
>   machineTypes?: {
>     zone?: string | null,
>     architecture?: string | null,
>     deprecated?: {
>       replacement?: string | null,
>       state?: string | null,
>       deleted?: string | null,
>       deprecated?: string | null,
>       obsolete?: string | null
>     } | null,
>     guestCpus?: number | null,
>     creationTimestamp?: string | null,
>     maximumPersistentDisks?: number | null,
>     id?: string | number | null,
>     description?: string | null,
>     bundledLocalSsds?: {
>       defaultInterface?: string | null,
>       partitionCount?: number | null
>     } | null,
>     imageSpaceGb?: number | null,
>     name?: string | null,
>     isSharedCpu?: boolean | null,
>     kind?: string | null,
>     selfLink?: string | null,
>     accelerators?: {
>       guestAcceleratorCount?: number | null,
>       guestAcceleratorType?: string | null
>     }[] | null,
>     memoryMb?: number | null,
>     maximumPersistentDisksSizeGb?: string | number | null
>   }[] | null
> }> | null
> ```

***

### machineTypes.get

`compute.machineTypes.get`

Returns the specified machine type

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.machineTypes.get({ project: 'demo-project', zone: 'us-central1-a', machineType: 'e2-medium' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `machineType` | `string` | Yes | Name of the machine type to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string \| null` | No | \[Output Only] The name of the zone where the machine type resides, such as us-central1-a. |
| `architecture` | `string \| null` | No | \[Output Only] The architecture of the machine type. |
| `deprecated` | `object \| null` | No | Deprecation status for a public resource. |
| `guestCpus` | `number \| null` | No | \[Output Only] The number of virtual CPUs that are available to the instance. |
| `creationTimestamp` | `string \| null` | No | \[Output Only] Creation timestamp inRFC3339 text format. |
| `maximumPersistentDisks` | `number \| null` | No | \[Output Only] Maximum persistent disks allowed. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `description` | `string \| null` | No | \[Output Only] An optional textual description of the resource. |
| `bundledLocalSsds` | `object \| null` | No | — |
| `imageSpaceGb` | `number \| null` | No | \[Deprecated] This property is deprecated and will never be populated with any relevant values. |
| `name` | `string \| null` | No | \[Output Only] Name of the resource. |
| `isSharedCpu` | `boolean \| null` | No | \[Output Only] Whether this machine type has a shared CPU. SeeShared-core machine types for more information. |
| `kind` | `string \| null` | No | Output only. \[Output Only] The type of the resource. Alwayscompute#machineType for machine types. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `accelerators` | `object[] \| null` | No | \[Output Only] A list of accelerator configurations assigned to this machine type. |
| `memoryMb` | `number \| null` | No | \[Output Only] The amount of physical memory available to the instance, defined in MB. |
| `maximumPersistentDisksSizeGb` | `string \| number \| null` | No | \[Output Only] Maximum total persistent disks size (GB) allowed. |

> [accordion] deprecated full type
>
> ```ts theme={null}
> {
>   replacement?: string | null,
>   state?: string | null,
>   deleted?: string | null,
>   deprecated?: string | null,
>   obsolete?: string | null
> } | null
> ```

> [accordion] bundledLocalSsds full type
>
> ```ts theme={null}
> {
>   defaultInterface?: string | null,
>   partitionCount?: number | null
> } | null
> ```

> [accordion] accelerators full type
>
> ```ts theme={null}
> {
>   guestAcceleratorCount?: number | null,
>   guestAcceleratorType?: string | null
> }[] | null
> ```

***

### machineTypes.list

`compute.machineTypes.list`

Retrieves a list of machine types available to the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.machineTypes.list({ project: 'demo-project', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `zone` | `string` | Yes | The name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `maxResults` | `number` | No | 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`) |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `items` | `object[] \| null` | No | A list of MachineType resources. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#machineTypeList for lists of machine types. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   zone?: string | null,
>   architecture?: string | null,
>   deprecated?: {
>     replacement?: string | null,
>     state?: string | null,
>     deleted?: string | null,
>     deprecated?: string | null,
>     obsolete?: string | null
>   } | null,
>   guestCpus?: number | null,
>   creationTimestamp?: string | null,
>   maximumPersistentDisks?: number | null,
>   id?: string | number | null,
>   description?: string | null,
>   bundledLocalSsds?: {
>     defaultInterface?: string | null,
>     partitionCount?: number | null
>   } | null,
>   imageSpaceGb?: number | null,
>   name?: string | null,
>   isSharedCpu?: boolean | null,
>   kind?: string | null,
>   selfLink?: string | null,
>   accelerators?: {
>     guestAcceleratorCount?: number | null,
>     guestAcceleratorType?: string | null
>   }[] | null,
>   memoryMb?: number | null,
>   maximumPersistentDisksSizeGb?: string | number | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   code?: string | null,
>   message?: string | null
> } | null
> ```

***

### networks.addPeering

`compute.networks.addPeering`

Adds a peering to the specified network

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.addPeering({
	network: 'default',
	project: 'demo-project',
	networkPeering: { name: 'peer-1', network: 'projects/other-project/global/networks/default', exchangeSubnetRoutes: true },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Name of the network resource to add peering to. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `autoCreateRoutes` | `boolean` | No | This field will be deprecated soon. Useexchange\_subnet\_routes in network\_peering instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state isACTIVE. |
| `peerNetwork` | `string` | No | 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. |
| `networkPeering` | `object` | No | A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering. |
| `name` | `string` | No | Name of the peering, which should conform to RFC1035. |

> [accordion] networkPeering full type
>
> ```ts theme={null}
> {
>   name?: string,
>   importCustomRoutes?: boolean,
>   exchangeSubnetRoutes?: boolean,
>   exportCustomRoutes?: boolean,
>   stackType?: IPV4_IPV6 | IPV4_ONLY,
>   updateStrategy?: CONSENSUS | INDEPENDENT | UNSPECIFIED,
>   exportSubnetRoutesWithPublicIp?: boolean,
>   importSubnetRoutesWithPublicIp?: boolean,
>   autoCreateRoutes?: boolean,
>   network?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### networks.cancelRequestRemovePeering

`compute.networks.cancelRequestRemovePeering`

Cancel requests to remove a peering from the specified network. Applicable only for PeeringConnection with update\_strategy=CONSENSUS

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.cancelRequestRemovePeering({ network: 'default', project: 'demo-project', name: 'peer-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Name of the network resource to remove peering from. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `name` | `string` | No | Name of the peering, which should conform to RFC1035. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### networks.delete

`compute.networks.delete`

Deletes the specified network

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.networks.delete({ network: 'default', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `network` | `string` | Yes | Name of the network to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### networks.get

`compute.networks.get`

Returns the specified network

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.get({ network: 'default', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Name of the network to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `IPv4Range` | `string \| null` | No | Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is aCIDR specification, for example:192.168.0.0/16. Provided by the client when the network is created. |
| `networkFirewallPolicyEnforcementOrder` | `string \| null` | No | The network firewall policy enforcement order. Can be either AFTER\_CLASSIC\_FIREWALL or BEFORE\_CLASSIC\_FIREWALL. Defaults to AFTER\_CLASSIC\_FIREWALL if the field is not specified. |
| `enableUlaInternalIpv6` | `boolean \| null` | No | Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. . |
| `peerings` | `object[] \| null` | No | Output only. \[Output Only] A list of network peerings for the resource. |
| `mtu` | `number \| null` | No | Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `subnetworks` | `string[] \| null` | No | \[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network. |
| `name` | `string \| null` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#network for networks. |
| `selfLinkWithId` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource with the resource id. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `networkProfile` | `string \| null` | No | A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - [https://www.googleapis.com/compute/\&#123;api\_version\&#125;/projects/\&#123;project\_id\&#125;/global/networkProfiles/\&#123;network\_profile\_name\&#125](https://www.googleapis.com/compute/\&#123;api_version\&#125;/projects/\&#123;project_id\&#125;/global/networkProfiles/\&#123;network_profile_name\&#125); - projects/\{project\_id}/global/networkProfiles/\{network\_profile\_name} |
| `autoCreateSubnetworks` | `boolean \| null` | No | Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described inAuto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworksinsert method. |
| `description` | `string \| null` | No | An optional description of this resource. Provide this field when you create the resource. |
| `internalIpv6Range` | `string \| null` | No | When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. . |
| `params` | `object \| null` | No | Additional network parameters. |
| `firewallPolicy` | `string \| null` | No | Output only. \[Output Only] URL of the firewall policy the network is associated with. |
| `gatewayIPv4` | `string \| null` | No | \[Output Only] The gateway address for default routing out of the network, selected by Google Cloud. |
| `routingConfig` | `object \| null` | No | A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide. |

> [accordion] peerings full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   importCustomRoutes?: boolean | null,
>   exchangeSubnetRoutes?: boolean | null,
>   exportCustomRoutes?: boolean | null,
>   stackType?: string | null,
>   peerMtu?: number | null,
>   stateDetails?: string | null,
>   updateStrategy?: string | null,
>   exportSubnetRoutesWithPublicIp?: boolean | null,
>   importSubnetRoutesWithPublicIp?: boolean | null,
>   autoCreateRoutes?: boolean | null,
>   connectionStatus?: {
>     consensusState?: {
>       deleteStatus?: string | null,
>       updateStatus?: string | null
>     } | null,
>     updateStrategy?: string | null,
>     trafficConfiguration?: {
>       exportSubnetRoutesWithPublicIpToPeer?: boolean | null,
>       exportCustomRoutesToPeer?: boolean | null,
>       importSubnetRoutesWithPublicIpFromPeer?: boolean | null,
>       importCustomRoutesFromPeer?: boolean | null,
>       stackType?: string | null
>     } | null
>   } | null,
>   network?: string | null,
>   state?: string | null
> }[] | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null
> } | null
> ```

> [accordion] routingConfig full type
>
> ```ts theme={null}
> {
>   bgpBestPathSelectionMode?: string | null,
>   bgpAlwaysCompareMed?: boolean | null,
>   bgpInterRegionCost?: string | null,
>   effectiveBgpInterRegionCost?: string | null,
>   effectiveBgpAlwaysCompareMed?: boolean | null,
>   routingMode?: string | null
> } | null
> ```

***

### networks.getEffectiveFirewalls

`compute.networks.getEffectiveFirewalls`

Returns the effective firewalls on a given network

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.getEffectiveFirewalls({ network: 'default', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Name of the network for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `firewalls` | `object[] \| null` | No | Effective firewalls on the network. |
| `firewallPolicys` | `object[] \| null` | No | \[Output Only] Effective firewalls from firewall policy. It returns Global Network Firewall Policies and Hierarchical Firewall Policies. UseregionNetworkFirewallPolicies.getEffectiveFirewalls to get Regional Network Firewall Policies as well. |

> [accordion] firewalls full type
>
> ```ts theme={null}
> {
>   creationTimestamp?: string | null,
>   logConfig?: {
>     enable?: boolean | null,
>     metadata?: string | null
>   } | null,
>   id?: string | number | null,
>   direction?: string | null,
>   allowed?: {
>     IPProtocol?: string | null,
>     ports?: string[] | null
>   }[] | null,
>   targetTags?: string[] | null,
>   kind?: string | null,
>   destinationRanges?: string[] | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   sourceTags?: string[] | null,
>   targetServiceAccounts?: string[] | null,
>   sourceServiceAccounts?: string[] | null,
>   name?: string | null,
>   priority?: number | null,
>   network?: string | null,
>   sourceRanges?: string[] | null,
>   selfLink?: string | null,
>   description?: string | null,
>   denied?: {
>     IPProtocol?: string | null,
>     ports?: string[] | null
>   }[] | null,
>   disabled?: boolean | null
> }[] | null
> ```

> [accordion] firewallPolicys full type
>
> ```ts theme={null}
> {
>   shortName?: string | null,
>   displayName?: string | null,
>   name?: string | null,
>   type?: string | null,
>   rules?: {
>     enableLogging?: boolean | null,
>     securityProfileGroup?: string | null,
>     description?: string | null,
>     match?: {
>       srcSecureTags?: {
>         state?: string | null,
>         name?: string | null
>       }[] | null,
>       srcThreatIntelligences?: string[] | null,
>       destNetworkContext?: string | null,
>       srcRegionCodes?: string[] | null,
>       srcFqdns?: string[] | null,
>       srcNetworkContext?: string | null,
>       srcAddressGroups?: string[] | null,
>       srcNetworks?: string[] | null,
>       srcIpRanges?: string[] | null,
>       layer4Configs?: {
>         ports?: string[] | null,
>         ipProtocol?: string | null
>       }[] | null,
>       destThreatIntelligences?: string[] | null,
>       destNetworkType?: string | null,
>       destFqdns?: string[] | null,
>       destRegionCodes?: string[] | null,
>       srcNetworkType?: string | null,
>       destIpRanges?: string[] | null,
>       destAddressGroups?: string[] | null
>     } | null,
>     direction?: string | null,
>     targetResources?: string[] | null,
>     targetType?: string | null,
>     targetServiceAccounts?: string[] | null,
>     disabled?: boolean | null,
>     tlsInspect?: boolean | null,
>     ruleName?: string | null,
>     priority?: number | null,
>     ruleTupleCount?: number | null,
>     action?: string | null,
>     targetForwardingRules?: string[] | null,
>     kind?: string | null,
>     targetSecureTags?: {
>       state?: string | null,
>       name?: string | null
>     }[] | null
>   }[] | null,
>   priority?: number | null,
>   packetMirroringRules?: {
>     enableLogging?: boolean | null,
>     securityProfileGroup?: string | null,
>     description?: string | null,
>     match?: {
>       srcSecureTags?: {
>         state?: string | null,
>         name?: string | null
>       }[] | null,
>       srcThreatIntelligences?: string[] | null,
>       destNetworkContext?: string | null,
>       srcRegionCodes?: string[] | null,
>       srcFqdns?: string[] | null,
>       srcNetworkContext?: string | null,
>       srcAddressGroups?: string[] | null,
>       srcNetworks?: string[] | null,
>       srcIpRanges?: string[] | null,
>       layer4Configs?: {
>         ports?: string[] | null,
>         ipProtocol?: string | null
>       }[] | null,
>       destThreatIntelligences?: string[] | null,
>       destNetworkType?: string | null,
>       destFqdns?: string[] | null,
>       destRegionCodes?: string[] | null,
>       srcNetworkType?: string | null,
>       destIpRanges?: string[] | null,
>       destAddressGroups?: string[] | null
>     } | null,
>     direction?: string | null,
>     targetResources?: string[] | null,
>     targetType?: string | null,
>     targetServiceAccounts?: string[] | null,
>     disabled?: boolean | null,
>     tlsInspect?: boolean | null,
>     ruleName?: string | null,
>     priority?: number | null,
>     ruleTupleCount?: number | null,
>     action?: string | null,
>     targetForwardingRules?: string[] | null,
>     kind?: string | null,
>     targetSecureTags?: {
>       state?: string | null,
>       name?: string | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

***

### networks.insert

`compute.networks.insert`

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

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.insert({ project: 'demo-project', name: 'vpc-2', autoCreateSubnetworks: false });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `IPv4Range` | `string` | No | Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is aCIDR specification, for example:192.168.0.0/16. Provided by the client when the network is created. |
| `networkFirewallPolicyEnforcementOrder` | `AFTER_CLASSIC_FIREWALL \| BEFORE_CLASSIC_FIREWALL` | No | The network firewall policy enforcement order. Can be either AFTER\_CLASSIC\_FIREWALL or BEFORE\_CLASSIC\_FIREWALL. Defaults to AFTER\_CLASSIC\_FIREWALL if the field is not specified. |
| `enableUlaInternalIpv6` | `boolean` | No | Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. . |
| `mtu` | `number` | No | Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460. |
| `subnetworks` | `string[]` | No | \[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network. |
| `name` | `string` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `selfLink` | `string` | No | \[Output Only] Server-defined URL for the resource. |
| `networkProfile` | `string` | No | A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - [https://www.googleapis.com/compute/\&#123;api\_version\&#125;/projects/\&#123;project\_id\&#125;/global/networkProfiles/\&#123;network\_profile\_name\&#125](https://www.googleapis.com/compute/\&#123;api_version\&#125;/projects/\&#123;project_id\&#125;/global/networkProfiles/\&#123;network_profile_name\&#125); - projects/\{project\_id}/global/networkProfiles/\{network\_profile\_name} |
| `autoCreateSubnetworks` | `boolean` | No | Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described inAuto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworksinsert method. |
| `description` | `string` | No | An optional description of this resource. Provide this field when you create the resource. |
| `internalIpv6Range` | `string` | No | When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. . |
| `params` | `object` | No | Additional network parameters. |
| `gatewayIPv4` | `string` | No | \[Output Only] The gateway address for default routing out of the network, selected by Google Cloud. |
| `routingConfig` | `object` | No | A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide. |

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] routingConfig full type
>
> ```ts theme={null}
> {
>   bgpBestPathSelectionMode?: LEGACY | STANDARD,
>   bgpAlwaysCompareMed?: boolean,
>   bgpInterRegionCost?: ADD_COST_TO_MED | DEFAULT,
>   routingMode?: GLOBAL | REGIONAL
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### networks.list

`compute.networks.list`

Retrieves the list of networks available to the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `maxResults` | `number` | No | 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`) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#networkList for lists of networks. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `items` | `object[] \| null` | No | A list of Network resources. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   IPv4Range?: string | null,
>   networkFirewallPolicyEnforcementOrder?: string | null,
>   enableUlaInternalIpv6?: boolean | null,
>   peerings?: {
>     name?: string | null,
>     importCustomRoutes?: boolean | null,
>     exchangeSubnetRoutes?: boolean | null,
>     exportCustomRoutes?: boolean | null,
>     stackType?: string | null,
>     peerMtu?: number | null,
>     stateDetails?: string | null,
>     updateStrategy?: string | null,
>     exportSubnetRoutesWithPublicIp?: boolean | null,
>     importSubnetRoutesWithPublicIp?: boolean | null,
>     autoCreateRoutes?: boolean | null,
>     connectionStatus?: {
>       consensusState?: {
>         deleteStatus?: string | null,
>         updateStatus?: string | null
>       } | null,
>       updateStrategy?: string | null,
>       trafficConfiguration?: {
>         exportSubnetRoutesWithPublicIpToPeer?: boolean | null,
>         exportCustomRoutesToPeer?: boolean | null,
>         importSubnetRoutesWithPublicIpFromPeer?: boolean | null,
>         importCustomRoutesFromPeer?: boolean | null,
>         stackType?: string | null
>       } | null
>     } | null,
>     network?: string | null,
>     state?: string | null
>   }[] | null,
>   mtu?: number | null,
>   id?: string | number | null,
>   creationTimestamp?: string | null,
>   subnetworks?: string[] | null,
>   name?: string | null,
>   kind?: string | null,
>   selfLinkWithId?: string | null,
>   selfLink?: string | null,
>   networkProfile?: string | null,
>   autoCreateSubnetworks?: boolean | null,
>   description?: string | null,
>   internalIpv6Range?: string | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   firewallPolicy?: string | null,
>   gatewayIPv4?: string | null,
>   routingConfig?: {
>     bgpBestPathSelectionMode?: string | null,
>     bgpAlwaysCompareMed?: boolean | null,
>     bgpInterRegionCost?: string | null,
>     effectiveBgpInterRegionCost?: string | null,
>     effectiveBgpAlwaysCompareMed?: boolean | null,
>     routingMode?: string | null
>   } | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

***

### networks.listPeeringRoutes

`compute.networks.listPeeringRoutes`

Lists the peering routes exchanged over peering connection (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.listPeeringRoutes({ network: 'default', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Name of the network for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `peeringName` | `string` | No | The response will show routes exchanged over the given peering connection. |
| `direction` | `INCOMING \| OUTGOING` | No | The direction of the exchanged routes. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `region` | `string` | No | The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region. |
| `maxResults` | `number` | No | 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`) |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `items` | `object[] \| null` | No | A list of ExchangedPeeringRoute resources. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#exchangedPeeringRoutesList for exchanged peering routes lists. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   message?: string | null,
>   code?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   imported?: boolean | null,
>   nextHopRegion?: string | null,
>   priority?: number | null,
>   destRange?: string | null
> }[] | null
> ```

***

### networks.patch

`compute.networks.patch`

Patches the specified network with the data included in the request. Only routingConfig can be modified

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.patch({
	network: 'default',
	project: 'demo-project',
	routingConfig: { routingMode: 'GLOBAL' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Name of the network to update. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `IPv4Range` | `string` | No | Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is aCIDR specification, for example:192.168.0.0/16. Provided by the client when the network is created. |
| `networkFirewallPolicyEnforcementOrder` | `AFTER_CLASSIC_FIREWALL \| BEFORE_CLASSIC_FIREWALL` | No | The network firewall policy enforcement order. Can be either AFTER\_CLASSIC\_FIREWALL or BEFORE\_CLASSIC\_FIREWALL. Defaults to AFTER\_CLASSIC\_FIREWALL if the field is not specified. |
| `enableUlaInternalIpv6` | `boolean` | No | Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. . |
| `mtu` | `number` | No | Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460. |
| `subnetworks` | `string[]` | No | \[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network. |
| `name` | `string` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `selfLink` | `string` | No | \[Output Only] Server-defined URL for the resource. |
| `networkProfile` | `string` | No | A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - [https://www.googleapis.com/compute/\&#123;api\_version\&#125;/projects/\&#123;project\_id\&#125;/global/networkProfiles/\&#123;network\_profile\_name\&#125](https://www.googleapis.com/compute/\&#123;api_version\&#125;/projects/\&#123;project_id\&#125;/global/networkProfiles/\&#123;network_profile_name\&#125); - projects/\{project\_id}/global/networkProfiles/\{network\_profile\_name} |
| `autoCreateSubnetworks` | `boolean` | No | Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described inAuto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworksinsert method. |
| `description` | `string` | No | An optional description of this resource. Provide this field when you create the resource. |
| `internalIpv6Range` | `string` | No | When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. . |
| `params` | `object` | No | Additional network parameters. |
| `gatewayIPv4` | `string` | No | \[Output Only] The gateway address for default routing out of the network, selected by Google Cloud. |
| `routingConfig` | `object` | No | A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide. |

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] routingConfig full type
>
> ```ts theme={null}
> {
>   bgpBestPathSelectionMode?: LEGACY | STANDARD,
>   bgpAlwaysCompareMed?: boolean,
>   bgpInterRegionCost?: ADD_COST_TO_MED | DEFAULT,
>   routingMode?: GLOBAL | REGIONAL
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### networks.removePeering

`compute.networks.removePeering`

Removes a peering from the specified network

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.networks.removePeering({ network: 'default', project: 'demo-project', name: 'peer-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `network` | `string` | Yes | Name of the network resource to remove peering from. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `name` | `string` | No | Name of the peering, which should conform to RFC1035. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### networks.requestRemovePeering

`compute.networks.requestRemovePeering`

Requests to remove a peering from the specified network. Applicable only for PeeringConnection with update\_strategy=CONSENSUS

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.requestRemovePeering({ network: 'default', project: 'demo-project', name: 'peer-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Name of the network resource to remove peering from. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `name` | `string` | No | Name of the peering, which should conform to RFC1035. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### networks.switchToCustomMode

`compute.networks.switchToCustomMode`

Switches the network mode from auto subnet mode to custom subnet mode

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.switchToCustomMode({ network: 'default', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `network` | `string` | Yes | Name of the network to be updated. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### networks.updatePeering

`compute.networks.updatePeering`

Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export\_custom\_routes field and the NetworkPeering.import\_custom\_routes field

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.networks.updatePeering({
	network: 'default',
	project: 'demo-project',
	networkPeering: { name: 'peer-1', exportCustomRoutes: true },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Name of the network resource which the updated peering is belonging to. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `networkPeering` | `object` | No | A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering. |

> [accordion] networkPeering full type
>
> ```ts theme={null}
> {
>   name?: string,
>   importCustomRoutes?: boolean,
>   exchangeSubnetRoutes?: boolean,
>   exportCustomRoutes?: boolean,
>   stackType?: IPV4_IPV6 | IPV4_ONLY,
>   updateStrategy?: CONSENSUS | INDEPENDENT | UNSPECIFIED,
>   exportSubnetRoutesWithPublicIp?: boolean,
>   importSubnetRoutesWithPublicIp?: boolean,
>   autoCreateRoutes?: boolean,
>   network?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.disableXpnHost

`compute.projects.disableXpnHost`

Disable this project as a shared VPC host project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.disableXpnHost({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.disableXpnResource

`compute.projects.disableXpnResource`

Disable a service resource (also known as service project) associated with this host project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.disableXpnResource({
	project: 'demo-project',
	xpnResource: { id: 'service-project', type: 'PROJECT' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `xpnResource` | `object` | No | Service resource (a.k.a service project) ID. |

> [accordion] xpnResource full type
>
> ```ts theme={null}
> {
>   type?: PROJECT | XPN_RESOURCE_TYPE_UNSPECIFIED,
>   id?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.enableXpnHost

`compute.projects.enableXpnHost`

Enable this project as a shared VPC host project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.enableXpnHost({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.enableXpnResource

`compute.projects.enableXpnResource`

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.enableXpnResource({
	project: 'demo-project',
	xpnResource: { id: 'service-project', type: 'PROJECT' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `xpnResource` | `object` | No | Service resource (a.k.a service project) ID. |

> [accordion] xpnResource full type
>
> ```ts theme={null}
> {
>   type?: PROJECT | XPN_RESOURCE_TYPE_UNSPECIFIED,
>   id?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.get

`compute.projects.get`

Returns the specified Project resource: its common instance metadata, quotas and default service account

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.get({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `usageExportLocation` | `object \| null` | No | The location in Cloud Storage and naming method of the daily usage report. Contains bucket\_name and report\_name prefix. |
| `enabledFeatures` | `string[] \| null` | No | An optional list of restricted features enabled for use on this project. |
| `quotas` | `object[] \| null` | No | \[Output Only] Quotas assigned to this project. |
| `cloudArmorTier` | `string \| null` | No | Output only. \[Output Only] The Cloud Armor tier for this project. It can be one of the following values: CA\_STANDARD,CA\_ENTERPRISE\_PAYGO. If this field is not specified, it is assumed to beCA\_STANDARD. |
| `defaultNetworkTier` | `string \| null` | No | This signifies the default network tier used for configuring resources of the project and can only take the following values:PREMIUM, STANDARD. Initially the default network tier is PREMIUM. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is *not* the project ID, and is just a unique ID used by Compute Engine to identify resources. |
| `commonInstanceMetadata` | `object \| null` | No | A metadata key/value entry. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `xpnProjectStatus` | `string \| null` | No | \[Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated. |
| `vmDnsSetting` | `string \| null` | No | Output only. \[Output Only] Default internal DNS setting used by VMs running in this project. |
| `defaultServiceAccount` | `string \| null` | No | \[Output Only] Default service account used by VMs running in this project. |
| `creationTimestamp` | `string \| null` | No | \[Output Only] Creation timestamp inRFC3339 text format. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#project for projects. |
| `description` | `string \| null` | No | An optional textual description of the resource. |
| `name` | `string \| null` | No | The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine. |

> [accordion] usageExportLocation full type
>
> ```ts theme={null}
> {
>   reportNamePrefix?: string | null,
>   bucketName?: string | null
> } | null
> ```

> [accordion] quotas full type
>
> ```ts theme={null}
> {
>   owner?: string | null,
>   metric?: string | null,
>   usage?: number | null,
>   limit?: number | null
> }[] | null
> ```

> [accordion] commonInstanceMetadata full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   items?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   fingerprint?: string | null
> } | null
> ```

***

### projects.getXpnHost

`compute.projects.getXpnHost`

Gets the shared VPC host project that this project links to. May be empty if no link exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.getXpnHost({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `usageExportLocation` | `object \| null` | No | The location in Cloud Storage and naming method of the daily usage report. Contains bucket\_name and report\_name prefix. |
| `enabledFeatures` | `string[] \| null` | No | An optional list of restricted features enabled for use on this project. |
| `quotas` | `object[] \| null` | No | \[Output Only] Quotas assigned to this project. |
| `cloudArmorTier` | `string \| null` | No | Output only. \[Output Only] The Cloud Armor tier for this project. It can be one of the following values: CA\_STANDARD,CA\_ENTERPRISE\_PAYGO. If this field is not specified, it is assumed to beCA\_STANDARD. |
| `defaultNetworkTier` | `string \| null` | No | This signifies the default network tier used for configuring resources of the project and can only take the following values:PREMIUM, STANDARD. Initially the default network tier is PREMIUM. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is *not* the project ID, and is just a unique ID used by Compute Engine to identify resources. |
| `commonInstanceMetadata` | `object \| null` | No | A metadata key/value entry. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `xpnProjectStatus` | `string \| null` | No | \[Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated. |
| `vmDnsSetting` | `string \| null` | No | Output only. \[Output Only] Default internal DNS setting used by VMs running in this project. |
| `defaultServiceAccount` | `string \| null` | No | \[Output Only] Default service account used by VMs running in this project. |
| `creationTimestamp` | `string \| null` | No | \[Output Only] Creation timestamp inRFC3339 text format. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#project for projects. |
| `description` | `string \| null` | No | An optional textual description of the resource. |
| `name` | `string \| null` | No | The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine. |

> [accordion] usageExportLocation full type
>
> ```ts theme={null}
> {
>   reportNamePrefix?: string | null,
>   bucketName?: string | null
> } | null
> ```

> [accordion] quotas full type
>
> ```ts theme={null}
> {
>   owner?: string | null,
>   metric?: string | null,
>   usage?: number | null,
>   limit?: number | null
> }[] | null
> ```

> [accordion] commonInstanceMetadata full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   items?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   fingerprint?: string | null
> } | null
> ```

***

### projects.getXpnResources

`compute.projects.getXpnResources`

Gets service resources (a.k.a service project) associated with this host project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.getXpnResources({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `maxResults` | `number` | No | 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`) |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Output only. \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#projectsGetXpnResources for lists of service resources (a.k.a service projects) |
| `resources` | `object[] \| null` | No | Service resources (a.k.a service projects) attached to this project as their shared VPC host. |

> [accordion] resources full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   id?: string | null
> }[] | null
> ```

***

### projects.listXpnHosts

`compute.projects.listXpnHosts`

Lists all shared VPC host projects visible to the user in an organization

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.listXpnHosts({ project: 'demo-project', organization: '123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `maxResults` | `number` | No | 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`) |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `organization` | `string` | No | Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `items` | `object[] \| null` | No | \[Output Only] A list of shared VPC host project URLs. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   usageExportLocation?: {
>     reportNamePrefix?: string | null,
>     bucketName?: string | null
>   } | null,
>   enabledFeatures?: string[] | null,
>   quotas?: {
>     owner?: string | null,
>     metric?: string | null,
>     usage?: number | null,
>     limit?: number | null
>   }[] | null,
>   cloudArmorTier?: string | null,
>   defaultNetworkTier?: string | null,
>   id?: string | number | null,
>   commonInstanceMetadata?: {
>     kind?: string | null,
>     items?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     fingerprint?: string | null
>   } | null,
>   selfLink?: string | null,
>   xpnProjectStatus?: string | null,
>   vmDnsSetting?: string | null,
>   defaultServiceAccount?: string | null,
>   creationTimestamp?: string | null,
>   kind?: string | null,
>   description?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### projects.moveDisk

`compute.projects.moveDisk`

Moves a persistent disk from one zone to another. *Note*: The moveDisk API will be deprecated on September 29, 2026. Starting September 29, 2025, you can't use the moveDisk API on new projects

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.moveDisk({ project: 'demo-project', targetDisk: 'projects/demo-project/zones/us-central1-a/disks/web-1', destinationZone: 'projects/demo-project/zones/us-central1-b' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `destinationZone` | `string` | No | The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone](https://www.googleapis.com/compute/v1/projects/project/zones/zone) - projects/project/zones/zone - zones/zone |
| `targetDisk` | `string` | No | The URL of the target disk to move. This can be a full or partial URL. For example, the following are all valid URLs to a disk: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk](https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk) - projects/project/zones/zone/disks/disk - zones/zone/disks/disk |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.moveInstance

`compute.projects.moveInstance`

Moves an instance and its attached persistent disks from one zone to another. *Note*: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. \[Deprecated] This method is deprecated

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.moveInstance({ project: 'demo-project', targetInstance: 'projects/demo-project/zones/us-central1-a/instances/web-1', destinationZone: 'projects/demo-project/zones/us-central1-b' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `destinationZone` | `string` | No | The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone](https://www.googleapis.com/compute/v1/projects/project/zones/zone) - projects/project/zones/zone - zones/zone |
| `targetInstance` | `string` | No | The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance) - projects/project/zones/zone/instances/instance - zones/zone/instances/instance |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.setCloudArmorTier

`compute.projects.setCloudArmorTier`

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.setCloudArmorTier({ project: 'demo-project', cloudArmorTier: 'CA_STANDARD' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `cloudArmorTier` | `CA_ENTERPRISE_ANNUAL \| CA_ENTERPRISE_PAYGO \| CA_STANDARD` | No | Managed protection tier to be set. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.setCommonInstanceMetadata

`compute.projects.setCommonInstanceMetadata`

Sets metadata common to all instances within the specified project using the data included in the request

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.setCommonInstanceMetadata({
	project: 'demo-project',
	fingerprint: '42WmSpB8rSM=',
	items: [{ key: 'enable-oslogin', value: 'TRUE' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `items` | `object[]` | No | Array of key/value pairs. The total size of all keys and values must be less than 512 KB. |
| `fingerprint` | `string` | No | Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource. (base64) |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   key?: string,
>   value?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.setDefaultNetworkTier

`compute.projects.setDefaultNetworkTier`

Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.setDefaultNetworkTier({ project: 'demo-project', networkTier: 'PREMIUM' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `networkTier` | `FIXED_STANDARD \| PREMIUM \| STANDARD \| STANDARD_OVERRIDES_FIXED_STANDARD` | No | Default network tier to be set. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### projects.setUsageExportBucket

`compute.projects.setUsageExportBucket`

Enables the usage export feature and sets theusage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.projects.setUsageExportBucket({ project: 'demo-project', bucketName: 'demo-bucket', reportNamePrefix: 'usage' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `reportNamePrefix` | `string` | No | An optional prefix for the name of the usage report object stored inbucketName. If not supplied, defaults tousage\_gce. The report is stored as a CSV file namedreport\_name\_prefix\_gce\_YYYYMMDD.csv whereYYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storageobject naming conventions. |
| `bucketName` | `string` | No | The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such asexample-bucket, or the bucket name with gs\:// or [https://storage.googleapis.com/](https://storage.googleapis.com/) in front of it, such as gs\://example-bucket. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### regionOperations.delete

`compute.regionOperations.delete`

Deletes the specified region-specific Operations resource

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.regionOperations.delete({ operation: 'operation-123', region: 'us-central1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `string` | Yes | Name of the Operations resource to delete, or its unique numeric identifier. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### regionOperations.get

`compute.regionOperations.get`

Retrieves the specified region-specific Operations resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.regionOperations.get({ operation: 'operation-123', region: 'us-central1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `string` | Yes | Name of the Operations resource to return, or its unique numeric identifier. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### regionOperations.list

`compute.regionOperations.list`

Retrieves a list of Operation resources contained within the specified region (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.regionOperations.list({ region: 'us-central1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `maxResults` | `number` | No | 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`) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | \[Output Only] A list of Operation resources. |
| `id` | `string \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than `maxResults`, use the `nextPageToken` as a value for the query parameter `pageToken` in the next list request. Subsequent list requests will have their own `nextPageToken` to continue paging through the results. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for this resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always `compute#operations` for Operations resource. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   operationType?: string | null,
>   operationGroupId?: string | null,
>   getHealthOperationMetadata?: {
>     healthInfo?: {
>       healthStatus?: string | null,
>       unhealthyReason?: string | null,
>       availabilitySloStatus?: string | null,
>       repairCategory?: string | null,
>       updateTime?: string | null
>     } | null
>   } | null,
>   kind?: string | null,
>   status?: string | null,
>   id?: string | number | null,
>   getVersionOperationMetadata?: {
>     inlineSbomInfo?: {
>       targetComponentVersions?: Record<string, string> | null,
>       currentComponentVersions?: Record<string, string> | null
>     } | null
>   } | null,
>   zone?: string | null,
>   httpErrorMessage?: string | null,
>   error?: {
>     errors?: {
>       location?: string | null,
>       code?: string | null,
>       message?: string | null,
>       errorDetails?: {
>         errorInfo?: {
>           domain?: string | null,
>           metadatas?: Record<string, string> | null,
>           reason?: string | null
>         } | null,
>         localizedMessage?: {
>           locale?: string | null,
>           message?: string | null
>         } | null,
>         help?: {
>           links?: {
>             description?: string | null,
>             url?: string | null
>           }[] | null
>         } | null,
>         quotaInfo?: {
>           rolloutStatus?: string | null,
>           dimensions?: Record<string, string> | null,
>           limit?: number | null,
>           metricName?: string | null,
>           futureLimit?: number | null,
>           limitName?: string | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   setCommonInstanceMetadataOperationMetadata?: {
>     clientOperationId?: string | null,
>     perLocationOperations?: Record<string, {
>       state?: string | null,
>       error?: {
>         code?: number | null,
>         message?: string | null,
>         details?: Record<string, any>[] | null
>       } | null
>     }> | null
>   } | null,
>   warnings?: {
>     message?: string | null,
>     code?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null
>   }[] | null,
>   endTime?: string | null,
>   name?: string | null,
>   statusMessage?: string | null,
>   insertTime?: string | null,
>   targetId?: string | number | null,
>   targetLink?: string | null,
>   region?: string | null,
>   user?: string | null,
>   httpErrorStatusCode?: number | null,
>   creationTimestamp?: string | null,
>   progress?: number | null,
>   startTime?: string | null,
>   description?: string | null,
>   instancesBulkInsertOperationMetadata?: {
>     perLocationStatus?: Record<string, {
>       createdVmCount?: number | null,
>       deletedVmCount?: number | null,
>       failedToCreateVmCount?: number | null,
>       targetVmCount?: number | null,
>       status?: string | null
>     }> | null
>   } | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

***

### regionOperations.wait

`compute.regionOperations.wait`

Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.regionOperations.wait({ region: 'us-central1', project: 'demo-project', operation: 'operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `operation` | `string` | Yes | Name of the Operations resource to return, or its unique numeric identifier. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### regions.get

`compute.regions.get`

Returns the specified Region resource: its zones, quotas and status

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.regions.get({ project: 'demo-project', region: 'us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | Name of the region resource to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `status` | `string \| null` | No | \[Output Only] Status of the region, either UP orDOWN. |
| `zones` | `string[] \| null` | No | \[Output Only] A list of zones available in this region, in the form of resource URLs. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `quotas` | `object[] \| null` | No | \[Output Only] Quotas assigned to this region. |
| `supportsPzs` | `boolean \| null` | No | Output only. \[Output Only] Reserved for future use. |
| `name` | `string \| null` | No | \[Output Only] Name of the resource. |
| `deprecated` | `object \| null` | No | Deprecation status for a public resource. |
| `creationTimestamp` | `string \| null` | No | \[Output Only] Creation timestamp inRFC3339 text format. |
| `quotaStatusWarning` | `object \| null` | No | Output only. \[Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails. |
| `description` | `string \| null` | No | \[Output Only] Textual description of the resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#region for regions. |

> [accordion] quotas full type
>
> ```ts theme={null}
> {
>   owner?: string | null,
>   metric?: string | null,
>   usage?: number | null,
>   limit?: number | null
> }[] | null
> ```

> [accordion] deprecated full type
>
> ```ts theme={null}
> {
>   replacement?: string | null,
>   state?: string | null,
>   deleted?: string | null,
>   deprecated?: string | null,
>   obsolete?: string | null
> } | null
> ```

> [accordion] quotaStatusWarning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

***

### regions.list

`compute.regions.list`

Retrieves the list of region resources available to the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.regions.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `maxResults` | `number` | No | 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`) |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#regionList for lists of regions. |
| `items` | `object[] \| null` | No | A list of Region resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   status?: string | null,
>   zones?: string[] | null,
>   selfLink?: string | null,
>   quotas?: {
>     owner?: string | null,
>     metric?: string | null,
>     usage?: number | null,
>     limit?: number | null
>   }[] | null,
>   supportsPzs?: boolean | null,
>   name?: string | null,
>   deprecated?: {
>     replacement?: string | null,
>     state?: string | null,
>     deleted?: string | null,
>     deprecated?: string | null,
>     obsolete?: string | null
>   } | null,
>   creationTimestamp?: string | null,
>   quotaStatusWarning?: {
>     message?: string | null,
>     code?: string | null,
>     data?: {
>       value?: string | null,
>       key?: string | null
>     }[] | null
>   } | null,
>   description?: string | null,
>   kind?: string | null
> }[] | null
> ```

***

### resourcePolicies.aggregatedList

`compute.resourcePolicies.aggregatedList`

Retrieves an aggregated list of resource policies. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.resourcePolicies.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `maxResults` | `number` | No | 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`) |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `items` | `object \| null` | No | A list of ResourcePolicy resources. |
| `etag` | `string \| null` | No | — |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `kind` | `string \| null` | No | Output only. Type of resource. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   code?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   warning?: {
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     code?: string | null,
>     message?: string | null
>   } | null,
>   resourcePolicies?: {
>     selfLink?: string | null,
>     instanceSchedulePolicy?: {
>       startTime?: string | null,
>       vmStopSchedule?: {
>         schedule?: string | null
>       } | null,
>       expirationTime?: string | null,
>       timeZone?: string | null,
>       vmStartSchedule?: {
>         schedule?: string | null
>       } | null
>     } | null,
>     id?: string | number | null,
>     description?: string | null,
>     status?: string | null,
>     workloadPolicy?: {
>       acceleratorTopology?: string | null,
>       type?: string | null,
>       acceleratorTopologyMode?: string | null,
>       maxTopologyDistance?: string | null
>     } | null,
>     region?: string | null,
>     kind?: string | null,
>     resourceStatus?: {
>       instanceSchedulePolicy?: {
>         nextRunStartTime?: string | null,
>         lastRunStartTime?: string | null
>       } | null
>     } | null,
>     snapshotSchedulePolicy?: {
>       retentionPolicy?: {
>         maxRetentionDays?: number | null,
>         onSourceDiskDelete?: string | null
>       } | null,
>       snapshotProperties?: {
>         storageLocations?: string[] | null,
>         guestFlush?: boolean | null,
>         chainName?: string | null,
>         labels?: Record<string, string> | null
>       } | null,
>       schedule?: {
>         dailySchedule?: {
>           duration?: string | null,
>           daysInCycle?: number | null,
>           startTime?: string | null
>         } | null,
>         hourlySchedule?: {
>           duration?: string | null,
>           hoursInCycle?: number | null,
>           startTime?: string | null
>         } | null,
>         weeklySchedule?: {
>           dayOfWeeks?: {
>             startTime?: string | null,
>             duration?: string | null,
>             day?: string | null
>           }[] | null
>         } | null
>       } | null
>     } | null,
>     name?: string | null,
>     diskConsistencyGroupPolicy?: {
>     } | null,
>     groupPlacementPolicy?: {
>       acceleratorTopologyMode?: string | null,
>       vmCount?: number | null,
>       collocation?: string | null,
>       availabilityDomainCount?: number | null,
>       gpuTopology?: string | null
>     } | null,
>     creationTimestamp?: string | null
>   }[] | null
> }> | null
> ```

***

### resourcePolicies.delete

`compute.resourcePolicies.delete`

Deletes the specified resource policy

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.resourcePolicies.delete({ region: 'us-central1', resourcePolicy: 'daily-snapshots', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resourcePolicy` | `string` | Yes | Name of the resource policy to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### resourcePolicies.get

`compute.resourcePolicies.get`

Retrieves all information of the specified resource policy

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.resourcePolicies.get({ project: 'demo-project', region: 'us-central1', resourcePolicy: 'daily-snapshots' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resourcePolicy` | `string` | Yes | Name of the resource policy to retrieve. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined fully-qualified URL for this resource. |
| `instanceSchedulePolicy` | `object \| null` | No | An InstanceSchedulePolicy specifies when and how frequent certain operations are performed on the instance. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `description` | `string \| null` | No | — |
| `status` | `string \| null` | No | Output only. \[Output Only] The status of resource policy creation. |
| `workloadPolicy` | `object \| null` | No | Represents the workload policy. |
| `region` | `string \| null` | No | — |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Alwayscompute#resource\_policies for resource policies. |
| `resourceStatus` | `object \| null` | No | Contains output only fields. Use this sub-message for all output fields set on ResourcePolicy. The internal structure of this "status" field should mimic the structure of ResourcePolicy proto specification. |
| `snapshotSchedulePolicy` | `object \| null` | No | A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained. |
| `name` | `string \| null` | No | 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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `diskConsistencyGroupPolicy` | `object \| null` | No | Resource policy for disk consistency groups. |
| `groupPlacementPolicy` | `object \| null` | No | A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |

> [accordion] instanceSchedulePolicy full type
>
> ```ts theme={null}
> {
>   startTime?: string | null,
>   vmStopSchedule?: {
>     schedule?: string | null
>   } | null,
>   expirationTime?: string | null,
>   timeZone?: string | null,
>   vmStartSchedule?: {
>     schedule?: string | null
>   } | null
> } | null
> ```

> [accordion] workloadPolicy full type
>
> ```ts theme={null}
> {
>   acceleratorTopology?: string | null,
>   type?: string | null,
>   acceleratorTopologyMode?: string | null,
>   maxTopologyDistance?: string | null
> } | null
> ```

> [accordion] resourceStatus full type
>
> ```ts theme={null}
> {
>   instanceSchedulePolicy?: {
>     nextRunStartTime?: string | null,
>     lastRunStartTime?: string | null
>   } | null
> } | null
> ```

> [accordion] snapshotSchedulePolicy full type
>
> ```ts theme={null}
> {
>   retentionPolicy?: {
>     maxRetentionDays?: number | null,
>     onSourceDiskDelete?: string | null
>   } | null,
>   snapshotProperties?: {
>     storageLocations?: string[] | null,
>     guestFlush?: boolean | null,
>     chainName?: string | null,
>     labels?: Record<string, string> | null
>   } | null,
>   schedule?: {
>     dailySchedule?: {
>       duration?: string | null,
>       daysInCycle?: number | null,
>       startTime?: string | null
>     } | null,
>     hourlySchedule?: {
>       duration?: string | null,
>       hoursInCycle?: number | null,
>       startTime?: string | null
>     } | null,
>     weeklySchedule?: {
>       dayOfWeeks?: {
>         startTime?: string | null,
>         duration?: string | null,
>         day?: string | null
>       }[] | null
>     } | null
>   } | null
> } | null
> ```

> [accordion] diskConsistencyGroupPolicy full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] groupPlacementPolicy full type
>
> ```ts theme={null}
> {
>   acceleratorTopologyMode?: string | null,
>   vmCount?: number | null,
>   collocation?: string | null,
>   availabilityDomainCount?: number | null,
>   gpuTopology?: string | null
> } | null
> ```

***

### resourcePolicies.getIamPolicy

`compute.resourcePolicies.getIamPolicy`

Gets the access control policy for a resource. May be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.resourcePolicies.getIamPolicy({ resource: 'daily-snapshots', project: 'demo-project', region: 'us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `optionsRequestedPolicyVersion` | `number` | No | Requested IAM Policy version. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | The name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### resourcePolicies.insert

`compute.resourcePolicies.insert`

Creates a new resource policy

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.resourcePolicies.insert({
	project: 'demo-project',
	region: 'us-central1',
	name: 'daily-snapshots',
	snapshotSchedulePolicy: {
		schedule: {
			dailySchedule: { daysInCycle: 1, startTime: '04:00' },
		},
		retentionPolicy: { maxRetentionDays: 14 },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `instanceSchedulePolicy` | `object` | No | An InstanceSchedulePolicy specifies when and how frequent certain operations are performed on the instance. |
| `description` | `string` | No | — |
| `workloadPolicy` | `object` | No | Represents the workload policy. |
| `snapshotSchedulePolicy` | `object` | No | A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained. |
| `name` | `string` | No | 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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `diskConsistencyGroupPolicy` | `object` | No | Resource policy for disk consistency groups. |
| `groupPlacementPolicy` | `object` | No | A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation |

> [accordion] instanceSchedulePolicy full type
>
> ```ts theme={null}
> {
>   startTime?: string,
>   vmStopSchedule?: {
>     schedule?: string
>   },
>   expirationTime?: string,
>   timeZone?: string,
>   vmStartSchedule?: {
>     schedule?: string
>   }
> }
> ```

> [accordion] workloadPolicy full type
>
> ```ts theme={null}
> {
>   acceleratorTopology?: string,
>   type?: HIGH_AVAILABILITY | HIGH_THROUGHPUT,
>   acceleratorTopologyMode?: AUTO_CONNECT | PROVISION_ONLY,
>   maxTopologyDistance?: BLOCK | CLUSTER | SUBBLOCK
> }
> ```

> [accordion] snapshotSchedulePolicy full type
>
> ```ts theme={null}
> {
>   retentionPolicy?: {
>     maxRetentionDays?: number,
>     onSourceDiskDelete?: APPLY_RETENTION_POLICY | KEEP_AUTO_SNAPSHOTS | UNSPECIFIED_ON_SOURCE_DISK_DELETE
>   },
>   snapshotProperties?: {
>     storageLocations?: string[],
>     guestFlush?: boolean,
>     chainName?: string,
>     labels?: Record<string, string>
>   },
>   schedule?: {
>     dailySchedule?: {
>       daysInCycle?: number,
>       startTime?: string
>     },
>     hourlySchedule?: {
>       hoursInCycle?: number,
>       startTime?: string
>     },
>     weeklySchedule?: {
>       dayOfWeeks?: {
>         startTime?: string,
>         day?: FRIDAY | INVALID | MONDAY | SATURDAY | SUNDAY | THURSDAY | TUESDAY | WEDNESDAY
>       }[]
>     }
>   }
> }
> ```

> [accordion] diskConsistencyGroupPolicy full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] groupPlacementPolicy full type
>
> ```ts theme={null}
> {
>   acceleratorTopologyMode?: AUTO_CONNECT | PROVISION_ONLY,
>   vmCount?: number,
>   collocation?: COLLOCATED | UNSPECIFIED_COLLOCATION,
>   availabilityDomainCount?: number,
>   gpuTopology?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### resourcePolicies.list

`compute.resourcePolicies.list`

A list all the resource policies that have been configured for the specified project in specified region (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.resourcePolicies.list({ region: 'us-central1', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `maxResults` | `number` | No | 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`) |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource.Alwayscompute#resourcePoliciesList for listsof resourcePolicies |
| `id` | `string \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `etag` | `string \| null` | No | — |
| `items` | `object[] \| null` | No | \[Output Only] A list of ResourcePolicy resources. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   selfLink?: string | null,
>   instanceSchedulePolicy?: {
>     startTime?: string | null,
>     vmStopSchedule?: {
>       schedule?: string | null
>     } | null,
>     expirationTime?: string | null,
>     timeZone?: string | null,
>     vmStartSchedule?: {
>       schedule?: string | null
>     } | null
>   } | null,
>   id?: string | number | null,
>   description?: string | null,
>   status?: string | null,
>   workloadPolicy?: {
>     acceleratorTopology?: string | null,
>     type?: string | null,
>     acceleratorTopologyMode?: string | null,
>     maxTopologyDistance?: string | null
>   } | null,
>   region?: string | null,
>   kind?: string | null,
>   resourceStatus?: {
>     instanceSchedulePolicy?: {
>       nextRunStartTime?: string | null,
>       lastRunStartTime?: string | null
>     } | null
>   } | null,
>   snapshotSchedulePolicy?: {
>     retentionPolicy?: {
>       maxRetentionDays?: number | null,
>       onSourceDiskDelete?: string | null
>     } | null,
>     snapshotProperties?: {
>       storageLocations?: string[] | null,
>       guestFlush?: boolean | null,
>       chainName?: string | null,
>       labels?: Record<string, string> | null
>     } | null,
>     schedule?: {
>       dailySchedule?: {
>         duration?: string | null,
>         daysInCycle?: number | null,
>         startTime?: string | null
>       } | null,
>       hourlySchedule?: {
>         duration?: string | null,
>         hoursInCycle?: number | null,
>         startTime?: string | null
>       } | null,
>       weeklySchedule?: {
>         dayOfWeeks?: {
>           startTime?: string | null,
>           duration?: string | null,
>           day?: string | null
>         }[] | null
>       } | null
>     } | null
>   } | null,
>   name?: string | null,
>   diskConsistencyGroupPolicy?: {
>   } | null,
>   groupPlacementPolicy?: {
>     acceleratorTopologyMode?: string | null,
>     vmCount?: number | null,
>     collocation?: string | null,
>     availabilityDomainCount?: number | null,
>     gpuTopology?: string | null
>   } | null,
>   creationTimestamp?: string | null
> }[] | null
> ```

***

### resourcePolicies.patch

`compute.resourcePolicies.patch`

Modify the specified resource policy

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.resourcePolicies.patch({
	region: 'us-central1',
	project: 'demo-project',
	resourcePolicy: 'daily-snapshots',
	description: 'Managed by Corsair',
	updateMask: 'description',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | update\_mask indicates fields to be updated as part of this request. |
| `region` | `string` | Yes | Name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resourcePolicy` | `string` | Yes | Id of the resource policy to patch. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `instanceSchedulePolicy` | `object` | No | An InstanceSchedulePolicy specifies when and how frequent certain operations are performed on the instance. |
| `description` | `string` | No | — |
| `workloadPolicy` | `object` | No | Represents the workload policy. |
| `snapshotSchedulePolicy` | `object` | No | A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained. |
| `name` | `string` | No | 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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `diskConsistencyGroupPolicy` | `object` | No | Resource policy for disk consistency groups. |
| `groupPlacementPolicy` | `object` | No | A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation |

> [accordion] instanceSchedulePolicy full type
>
> ```ts theme={null}
> {
>   startTime?: string,
>   vmStopSchedule?: {
>     schedule?: string
>   },
>   expirationTime?: string,
>   timeZone?: string,
>   vmStartSchedule?: {
>     schedule?: string
>   }
> }
> ```

> [accordion] workloadPolicy full type
>
> ```ts theme={null}
> {
>   acceleratorTopology?: string,
>   type?: HIGH_AVAILABILITY | HIGH_THROUGHPUT,
>   acceleratorTopologyMode?: AUTO_CONNECT | PROVISION_ONLY,
>   maxTopologyDistance?: BLOCK | CLUSTER | SUBBLOCK
> }
> ```

> [accordion] snapshotSchedulePolicy full type
>
> ```ts theme={null}
> {
>   retentionPolicy?: {
>     maxRetentionDays?: number,
>     onSourceDiskDelete?: APPLY_RETENTION_POLICY | KEEP_AUTO_SNAPSHOTS | UNSPECIFIED_ON_SOURCE_DISK_DELETE
>   },
>   snapshotProperties?: {
>     storageLocations?: string[],
>     guestFlush?: boolean,
>     chainName?: string,
>     labels?: Record<string, string>
>   },
>   schedule?: {
>     dailySchedule?: {
>       daysInCycle?: number,
>       startTime?: string
>     },
>     hourlySchedule?: {
>       hoursInCycle?: number,
>       startTime?: string
>     },
>     weeklySchedule?: {
>       dayOfWeeks?: {
>         startTime?: string,
>         day?: FRIDAY | INVALID | MONDAY | SATURDAY | SUNDAY | THURSDAY | TUESDAY | WEDNESDAY
>       }[]
>     }
>   }
> }
> ```

> [accordion] diskConsistencyGroupPolicy full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] groupPlacementPolicy full type
>
> ```ts theme={null}
> {
>   acceleratorTopologyMode?: AUTO_CONNECT | PROVISION_ONLY,
>   vmCount?: number,
>   collocation?: COLLOCATED | UNSPECIFIED_COLLOCATION,
>   availabilityDomainCount?: number,
>   gpuTopology?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### resourcePolicies.setIamPolicy

`compute.resourcePolicies.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.resourcePolicies.setIamPolicy({
	project: 'demo-project',
	region: 'us-central1',
	resource: 'daily-snapshots',
	policy: {
		bindings: [{
			role: 'roles/compute.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | The name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `etag` | `string` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. (base64) |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `bindings` | `object[]` | No | Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: ADMIN_READ | DATA_READ | DATA_WRITE | LOG_TYPE_UNSPECIFIED,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   bindings?: {
>     role?: string,
>     members?: string[],
>     condition?: {
>       title?: string,
>       description?: string,
>       expression?: string,
>       location?: string
>     }
>   }[],
>   etag?: string
> }
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string,
>   members?: string[],
>   condition?: {
>     title?: string,
>     description?: string,
>     expression?: string,
>     location?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### resourcePolicies.testIamPermissions

`compute.resourcePolicies.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.resourcePolicies.testIamPermissions({
	region: 'us-central1',
	resource: 'daily-snapshots',
	project: 'demo-project',
	permissions: ['compute.resourcePolicies.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | The name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### routes.delete

`compute.routes.delete`

Deletes the specified Route resource

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.routes.delete({ route: 'default-route', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `route` | `string` | Yes | Name of the Route resource to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### routes.get

`compute.routes.get`

Returns the specified Route resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.routes.get({ route: 'default-route', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `route` | `string` | Yes | Name of the Route resource to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextHopIp` | `string \| null` | No | The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. |
| `routeStatus` | `string \| null` | No | \[Output only] The status of the route. This status applies to dynamic routes learned by Cloud Routers. It is also applicable to routes undergoing migration. |
| `name` | `string \| null` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `warnings` | `object[] \| null` | No | Output only. \[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
| `priority` | `number \| null` | No | The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive. |
| `tags` | `string[] \| null` | No | A list of instance tags to which this route applies. |
| `asPaths` | `object[] \| null` | No | Output only. \[Output Only] AS path. |
| `routeType` | `string \| null` | No | Output only. \[Output Only] The type of this route, which can be one of the following values: - 'TRANSIT' for a transit route that this router learned from another Cloud Router and will readvertise to one of its BGP peers - 'SUBNET' for a route from a subnet of the VPC - 'BGP' for a route learned from a BGP peer of this router - 'STATIC' for a static route |
| `nextHopInterconnectAttachment` | `string \| null` | No | Output only. \[Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for dynamic routes generated by Cloud Router with a linked interconnectAttachment or the static route generated by each L2 Interconnect Attachment. |
| `nextHopVpnTunnel` | `string \| null` | No | The URL to a VpnTunnel that should handle matching packets. |
| `nextHopNetwork` | `string \| null` | No | The URL of the local network if it should handle matching packets. |
| `params` | `object \| null` | No | Additional route parameters. |
| `nextHopInterRegionCost` | `number \| null` | No | Output only. \[Output only] Internal fixed region-to-region cost that Google Cloud calculates based on factors such as network performance, distance, and available bandwidth between regions. |
| `nextHopInstance` | `string \| null` | No | The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/) |
| `nextHopHub` | `string \| null` | No | Output only. \[Output Only] The full resource name of the Network Connectivity Center hub that will handle matching packets. |
| `nextHopGateway` | `string \| null` | No | The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway |
| `nextHopMed` | `number \| null` | No | Output only. \[Output Only] Multi-Exit Discriminator, a BGP route metric that indicates the desirability of a particular route in a network. |
| `nextHopPeering` | `string \| null` | No | Output only. \[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined fully-qualified URL for this resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of this resource. Always compute#routes for Route resources. |
| `description` | `string \| null` | No | An optional description of this resource. Provide this field when you create the resource. |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `network` | `string \| null` | No | Fully-qualified URL of the network that this route applies to. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `nextHopOrigin` | `string \| null` | No | Output only. \[Output Only] Indicates the origin of the route. Can be IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or INCOMPLETE. |
| `nextHopIlb` | `string \| null` | No | The URL to a forwarding rule of typeloadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs: - [https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule](https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule) - regions/region/forwardingRules/forwardingRule If an IP address is provided, must specify an IPv4 address in dot-decimal notation or an IPv6 address in RFC 4291 format. |
| `destRange` | `string \| null` | No | The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952 compressed format. |

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   code?: string | null
> }[] | null
> ```

> [accordion] asPaths full type
>
> ```ts theme={null}
> {
>   asLists?: number[] | null,
>   pathSegmentType?: string | null
> }[] | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null
> } | null
> ```

***

### routes.insert

`compute.routes.insert`

Creates a Route resource in the specified project using the data included in the request

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.routes.insert({
	project: 'demo-project',
	name: 'to-vpn',
	network: 'projects/demo-project/global/networks/default',
	destRange: '10.200.0.0/16',
	nextHopInstance: 'projects/demo-project/zones/us-central1-a/instances/web-1',
	priority: 1000,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `nextHopIp` | `string` | No | The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. |
| `routeStatus` | `ACTIVE \| DROPPED \| INACTIVE \| PENDING` | No | \[Output only] The status of the route. This status applies to dynamic routes learned by Cloud Routers. It is also applicable to routes undergoing migration. |
| `name` | `string` | No | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. |
| `priority` | `number` | No | The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive. |
| `tags` | `string[]` | No | A list of instance tags to which this route applies. |
| `nextHopVpnTunnel` | `string` | No | The URL to a VpnTunnel that should handle matching packets. |
| `nextHopNetwork` | `string` | No | The URL of the local network if it should handle matching packets. |
| `params` | `object` | No | Additional route parameters. |
| `nextHopInstance` | `string` | No | The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/) |
| `nextHopGateway` | `string` | No | The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway |
| `selfLink` | `string` | No | \[Output Only] Server-defined fully-qualified URL for this resource. |
| `description` | `string` | No | An optional description of this resource. Provide this field when you create the resource. |
| `network` | `string` | No | Fully-qualified URL of the network that this route applies to. |
| `nextHopIlb` | `string` | No | The URL to a forwarding rule of typeloadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs: - [https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule](https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule) - regions/region/forwardingRules/forwardingRule If an IP address is provided, must specify an IPv4 address in dot-decimal notation or an IPv6 address in RFC 4291 format. |
| `destRange` | `string` | No | The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952 compressed format. |

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### routes.list

`compute.routes.list`

Retrieves the list of Route resources available to the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.routes.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `maxResults` | `number` | No | 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`) |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | A list of Route resources. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `kind` | `string \| null` | No | Output only. Type of resource. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   nextHopIp?: string | null,
>   routeStatus?: string | null,
>   name?: string | null,
>   warnings?: {
>     message?: string | null,
>     data?: {
>       value?: string | null,
>       key?: string | null
>     }[] | null,
>     code?: string | null
>   }[] | null,
>   priority?: number | null,
>   tags?: string[] | null,
>   asPaths?: {
>     asLists?: number[] | null,
>     pathSegmentType?: string | null
>   }[] | null,
>   routeType?: string | null,
>   nextHopInterconnectAttachment?: string | null,
>   nextHopVpnTunnel?: string | null,
>   nextHopNetwork?: string | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   nextHopInterRegionCost?: number | null,
>   nextHopInstance?: string | null,
>   nextHopHub?: string | null,
>   nextHopGateway?: string | null,
>   nextHopMed?: number | null,
>   nextHopPeering?: string | null,
>   selfLink?: string | null,
>   kind?: string | null,
>   description?: string | null,
>   creationTimestamp?: string | null,
>   network?: string | null,
>   id?: string | number | null,
>   nextHopOrigin?: string | null,
>   nextHopIlb?: string | null,
>   destRange?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

***

### routes.testIamPermissions

`compute.routes.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.routes.testIamPermissions({
	project: 'demo-project',
	resource: 'default-route',
	permissions: ['compute.routes.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### snapshots.delete

`compute.snapshots.delete`

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.snapshots.delete({ snapshot: 'web-1-snap', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `snapshot` | `string` | Yes | Name of the Snapshot resource to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### snapshots.get

`compute.snapshots.get`

Returns the specified Snapshot resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.snapshots.get({ project: 'demo-project', snapshot: 'web-1-snap' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `snapshot` | `string` | Yes | Name of the Snapshot resource to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sourceDisk` | `string \| null` | No | The source disk used to create this snapshot. |
| `region` | `string \| null` | No | Output only. \[Output Only] URL of the region where the snapshot resides. Only applicable for regional snapshots. |
| `sourceSnapshotSchedulePolicyId` | `string \| null` | No | Output only. \[Output Only] ID of the resource policy which created this scheduled snapshot. |
| `sourceDiskEncryptionKey` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for the resource. |
| `labelFingerprint` | `string \| null` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a snapshot. (base64) |
| `sourceDiskForRecoveryCheckpoint` | `string \| null` | No | The source disk whose recovery checkpoint will be used to create this snapshot. |
| `sourceDiskId` | `string \| null` | No | Output only. \[Output Only] 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. |
| `sourceInstantSnapshotId` | `string \| null` | No | Output only. \[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this snapshot. For example, if you created the snapshot from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used. |
| `locationHint` | `string \| null` | No | An opaque location hint used to place the snapshot close to other resources. This field is for use by internal tools that use the public API. |
| `name` | `string \| null` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `snapshotEncryptionKey` | `object \| null` | No | — |
| `storageLocations` | `string[] \| null` | No | Cloud Storage bucket storage location of the snapshot (regional or multi-regional). |
| `licenses` | `string[] \| null` | No | Output only. \[Output Only] 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). |
| `autoCreated` | `boolean \| null` | No | Output only. \[Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk. |
| `architecture` | `string \| null` | No | Output only. \[Output Only] The architecture of the snapshot. Valid values are ARM64 or X86\_64. |
| `params` | `object \| null` | No | Additional snapshot params. |
| `downloadBytes` | `string \| number \| null` | No | Output only. \[Output Only] Number of bytes downloaded to restore a snapshot to a disk. |
| `storageBytesStatus` | `string \| null` | No | Output only. \[Deprecated] Instead, check the storageBytes field. After snapshot creation, the storageBytesStatus field is alwaysUP\_TO\_DATE. \[Output Only] 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 unset, meaning the snapshot is being created, or UP\_TO\_DATE, meaning the size of the snapshot is up-to-date. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. Reserved for future use. |
| `storageBytes` | `string \| number \| null` | No | Output only. \[Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion. |
| `chainName` | `string \| null` | No | Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for advanced service owners who needs to create separate snapshot chains, for example, for chargeback tracking. When you describe your snapshot resource, this field is visible only if it has a non-empty value. |
| `guestFlush` | `boolean \| null` | No | \[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. |
| `diskSizeGb` | `string \| number \| null` | No | Output only. \[Output Only] Size of the source disk, specified in GB. |
| `sourceSnapshotSchedulePolicy` | `string \| null` | No | Output only. \[Output Only] URL of the resource policy which created this scheduled snapshot. |
| `sourceInstantSnapshotEncryptionKey` | `object \| null` | No | — |
| `creationSizeBytes` | `string \| number \| null` | No | Output only. \[Output Only] Size in bytes of the snapshot at creation time. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. \[Output Only] Reserved for future use. |
| `status` | `string \| null` | No | Output only. \[Output Only] The status of the snapshot. This can beCREATING, DELETING, FAILED,READY, or UPLOADING. |
| `licenseCodes` | `(string \| number)[] \| null` | No | Output only. \[Output Only] Integer license codes indicating which licenses are attached to this snapshot. |
| `snapshotType` | `string \| null` | No | Indicates the type of the snapshot. Valid values are ARCHIVE or STANDARD. The default is STANDARD. |
| `snapshotGroupId` | `string \| null` | No | Output only. \[Output Only] The unique ID of the snapshot group that this snapshot belongs to. The usage of snapshot group feature is restricted. |
| `description` | `string \| null` | No | An optional description of this resource. Provide this property when you create the resource. |
| `snapshotGroupName` | `string \| null` | No | Output only. \[Output only] The snapshot group that this snapshot belongs to. The usage of snapshot group feature is restricted. |
| `enableConfidentialCompute` | `boolean \| null` | No | Output only. Whether this snapshot is created from a confidential compute mode disk. \[Output Only]: This field is not set by user, but from source disk. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `labels` | `Record<string, string> \| null` | No | Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `sourceInstantSnapshot` | `string \| null` | No | The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot) - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot |
| `guestOsFeatures` | `object[] \| null` | No | Output only. \[Output Only] 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. |

> [accordion] sourceDiskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] snapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null
> } | null
> ```

> [accordion] sourceInstantSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string | null,
>   rsaEncryptedKey?: string | null,
>   kmsKeyName?: string | null,
>   sha256?: string | null,
>   kmsKeyServiceAccount?: string | null
> } | null
> ```

> [accordion] guestOsFeatures full type
>
> ```ts theme={null}
> {
>   type?: string | null
> }[] | null
> ```

***

### snapshots.getIamPolicy

`compute.snapshots.getIamPolicy`

Gets the access control policy for a resource. May be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.snapshots.getIamPolicy({ project: 'demo-project', resource: 'web-1-snap' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `optionsRequestedPolicyVersion` | `number` | No | Requested IAM Policy version. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### snapshots.insert

`compute.snapshots.insert`

Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of disks.createSnapshot, as this method supports more features, such as creating snapshots in a project different from the source disk project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.snapshots.insert({ project: 'demo-project', name: 'web-1-snap', sourceDisk: 'projects/demo-project/zones/us-central1-a/disks/web-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `sourceDisk` | `string` | No | The source disk used to create this snapshot. |
| `sourceDiskEncryptionKey` | `object` | No | — |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a snapshot. (base64) |
| `sourceDiskForRecoveryCheckpoint` | `string` | No | The source disk whose recovery checkpoint will be used to create this snapshot. |
| `locationHint` | `string` | No | An opaque location hint used to place the snapshot close to other resources. This field is for use by internal tools that use the public API. |
| `name` | `string` | No | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `snapshotEncryptionKey` | `object` | No | — |
| `storageLocations` | `string[]` | No | Cloud Storage bucket storage location of the snapshot (regional or multi-regional). |
| `params` | `object` | No | Additional snapshot params. |
| `chainName` | `string` | No | Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for advanced service owners who needs to create separate snapshot chains, for example, for chargeback tracking. When you describe your snapshot resource, this field is visible only if it has a non-empty value. |
| `guestFlush` | `boolean` | No | \[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. |
| `sourceInstantSnapshotEncryptionKey` | `object` | No | — |
| `snapshotType` | `ARCHIVE \| STANDARD` | No | Indicates the type of the snapshot. Valid values are ARCHIVE or STANDARD. The default is STANDARD. |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. |
| `labels` | `Record<string, string>` | No | Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. |
| `sourceInstantSnapshot` | `string` | No | The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - [https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot](https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot) - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot |

> [accordion] sourceDiskEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] snapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

> [accordion] sourceInstantSnapshotEncryptionKey full type
>
> ```ts theme={null}
> {
>   rawKey?: string,
>   rsaEncryptedKey?: string,
>   kmsKeyName?: string,
>   sha256?: string,
>   kmsKeyServiceAccount?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### snapshots.list

`compute.snapshots.list`

Retrieves the list of Snapshot resources contained within the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.snapshots.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `maxResults` | `number` | No | 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`) |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `kind` | `string \| null` | No | Output only. Type of resource. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `items` | `object[] \| null` | No | A list of Snapshot resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   code?: string | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   sourceDisk?: string | null,
>   region?: string | null,
>   sourceSnapshotSchedulePolicyId?: string | null,
>   sourceDiskEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   selfLink?: string | null,
>   labelFingerprint?: string | null,
>   sourceDiskForRecoveryCheckpoint?: string | null,
>   sourceDiskId?: string | null,
>   sourceInstantSnapshotId?: string | null,
>   locationHint?: string | null,
>   name?: string | null,
>   snapshotEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   storageLocations?: string[] | null,
>   licenses?: string[] | null,
>   autoCreated?: boolean | null,
>   architecture?: string | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   downloadBytes?: string | number | null,
>   storageBytesStatus?: string | null,
>   satisfiesPzi?: boolean | null,
>   storageBytes?: string | number | null,
>   chainName?: string | null,
>   guestFlush?: boolean | null,
>   diskSizeGb?: string | number | null,
>   sourceSnapshotSchedulePolicy?: string | null,
>   sourceInstantSnapshotEncryptionKey?: {
>     rawKey?: string | null,
>     rsaEncryptedKey?: string | null,
>     kmsKeyName?: string | null,
>     sha256?: string | null,
>     kmsKeyServiceAccount?: string | null
>   } | null,
>   creationSizeBytes?: string | number | null,
>   kind?: string | null,
>   satisfiesPzs?: boolean | null,
>   status?: string | null,
>   licenseCodes?: (string | number)[] | null,
>   snapshotType?: string | null,
>   snapshotGroupId?: string | null,
>   description?: string | null,
>   snapshotGroupName?: string | null,
>   enableConfidentialCompute?: boolean | null,
>   id?: string | number | null,
>   labels?: Record<string, string> | null,
>   creationTimestamp?: string | null,
>   sourceInstantSnapshot?: string | null,
>   guestOsFeatures?: {
>     type?: string | null
>   }[] | null
> }[] | null
> ```

***

### snapshots.setIamPolicy

`compute.snapshots.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.snapshots.setIamPolicy({
	resource: 'web-1-snap',
	project: 'demo-project',
	policy: {
		bindings: [{
			role: 'roles/compute.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `etag` | `string` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. (base64) |
| `bindings` | `object[]` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: ADMIN_READ | DATA_READ | DATA_WRITE | LOG_TYPE_UNSPECIFIED,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   bindings?: {
>     role?: string,
>     members?: string[],
>     condition?: {
>       title?: string,
>       description?: string,
>       expression?: string,
>       location?: string
>     }
>   }[],
>   etag?: string
> }
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string,
>   members?: string[],
>   condition?: {
>     title?: string,
>     description?: string,
>     expression?: string,
>     location?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### snapshots.setLabels

`compute.snapshots.setLabels`

Sets the labels on a snapshot. To learn more about labels, read theLabeling Resources documentation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.snapshots.setLabels({
	resource: 'web-1-snap',
	project: 'demo-project',
	labels: { env: 'prod' },
	labelFingerprint: '42WmSpB8rSM=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `labelFingerprint` | `string` | No | 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 error412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint. (base64) |
| `labels` | `Record<string, string>` | No | A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example,"webserver-frontend": "images". A label value can also be empty (e.g. "my-label": ""). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### snapshots.testIamPermissions

`compute.snapshots.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.snapshots.testIamPermissions({
	resource: 'web-1-snap',
	project: 'demo-project',
	permissions: ['compute.snapshots.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### snapshots.updateKmsKey

`compute.snapshots.updateKmsKey`

Rotates the customer-managed encryption key to the latest version for the specified snapshot

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.snapshots.updateKmsKey({ project: 'demo-project', snapshot: 'web-1-snap', kmsKeyName: 'projects/demo-project/locations/us-central1/keyRings/app/cryptoKeys/data' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `snapshot` | `string` | Yes | Name of the snapshot resource to update. Should conform to RFC1035. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `kmsKeyName` | `string` | No | Optional. The new KMS key to replace the current one on the snapshot. If empty, the snapshot will be re-encrypted using the primary version of the snapshot's current KMS key. The KMS key can be provided in the following formats: - projects/project\_id/locations/region/keyRings/key\_ring/cryptoKeys/key |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### subnetworks.aggregatedList

`compute.subnetworks.aggregatedList`

Retrieves an aggregated list of subnetworks. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.aggregatedList({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serviceProjectNumber` | `string \| number` | No | The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. |
| `maxResults` | `number` | No | 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`) |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `includeAllScopes` | `boolean` | No | Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `views` | `(DEFAULT \| WITH_UTILIZATION)[]` | No | Defines the extra views returned back in the subnetwork resource. Supported values: - WITH\_UTILIZATION: Utilization data is included in the response. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#subnetworkAggregatedList for aggregated lists of subnetworks. |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `items` | `object \| null` | No | A list of SubnetworksScopedList resources. |

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> } | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> Record<string, {
>   warning?: {
>     message?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     code?: string | null
>   } | null,
>   subnetworks?: {
>     kind?: string | null,
>     enableFlowLogs?: boolean | null,
>     fingerprint?: string | null,
>     reservedInternalRange?: string | null,
>     id?: string | number | null,
>     creationTimestamp?: string | null,
>     role?: string | null,
>     ipv6AccessType?: string | null,
>     internalIpv6Prefix?: string | null,
>     ipCidrRange?: string | null,
>     ipv6CidrRange?: string | null,
>     privateIpGoogleAccess?: boolean | null,
>     utilizationDetails?: {
>       externalIpv6InstanceUtilization?: {
>         totalAllocatedIp?: {
>           low?: string | number | null,
>           high?: string | number | null
>         } | null,
>         totalFreeIp?: {
>           low?: string | number | null,
>           high?: string | number | null
>         } | null
>       } | null,
>       externalIpv6LbUtilization?: {
>         totalAllocatedIp?: {
>           low?: string | number | null,
>           high?: string | number | null
>         } | null,
>         totalFreeIp?: {
>           low?: string | number | null,
>           high?: string | number | null
>         } | null
>       } | null,
>       internalIpv6Utilization?: {
>         totalAllocatedIp?: {
>           low?: string | number | null,
>           high?: string | number | null
>         } | null,
>         totalFreeIp?: {
>           low?: string | number | null,
>           high?: string | number | null
>         } | null
>       } | null,
>       ipv4Utilizations?: {
>         rangeName?: string | null,
>         totalFreeIp?: string | number | null,
>         totalAllocatedIp?: string | number | null
>       }[] | null
>     } | null,
>     privateIpv6GoogleAccess?: string | null,
>     selfLink?: string | null,
>     allowSubnetCidrRoutesOverlap?: boolean | null,
>     purpose?: string | null,
>     description?: string | null,
>     logConfig?: {
>       filterExpr?: string | null,
>       enable?: boolean | null,
>       flowSampling?: number | null,
>       aggregationInterval?: string | null,
>       metadataFields?: string[] | null,
>       metadata?: string | null
>     } | null,
>     state?: string | null,
>     name?: string | null,
>     systemReservedInternalIpv6Ranges?: string[] | null,
>     region?: string | null,
>     resolveSubnetMask?: string | null,
>     secondaryIpRanges?: {
>       ipVersion?: string | null,
>       ipCollection?: string | null,
>       reservedInternalRange?: string | null,
>       rangeName?: string | null,
>       ipCidrRange?: string | null
>     }[] | null,
>     gatewayAddress?: string | null,
>     stackType?: string | null,
>     externalIpv6Prefix?: string | null,
>     systemReservedExternalIpv6Ranges?: string[] | null,
>     ipCollection?: string | null,
>     params?: {
>       resourceManagerTags?: Record<string, string> | null
>     } | null,
>     ipv6GceEndpoint?: string | null,
>     network?: string | null
>   }[] | null
> }> | null
> ```

***

### subnetworks.delete

`compute.subnetworks.delete`

Deletes the specified subnetwork

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.delete({ region: 'us-central1', project: 'demo-project', subnetwork: 'default' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | Name of the region scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `subnetwork` | `string` | Yes | Name of the Subnetwork resource to delete. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### subnetworks.expandIpCidrRange

`compute.subnetworks.expandIpCidrRange`

Expands the IP CIDR range of the subnetwork to a specified value

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.expandIpCidrRange({
	subnetwork: 'default',
	project: 'demo-project',
	region: 'us-central1',
	ipCidrRange: '10.10.0.0/22',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `subnetwork` | `string` | Yes | Name of the Subnetwork resource to update. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | Name of the region scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `ipCidrRange` | `string` | No | The IP (in CIDR format or netmask) of internal addresses that are legal on this Subnetwork. This range should be disjoint from other subnetworks within this network. This range can only be larger than (i.e. a superset of) the range previously defined before the update. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### subnetworks.get

`compute.subnetworks.get`

Returns the specified subnetwork

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.get({ subnetwork: 'default', project: 'demo-project', region: 'us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subnetwork` | `string` | Yes | Name of the Subnetwork resource to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `views` | `(DEFAULT \| WITH_UTILIZATION)[]` | No | Defines the extra views returned back in the subnetwork resource. Supported values: - WITH\_UTILIZATION: Utilization data is included in the response. |
| `region` | `string` | Yes | Name of the region scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. |
| `enableFlowLogs` | `boolean \| null` | No | Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported if the subnet purpose field is set toREGIONAL\_MANAGED\_PROXY. It is recommended to uselogConfig.enable field instead. |
| `fingerprint` | `string \| null` | No | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a Subnetwork. (base64) |
| `reservedInternalRange` | `string \| null` | No | The URL of the reserved internal range. |
| `id` | `string \| number \| null` | No | Output only. \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `creationTimestamp` | `string \| null` | No | Output only. \[Output Only] Creation timestamp inRFC3339 text format. |
| `role` | `string \| null` | No | The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL\_MANAGED\_PROXY orREGIONAL\_MANAGED\_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. |
| `ipv6AccessType` | `string \| null` | No | The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4\_IPV6 dual stack. |
| `internalIpv6Prefix` | `string \| null` | No | The internal IPv6 address range that is owned by this subnetwork. |
| `ipCidrRange` | `string \| null` | No | The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example,10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any range listed in theValid ranges list. The range can be expanded after creation usingexpandIpCidrRange. |
| `ipv6CidrRange` | `string \| null` | No | Output only. \[Output Only] This field is for internal use. |
| `privateIpGoogleAccess` | `boolean \| null` | No | Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. |
| `utilizationDetails` | `object \| null` | No | The current IP utilization of all subnetwork ranges. Contains the total number of allocated and free IPs in each range. |
| `privateIpv6GoogleAccess` | `string \| null` | No | This field is for internal use. This field can be both set at resource creation time and updated usingpatch. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `allowSubnetCidrRoutesOverlap` | `boolean \| null` | No | Whether this subnetwork's ranges can conflict with existing custom routes. Setting this to true allows this subnetwork's primary and secondary ranges to overlap with (and contain) custom routes that have already been configured on the corresponding network. For example if a static route has range 10.1.0.0/16, a subnet range 10.0.0.0/8 could only be created if allow\_conflicting\_routes=true. Overlapping is only allowed on subnetwork operations; routes whose ranges conflict with this subnetwork's ranges won't be allowed unless route.allow\_conflicting\_subnetworks is set to true. |
| `purpose` | `string \| null` | No | — |
| `description` | `string \| null` | No | An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. |
| `logConfig` | `object \| null` | No | The available logging options for this subnetwork. |
| `state` | `string \| null` | No | Output only. \[Output Only] The state of the subnetwork, which can be one of the following values:READY: Subnetwork is created and ready to useDRAINING: only applicable to subnetworks that have the purpose set to INTERNAL\_HTTPS\_LOAD\_BALANCER and indicates that connections to the load balancer are being drained. A subnetwork that is draining cannot be used or modified until it reaches a status ofREADY |
| `name` | `string \| null` | No | The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `systemReservedInternalIpv6Ranges` | `string[] \| null` | No | Output only. \[Output Only] The array of internal IPv6 network ranges reserved from the subnetwork's internal IPv6 range for system use. |
| `region` | `string \| null` | No | URL of the region where the Subnetwork resides. This field can be set only at resource creation time. |
| `resolveSubnetMask` | `string \| null` | No | Configures subnet mask resolution for this subnetwork. |
| `secondaryIpRanges` | `object[] \| null` | No | An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with apatch request. Supports both IPv4 and IPv6 ranges. |
| `gatewayAddress` | `string \| null` | No | Output only. \[Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. |
| `stackType` | `string \| null` | No | The stack type for the subnet. If set to IPV4\_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set toIPV4\_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4\_ONLY is used. This field can be both set at resource creation time and updated usingpatch. |
| `externalIpv6Prefix` | `string \| null` | No | The external IPv6 address range that is owned by this subnetwork. |
| `systemReservedExternalIpv6Ranges` | `string[] \| null` | No | Output only. \[Output Only] The array of external IPv6 network ranges reserved from the subnetwork's external IPv6 range for system use. |
| `ipCollection` | `string \| null` | No | Reference to the source of IP, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must be a sub-PDP in EXTERNAL\_IPV6\_SUBNETWORK\_CREATION or INTERNAL\_IPV6\_SUBNETWORK\_CREATION mode. Use one of the following formats to specify a sub-PDP when creating a dual stack or IPv6-only subnetwork with external access using BYOIP: - Full resource URL, as inhttps\://[www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name](http://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name) - Partial URL, as in - projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name -… |
| `params` | `object \| null` | No | Additional subnetwork parameters. |
| `ipv6GceEndpoint` | `string \| null` | No | Output only. \[Output Only] Possible endpoints of this subnetwork. It can be one of the following: - VM\_ONLY: The subnetwork can be used for creating instances and IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6 ranges from a public delegated prefix and cannot be used to create NetLb. - VM\_AND\_FR: The subnetwork can be used for creating both VM instances and Forwarding Rules. It can also be used to reserve IPv6 addresses with both VM and FR endpoint types. Such a subnetwork gets its IPv6 range from Google IP Pool directly. |
| `network` | `string \| null` | No | The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. This field can be set only at resource creation time. |

> [accordion] utilizationDetails full type
>
> ```ts theme={null}
> {
>   externalIpv6InstanceUtilization?: {
>     totalAllocatedIp?: {
>       low?: string | number | null,
>       high?: string | number | null
>     } | null,
>     totalFreeIp?: {
>       low?: string | number | null,
>       high?: string | number | null
>     } | null
>   } | null,
>   externalIpv6LbUtilization?: {
>     totalAllocatedIp?: {
>       low?: string | number | null,
>       high?: string | number | null
>     } | null,
>     totalFreeIp?: {
>       low?: string | number | null,
>       high?: string | number | null
>     } | null
>   } | null,
>   internalIpv6Utilization?: {
>     totalAllocatedIp?: {
>       low?: string | number | null,
>       high?: string | number | null
>     } | null,
>     totalFreeIp?: {
>       low?: string | number | null,
>       high?: string | number | null
>     } | null
>   } | null,
>   ipv4Utilizations?: {
>     rangeName?: string | null,
>     totalFreeIp?: string | number | null,
>     totalAllocatedIp?: string | number | null
>   }[] | null
> } | null
> ```

> [accordion] logConfig full type
>
> ```ts theme={null}
> {
>   filterExpr?: string | null,
>   enable?: boolean | null,
>   flowSampling?: number | null,
>   aggregationInterval?: string | null,
>   metadataFields?: string[] | null,
>   metadata?: string | null
> } | null
> ```

> [accordion] secondaryIpRanges full type
>
> ```ts theme={null}
> {
>   ipVersion?: string | null,
>   ipCollection?: string | null,
>   reservedInternalRange?: string | null,
>   rangeName?: string | null,
>   ipCidrRange?: string | null
> }[] | null
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string> | null
> } | null
> ```

***

### subnetworks.getIamPolicy

`compute.subnetworks.getIamPolicy`

Gets the access control policy for a resource. May be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.getIamPolicy({ project: 'demo-project', region: 'us-central1', resource: 'default' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `region` | `string` | Yes | The name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `optionsRequestedPolicyVersion` | `number` | No | Requested IAM Policy version. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### subnetworks.insert

`compute.subnetworks.insert`

Creates a subnetwork in the specified project using the data included in the request

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.insert({
	region: 'us-central1',
	project: 'demo-project',
	name: 'vpc-2',
	network: 'projects/demo-project/global/networks/vpc-2',
	ipCidrRange: '10.10.0.0/24',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | Name of the region scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `enableFlowLogs` | `boolean` | No | Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported if the subnet purpose field is set toREGIONAL\_MANAGED\_PROXY. It is recommended to uselogConfig.enable field instead. |
| `fingerprint` | `string` | No | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a Subnetwork. (base64) |
| `reservedInternalRange` | `string` | No | The URL of the reserved internal range. |
| `role` | `ACTIVE \| BACKUP` | No | The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL\_MANAGED\_PROXY orREGIONAL\_MANAGED\_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. |
| `ipv6AccessType` | `EXTERNAL \| INTERNAL` | No | The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4\_IPV6 dual stack. |
| `internalIpv6Prefix` | `string` | No | The internal IPv6 address range that is owned by this subnetwork. |
| `ipCidrRange` | `string` | No | The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example,10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any range listed in theValid ranges list. The range can be expanded after creation usingexpandIpCidrRange. |
| `privateIpGoogleAccess` | `boolean` | No | Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. |
| `privateIpv6GoogleAccess` | `DISABLE_GOOGLE_ACCESS \| ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE \| ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE` | No | This field is for internal use. This field can be both set at resource creation time and updated usingpatch. |
| `selfLink` | `string` | No | \[Output Only] Server-defined URL for the resource. |
| `allowSubnetCidrRoutesOverlap` | `boolean` | No | Whether this subnetwork's ranges can conflict with existing custom routes. Setting this to true allows this subnetwork's primary and secondary ranges to overlap with (and contain) custom routes that have already been configured on the corresponding network. For example if a static route has range 10.1.0.0/16, a subnet range 10.0.0.0/8 could only be created if allow\_conflicting\_routes=true. Overlapping is only allowed on subnetwork operations; routes whose ranges conflict with this subnetwork's ranges won't be allowed unless route.allow\_conflicting\_subnetworks is set to true. |
| `purpose` | `GLOBAL_MANAGED_PROXY \| INTERNAL_HTTPS_LOAD_BALANCER \| PEER_MIGRATION \| PRIVATE \| PRIVATE_NAT \| PRIVATE_RFC_1918 \| PRIVATE_SERVICE_CONNECT \| REGIONAL_MANAGED_PROXY` | No | — |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. |
| `logConfig` | `object` | No | The available logging options for this subnetwork. |
| `name` | `string` | No | The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `body_region` | `string` | No | URL of the region where the Subnetwork resides. This field can be set only at resource creation time. |
| `resolveSubnetMask` | `ARP_ALL_RANGES \| ARP_BROADCAST_PRIMARY_RANGE \| ARP_BROADCAST_PRIMARY_RANGE_WITH_LEARNING \| ARP_PRIMARY_RANGE` | No | Configures subnet mask resolution for this subnetwork. |
| `secondaryIpRanges` | `object[]` | No | An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with apatch request. Supports both IPv4 and IPv6 ranges. |
| `stackType` | `IPV4_IPV6 \| IPV4_ONLY \| IPV6_ONLY` | No | The stack type for the subnet. If set to IPV4\_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set toIPV4\_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4\_ONLY is used. This field can be both set at resource creation time and updated usingpatch. |
| `externalIpv6Prefix` | `string` | No | The external IPv6 address range that is owned by this subnetwork. |
| `ipCollection` | `string` | No | Reference to the source of IP, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must be a sub-PDP in EXTERNAL\_IPV6\_SUBNETWORK\_CREATION or INTERNAL\_IPV6\_SUBNETWORK\_CREATION mode. Use one of the following formats to specify a sub-PDP when creating a dual stack or IPv6-only subnetwork with external access using BYOIP: - Full resource URL, as inhttps\://[www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name](http://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name) - Partial URL, as in - projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name -… |
| `params` | `object` | No | Additional subnetwork parameters. |
| `network` | `string` | No | The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. This field can be set only at resource creation time. |

> [accordion] logConfig full type
>
> ```ts theme={null}
> {
>   filterExpr?: string,
>   enable?: boolean,
>   flowSampling?: number,
>   aggregationInterval?: INTERVAL_10_MIN | INTERVAL_15_MIN | INTERVAL_1_MIN | INTERVAL_30_SEC | INTERVAL_5_MIN | INTERVAL_5_SEC,
>   metadataFields?: string[],
>   metadata?: CUSTOM_METADATA | EXCLUDE_ALL_METADATA | INCLUDE_ALL_METADATA
> }
> ```

> [accordion] secondaryIpRanges full type
>
> ```ts theme={null}
> {
>   ipVersion?: IPV4 | IPV6 | IP_VERSION_UNSPECIFIED,
>   ipCollection?: string,
>   reservedInternalRange?: string,
>   rangeName?: string,
>   ipCidrRange?: string
> }[]
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### subnetworks.list

`compute.subnetworks.list`

Retrieves a list of subnetworks available to the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.list({ project: 'demo-project', region: 'us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `region` | `string` | Yes | Name of the region scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `maxResults` | `number` | No | 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`) |
| `views` | `(DEFAULT \| WITH_UTILIZATION)[]` | No | Defines the extra views returned back in the subnetwork resource. Supported values: - WITH\_UTILIZATION: Utilization data is included in the response. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always compute#subnetworkList for lists of subnetworks. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `items` | `object[] \| null` | No | A list of Subnetwork resources. |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   enableFlowLogs?: boolean | null,
>   fingerprint?: string | null,
>   reservedInternalRange?: string | null,
>   id?: string | number | null,
>   creationTimestamp?: string | null,
>   role?: string | null,
>   ipv6AccessType?: string | null,
>   internalIpv6Prefix?: string | null,
>   ipCidrRange?: string | null,
>   ipv6CidrRange?: string | null,
>   privateIpGoogleAccess?: boolean | null,
>   utilizationDetails?: {
>     externalIpv6InstanceUtilization?: {
>       totalAllocatedIp?: {
>         low?: string | number | null,
>         high?: string | number | null
>       } | null,
>       totalFreeIp?: {
>         low?: string | number | null,
>         high?: string | number | null
>       } | null
>     } | null,
>     externalIpv6LbUtilization?: {
>       totalAllocatedIp?: {
>         low?: string | number | null,
>         high?: string | number | null
>       } | null,
>       totalFreeIp?: {
>         low?: string | number | null,
>         high?: string | number | null
>       } | null
>     } | null,
>     internalIpv6Utilization?: {
>       totalAllocatedIp?: {
>         low?: string | number | null,
>         high?: string | number | null
>       } | null,
>       totalFreeIp?: {
>         low?: string | number | null,
>         high?: string | number | null
>       } | null
>     } | null,
>     ipv4Utilizations?: {
>       rangeName?: string | null,
>       totalFreeIp?: string | number | null,
>       totalAllocatedIp?: string | number | null
>     }[] | null
>   } | null,
>   privateIpv6GoogleAccess?: string | null,
>   selfLink?: string | null,
>   allowSubnetCidrRoutesOverlap?: boolean | null,
>   purpose?: string | null,
>   description?: string | null,
>   logConfig?: {
>     filterExpr?: string | null,
>     enable?: boolean | null,
>     flowSampling?: number | null,
>     aggregationInterval?: string | null,
>     metadataFields?: string[] | null,
>     metadata?: string | null
>   } | null,
>   state?: string | null,
>   name?: string | null,
>   systemReservedInternalIpv6Ranges?: string[] | null,
>   region?: string | null,
>   resolveSubnetMask?: string | null,
>   secondaryIpRanges?: {
>     ipVersion?: string | null,
>     ipCollection?: string | null,
>     reservedInternalRange?: string | null,
>     rangeName?: string | null,
>     ipCidrRange?: string | null
>   }[] | null,
>   gatewayAddress?: string | null,
>   stackType?: string | null,
>   externalIpv6Prefix?: string | null,
>   systemReservedExternalIpv6Ranges?: string[] | null,
>   ipCollection?: string | null,
>   params?: {
>     resourceManagerTags?: Record<string, string> | null
>   } | null,
>   ipv6GceEndpoint?: string | null,
>   network?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

***

### subnetworks.listUsable

`compute.subnetworks.listUsable`

Retrieves an aggregated list of all usable subnetworks in the project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.listUsable({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `maxResults` | `number` | No | 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`) |
| `serviceProject` | `string` | No | The project id or project number in which the subnetwork is intended to be used. Only applied for Shared VPC. See [Shared VPC documentation](https://cloud.google.com/vpc/docs/shared-vpc/) |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. In special cases listUsable may return 0 subnetworks andnextPageToken which still should be used to get the next page of results. |
| `items` | `object[] \| null` | No | \[Output] A list of usable subnetwork URLs. |
| `id` | `string \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Alwayscompute#usableSubnetworksAggregatedList for aggregated lists of usable subnetworks. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `unreachables` | `string[] \| null` | No | Output only. \[Output Only] Unreachable resources. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `scopedWarnings` | `object[] \| null` | No | Output only. \[Output Only] Informational warning messages for failures encountered from scopes. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   stackType?: string | null,
>   network?: string | null,
>   ipCidrRange?: string | null,
>   secondaryIpRanges?: {
>     rangeName?: string | null,
>     ipCidrRange?: string | null
>   }[] | null,
>   externalIpv6Prefix?: string | null,
>   purpose?: string | null,
>   subnetwork?: string | null,
>   ipv6AccessType?: string | null,
>   internalIpv6Prefix?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   code?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] scopedWarnings full type
>
> ```ts theme={null}
> {
>   scopeName?: string | null,
>   warning?: {
>     message?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null,
>     code?: string | null
>   } | null
> }[] | null
> ```

***

### subnetworks.patch

`compute.subnetworks.patch`

Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.patch({
	region: 'us-central1',
	subnetwork: 'default',
	project: 'demo-project',
	fingerprint: '42WmSpB8rSM=',
	privateIpGoogleAccess: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | Name of the region scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `subnetwork` | `string` | Yes | Name of the Subnetwork resource to patch. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `drainTimeoutSeconds` | `number` | No | The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL\_HTTPS\_LOAD\_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `enableFlowLogs` | `boolean` | No | Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported if the subnet purpose field is set toREGIONAL\_MANAGED\_PROXY. It is recommended to uselogConfig.enable field instead. |
| `fingerprint` | `string` | No | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a Subnetwork. (base64) |
| `reservedInternalRange` | `string` | No | The URL of the reserved internal range. |
| `role` | `ACTIVE \| BACKUP` | No | The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL\_MANAGED\_PROXY orREGIONAL\_MANAGED\_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. |
| `ipv6AccessType` | `EXTERNAL \| INTERNAL` | No | The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4\_IPV6 dual stack. |
| `internalIpv6Prefix` | `string` | No | The internal IPv6 address range that is owned by this subnetwork. |
| `ipCidrRange` | `string` | No | The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example,10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any range listed in theValid ranges list. The range can be expanded after creation usingexpandIpCidrRange. |
| `privateIpGoogleAccess` | `boolean` | No | Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. |
| `privateIpv6GoogleAccess` | `DISABLE_GOOGLE_ACCESS \| ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE \| ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE` | No | This field is for internal use. This field can be both set at resource creation time and updated usingpatch. |
| `selfLink` | `string` | No | \[Output Only] Server-defined URL for the resource. |
| `allowSubnetCidrRoutesOverlap` | `boolean` | No | Whether this subnetwork's ranges can conflict with existing custom routes. Setting this to true allows this subnetwork's primary and secondary ranges to overlap with (and contain) custom routes that have already been configured on the corresponding network. For example if a static route has range 10.1.0.0/16, a subnet range 10.0.0.0/8 could only be created if allow\_conflicting\_routes=true. Overlapping is only allowed on subnetwork operations; routes whose ranges conflict with this subnetwork's ranges won't be allowed unless route.allow\_conflicting\_subnetworks is set to true. |
| `purpose` | `GLOBAL_MANAGED_PROXY \| INTERNAL_HTTPS_LOAD_BALANCER \| PEER_MIGRATION \| PRIVATE \| PRIVATE_NAT \| PRIVATE_RFC_1918 \| PRIVATE_SERVICE_CONNECT \| REGIONAL_MANAGED_PROXY` | No | — |
| `description` | `string` | No | An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. |
| `logConfig` | `object` | No | The available logging options for this subnetwork. |
| `name` | `string` | No | The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `a-z?` 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. |
| `body_region` | `string` | No | URL of the region where the Subnetwork resides. This field can be set only at resource creation time. |
| `resolveSubnetMask` | `ARP_ALL_RANGES \| ARP_BROADCAST_PRIMARY_RANGE \| ARP_BROADCAST_PRIMARY_RANGE_WITH_LEARNING \| ARP_PRIMARY_RANGE` | No | Configures subnet mask resolution for this subnetwork. |
| `secondaryIpRanges` | `object[]` | No | An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with apatch request. Supports both IPv4 and IPv6 ranges. |
| `stackType` | `IPV4_IPV6 \| IPV4_ONLY \| IPV6_ONLY` | No | The stack type for the subnet. If set to IPV4\_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set toIPV4\_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4\_ONLY is used. This field can be both set at resource creation time and updated usingpatch. |
| `externalIpv6Prefix` | `string` | No | The external IPv6 address range that is owned by this subnetwork. |
| `ipCollection` | `string` | No | Reference to the source of IP, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must be a sub-PDP in EXTERNAL\_IPV6\_SUBNETWORK\_CREATION or INTERNAL\_IPV6\_SUBNETWORK\_CREATION mode. Use one of the following formats to specify a sub-PDP when creating a dual stack or IPv6-only subnetwork with external access using BYOIP: - Full resource URL, as inhttps\://[www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name](http://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name) - Partial URL, as in - projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name -… |
| `params` | `object` | No | Additional subnetwork parameters. |
| `network` | `string` | No | The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. This field can be set only at resource creation time. |

> [accordion] logConfig full type
>
> ```ts theme={null}
> {
>   filterExpr?: string,
>   enable?: boolean,
>   flowSampling?: number,
>   aggregationInterval?: INTERVAL_10_MIN | INTERVAL_15_MIN | INTERVAL_1_MIN | INTERVAL_30_SEC | INTERVAL_5_MIN | INTERVAL_5_SEC,
>   metadataFields?: string[],
>   metadata?: CUSTOM_METADATA | EXCLUDE_ALL_METADATA | INCLUDE_ALL_METADATA
> }
> ```

> [accordion] secondaryIpRanges full type
>
> ```ts theme={null}
> {
>   ipVersion?: IPV4 | IPV6 | IP_VERSION_UNSPECIFIED,
>   ipCollection?: string,
>   reservedInternalRange?: string,
>   rangeName?: string,
>   ipCidrRange?: string
> }[]
> ```

> [accordion] params full type
>
> ```ts theme={null}
> {
>   resourceManagerTags?: Record<string, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### subnetworks.setIamPolicy

`compute.subnetworks.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.setIamPolicy({
	region: 'us-central1',
	resource: 'default',
	project: 'demo-project',
	policy: {
		bindings: [{
			role: 'roles/compute.networkUser',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | The name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `etag` | `string` | No | Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. (base64) |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `bindings` | `object[]` | No | Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: ADMIN_READ | DATA_READ | DATA_WRITE | LOG_TYPE_UNSPECIFIED,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   bindings?: {
>     role?: string,
>     members?: string[],
>     condition?: {
>       title?: string,
>       description?: string,
>       expression?: string,
>       location?: string
>     }
>   }[],
>   etag?: string
> }
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string,
>   members?: string[],
>   condition?: {
>     title?: string,
>     description?: string,
>     expression?: string,
>     location?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### subnetworks.setPrivateIpGoogleAccess

`compute.subnetworks.setPrivateIpGoogleAccess`

Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.setPrivateIpGoogleAccess({
	region: 'us-central1',
	project: 'demo-project',
	subnetwork: 'default',
	privateIpGoogleAccess: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | Name of the region scoping this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `requestId` | `string` | No | An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `subnetwork` | `string` | Yes | Name of the Subnetwork resource. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `privateIpGoogleAccess` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### subnetworks.testIamPermissions

`compute.subnetworks.testIamPermissions`

Returns permissions that a caller has on the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.subnetworks.testIamPermissions({
	region: 'us-central1',
	resource: 'default',
	project: 'demo-project',
	permissions: ['compute.subnetworks.use'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `region` | `string` | Yes | The name of the region for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `resource` | `string` | Yes | Name or id of the resource for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `permissions` | `string[]` | No | The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### zoneOperations.delete

`compute.zoneOperations.delete`

Deletes the specified zone-specific Operations resource

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.compute.zoneOperations.delete({ project: 'demo-project', operation: 'operation-123', zone: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `operation` | `string` | Yes | Name of the Operations resource to delete, or its unique numeric identifier. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | Name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### zoneOperations.get

`compute.zoneOperations.get`

Retrieves the specified zone-specific Operations resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.zoneOperations.get({ operation: 'operation-123', zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `string` | Yes | Name of the Operations resource to return, or its unique numeric identifier. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `zone` | `string` | Yes | Name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### zoneOperations.list

`compute.zoneOperations.list`

Retrieves a list of Operation resources contained within the specified zone (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.zoneOperations.list({ zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |
| `maxResults` | `number` | No | 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`) |
| `zone` | `string` | Yes | Name of the zone for request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | \[Output Only] A list of Operation resources. |
| `id` | `string \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than `maxResults`, use the `nextPageToken` as a value for the query parameter `pageToken` in the next list request. Subsequent list requests will have their own `nextPageToken` to continue paging through the results. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for this resource. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of resource. Always `compute#operations` for Operations resource. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   operationType?: string | null,
>   operationGroupId?: string | null,
>   getHealthOperationMetadata?: {
>     healthInfo?: {
>       healthStatus?: string | null,
>       unhealthyReason?: string | null,
>       availabilitySloStatus?: string | null,
>       repairCategory?: string | null,
>       updateTime?: string | null
>     } | null
>   } | null,
>   kind?: string | null,
>   status?: string | null,
>   id?: string | number | null,
>   getVersionOperationMetadata?: {
>     inlineSbomInfo?: {
>       targetComponentVersions?: Record<string, string> | null,
>       currentComponentVersions?: Record<string, string> | null
>     } | null
>   } | null,
>   zone?: string | null,
>   httpErrorMessage?: string | null,
>   error?: {
>     errors?: {
>       location?: string | null,
>       code?: string | null,
>       message?: string | null,
>       errorDetails?: {
>         errorInfo?: {
>           domain?: string | null,
>           metadatas?: Record<string, string> | null,
>           reason?: string | null
>         } | null,
>         localizedMessage?: {
>           locale?: string | null,
>           message?: string | null
>         } | null,
>         help?: {
>           links?: {
>             description?: string | null,
>             url?: string | null
>           }[] | null
>         } | null,
>         quotaInfo?: {
>           rolloutStatus?: string | null,
>           dimensions?: Record<string, string> | null,
>           limit?: number | null,
>           metricName?: string | null,
>           futureLimit?: number | null,
>           limitName?: string | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   setCommonInstanceMetadataOperationMetadata?: {
>     clientOperationId?: string | null,
>     perLocationOperations?: Record<string, {
>       state?: string | null,
>       error?: {
>         code?: number | null,
>         message?: string | null,
>         details?: Record<string, any>[] | null
>       } | null
>     }> | null
>   } | null,
>   warnings?: {
>     message?: string | null,
>     code?: string | null,
>     data?: {
>       key?: string | null,
>       value?: string | null
>     }[] | null
>   }[] | null,
>   endTime?: string | null,
>   name?: string | null,
>   statusMessage?: string | null,
>   insertTime?: string | null,
>   targetId?: string | number | null,
>   targetLink?: string | null,
>   region?: string | null,
>   user?: string | null,
>   httpErrorStatusCode?: number | null,
>   creationTimestamp?: string | null,
>   progress?: number | null,
>   startTime?: string | null,
>   description?: string | null,
>   instancesBulkInsertOperationMetadata?: {
>     perLocationStatus?: Record<string, {
>       createdVmCount?: number | null,
>       deletedVmCount?: number | null,
>       failedToCreateVmCount?: number | null,
>       targetVmCount?: number | null,
>       status?: string | null
>     }> | null
>   } | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null,
>   message?: string | null
> } | null
> ```

***

### zoneOperations.wait

`compute.zoneOperations.wait`

Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be `DONE` or still in progress

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.compute.zoneOperations.wait({ zone: 'us-central1-a', project: 'demo-project', operation: 'operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | Name of the zone for this request. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `operation` | `string` | Yes | Name of the Operations resource to return, or its unique numeric identifier. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientOperationId` | `string \| null` | No | \[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. |
| `operationType` | `string \| null` | No | \[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. |
| `operationGroupId` | `string \| null` | No | Output only. \[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. |
| `getHealthOperationMetadata` | `object \| null` | No | Metadata for GetHealth operations. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always `compute#operation` for Operation resources. |
| `status` | `string \| null` | No | \[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the operation. This identifier is defined by the server. |
| `getVersionOperationMetadata` | `object \| null` | No | — |
| `zone` | `string \| null` | No | \[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. |
| `httpErrorMessage` | `string \| null` | No | \[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. |
| `error` | `object \| null` | No | \[Output Only] If errors are generated during processing of the operation, this field will be populated. |
| `setCommonInstanceMetadataOperationMetadata` | `object \| null` | No | — |
| `warnings` | `object[] \| null` | No | \[Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| `endTime` | `string \| null` | No | \[Output Only] The time that this operation was completed. This value is inRFC3339 text format. |
| `name` | `string \| null` | No | \[Output Only] Name of the operation. |
| `statusMessage` | `string \| null` | No | \[Output Only] An optional textual description of the current status of the operation. |
| `insertTime` | `string \| null` | No | \[Output Only] The time that this operation was requested. This value is inRFC3339 text format. |
| `targetId` | `string \| number \| null` | No | \[Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| `targetLink` | `string \| null` | No | \[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from. |
| `region` | `string \| null` | No | \[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. |
| `user` | `string \| null` | No | \[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. |
| `httpErrorStatusCode` | `number \| null` | No | \[Output Only] 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. |
| `creationTimestamp` | `string \| null` | No | \[Deprecated] This field is deprecated. |
| `progress` | `number \| null` | No | \[Output Only] 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. |
| `startTime` | `string \| null` | No | \[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format. |
| `description` | `string \| null` | No | \[Output Only] A textual description of the operation, which is set when the operation is created. |
| `instancesBulkInsertOperationMetadata` | `object \| null` | No | — |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |

> [accordion] getHealthOperationMetadata full type
>
> ```ts theme={null}
> {
>   healthInfo?: {
>     healthStatus?: string | null,
>     unhealthyReason?: string | null,
>     availabilitySloStatus?: string | null,
>     repairCategory?: string | null,
>     updateTime?: string | null
>   } | null
> } | null
> ```

> [accordion] getVersionOperationMetadata full type
>
> ```ts theme={null}
> {
>   inlineSbomInfo?: {
>     targetComponentVersions?: Record<string, string> | null,
>     currentComponentVersions?: Record<string, string> | null
>   } | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     location?: string | null,
>     code?: string | null,
>     message?: string | null,
>     errorDetails?: {
>       errorInfo?: {
>         domain?: string | null,
>         metadatas?: Record<string, string> | null,
>         reason?: string | null
>       } | null,
>       localizedMessage?: {
>         locale?: string | null,
>         message?: string | null
>       } | null,
>       help?: {
>         links?: {
>           description?: string | null,
>           url?: string | null
>         }[] | null
>       } | null,
>       quotaInfo?: {
>         rolloutStatus?: string | null,
>         dimensions?: Record<string, string> | null,
>         limit?: number | null,
>         metricName?: string | null,
>         futureLimit?: number | null,
>         limitName?: string | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] setCommonInstanceMetadataOperationMetadata full type
>
> ```ts theme={null}
> {
>   clientOperationId?: string | null,
>   perLocationOperations?: Record<string, {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   }> | null
> } | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: string | null,
>   data?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] instancesBulkInsertOperationMetadata full type
>
> ```ts theme={null}
> {
>   perLocationStatus?: Record<string, {
>     createdVmCount?: number | null,
>     deletedVmCount?: number | null,
>     failedToCreateVmCount?: number | null,
>     targetVmCount?: number | null,
>     status?: string | null
>   }> | null
> } | null
> ```

***

### zones.get

`compute.zones.get`

Returns the specified Zone resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.zones.get({ zone: 'us-central1-a', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone` | `string` | Yes | Name of the zone resource to return. Format: `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\|[1-9][0-9]{0,19}`. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number \| null` | No | \[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| `kind` | `string \| null` | No | Output only. \[Output Only] Type of the resource. Always compute#zone for zones. |
| `region` | `string \| null` | No | \[Output Only] Full URL reference to the region which hosts the zone. |
| `creationTimestamp` | `string \| null` | No | \[Output Only] Creation timestamp inRFC3339 text format. |
| `selfLink` | `string \| null` | No | \[Output Only] Server-defined URL for the resource. |
| `supportsPzs` | `boolean \| null` | No | Output only. \[Output Only] Reserved for future use. |
| `description` | `string \| null` | No | \[Output Only] Textual description of the resource. |
| `resourceStatus` | `object \| null` | No | — |
| `name` | `string \| null` | No | \[Output Only] Name of the resource. |
| `availableCpuPlatforms` | `string[] \| null` | No | \[Output Only] Available cpu/platform selections for the zone. |
| `deprecated` | `object \| null` | No | Deprecation status for a public resource. |
| `status` | `string \| null` | No | \[Output Only] Status of the zone, either UP orDOWN. |

> [accordion] resourceStatus full type
>
> ```ts theme={null}
> {
>   upcomingMaintenances?: {
>     windowEndTime?: {
>       hours?: number | null,
>       day?: number | null,
>       month?: number | null,
>       minutes?: number | null,
>       timeZone?: {
>         id?: string | null,
>         version?: string | null
>       } | null,
>       nanos?: number | null,
>       utcOffset?: string | null,
>       year?: number | null,
>       seconds?: number | null
>     } | null,
>     subType?: string | null,
>     type?: string | null,
>     targetResource?: string | null,
>     windowStartTime?: {
>       hours?: number | null,
>       day?: number | null,
>       month?: number | null,
>       minutes?: number | null,
>       timeZone?: {
>         id?: string | null,
>         version?: string | null
>       } | null,
>       nanos?: number | null,
>       utcOffset?: string | null,
>       year?: number | null,
>       seconds?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] deprecated full type
>
> ```ts theme={null}
> {
>   replacement?: string | null,
>   state?: string | null,
>   deleted?: string | null,
>   deprecated?: string | null,
>   obsolete?: string | null
> } | null
> ```

***

### zones.list

`compute.zones.list`

Retrieves the list of Zone resources available to the specified project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.compute.zones.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `maxResults` | `number` | No | 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`) |
| `pageToken` | `string` | No | Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. |
| `orderBy` | `string` | No | 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. Currently, only sorting by `name` or `creationTimestamp desc` is supported. |
| `project` | `string` | Yes | Project ID for this request. Format: `(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}\|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))`. |
| `returnPartialSuccess` | `boolean` | No | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | \[Output Only] Unique identifier for the resource; defined by the server. |
| `items` | `object[] \| null` | No | A list of Zone resources. |
| `nextPageToken` | `string \| null` | No | \[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
| `kind` | `string \| null` | No | Output only. Type of resource. |
| `selfLink` | `string \| null` | No | Output only. \[Output Only] Server-defined URL for this resource. |
| `warning` | `object \| null` | No | \[Output Only] Informational warning message. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | number | null,
>   kind?: string | null,
>   region?: string | null,
>   creationTimestamp?: string | null,
>   selfLink?: string | null,
>   supportsPzs?: boolean | null,
>   description?: string | null,
>   resourceStatus?: {
>     upcomingMaintenances?: {
>       windowEndTime?: {
>         hours?: number | null,
>         day?: number | null,
>         month?: number | null,
>         minutes?: number | null,
>         timeZone?: {
>           id?: string | null,
>           version?: string | null
>         } | null,
>         nanos?: number | null,
>         utcOffset?: string | null,
>         year?: number | null,
>         seconds?: number | null
>       } | null,
>       subType?: string | null,
>       type?: string | null,
>       targetResource?: string | null,
>       windowStartTime?: {
>         hours?: number | null,
>         day?: number | null,
>         month?: number | null,
>         minutes?: number | null,
>         timeZone?: {
>           id?: string | null,
>           version?: string | null
>         } | null,
>         nanos?: number | null,
>         utcOffset?: string | null,
>         year?: number | null,
>         seconds?: number | null
>       } | null
>     }[] | null
>   } | null,
>   name?: string | null,
>   availableCpuPlatforms?: string[] | null,
>   deprecated?: {
>     replacement?: string | null,
>     state?: string | null,
>     deleted?: string | null,
>     deprecated?: string | null,
>     obsolete?: string | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

> [accordion] warning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   data?: {
>     value?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

***

## Functions

### locations.functions.abortFunctionUpgrade

`functions.locations.functions.abortFunctionUpgrade`

Aborts generation upgrade process for a function with the given name from the specified project. Deletes all 2nd Gen copy related configuration and resources which were created during the upgrade process

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.abortFunctionUpgrade({ name: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the function for which upgrade should be aborted. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `body` | `object` | No | Request for the `AbortFunctionUpgrade` method. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.commitFunctionUpgrade

`functions.locations.functions.commitFunctionUpgrade`

Finalizes the upgrade after which function upgrade can not be rolled back. This is the last step of the multi step process to upgrade 1st Gen functions to 2nd Gen

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.commitFunctionUpgrade({ name: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the function for which upgrade should be finalized. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `body` | `object` | No | Request for the `CommitFunctionUpgrade` method. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.commitFunctionUpgradeAsGen2

`functions.locations.functions.commitFunctionUpgradeAsGen2`

Commits a function upgrade from GCF Gen1 to GCF Gen2. This action deletes the Gen1 function, leaving the Gen2 function active and manageable by the GCFv2 API

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.commitFunctionUpgradeAsGen2({ name: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the function for which upgrade should be committed to Gen2. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `body` | `object` | No | Request for the `CommitFunctionUpgradeAsGen2` method. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.create

`functions.locations.functions.create`

Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.create({
	parent: 'projects/demo-project/locations/us-central1',
	functionId: 'resize-image',
	buildConfig: {
		runtime: 'nodejs24',
		entryPoint: 'resize',
		source: {
			storageSource: { bucket: 'demo-bucket', object: 'resize.zip' },
		},
	},
	serviceConfig: { availableMemory: '256M', timeoutSeconds: 60 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `functionId` | `string` | No | The ID to use for the function, which will become the final component of the function's resource name. This value should be 4-63 characters, and valid characters are /a-z-/. |
| `parent` | `string` | Yes | Required. The project and location in which the function should be created, specified in the format `projects/*/locations/*` Format: `projects/<id>/locations/<id>`. |
| `environment` | `ENVIRONMENT_UNSPECIFIED \| GEN_1 \| GEN_2` | No | Describe whether the function is 1st Gen or 2nd Gen. |
| `name` | `string` | No | A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*` |
| `eventTrigger` | `object` | No | Describes EventTrigger, used to request events to be sent from another service. |
| `serviceConfig` | `object` | No | Describes the Service being deployed. Currently Supported : Cloud Run (fully managed). |
| `labels` | `Record<string, string>` | No | Labels associated with this Cloud Function. |
| `kmsKeyName` | `string` | No | Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. |
| `buildConfig` | `object` | No | Describes the Build step of the function that builds a container from the given source. |
| `description` | `string` | No | User-provided description of a function. |

> [accordion] eventTrigger full type
>
> ```ts theme={null}
> {
>   triggerRegion?: string,
>   eventType?: string,
>   channel?: string,
>   service?: string,
>   eventFilters?: {
>     attribute?: string,
>     operator?: string,
>     value?: string
>   }[],
>   serviceAccountEmail?: string,
>   retryPolicy?: RETRY_POLICY_UNSPECIFIED | RETRY_POLICY_DO_NOT_RETRY | RETRY_POLICY_RETRY,
>   pubsubTopic?: string
> }
> ```

> [accordion] serviceConfig full type
>
> ```ts theme={null}
> {
>   vpcConnector?: string,
>   maxInstanceRequestConcurrency?: number,
>   maxInstanceCount?: number,
>   ingressSettings?: INGRESS_SETTINGS_UNSPECIFIED | ALLOW_ALL | ALLOW_INTERNAL_ONLY | ALLOW_INTERNAL_AND_GCLB,
>   binaryAuthorizationPolicy?: string,
>   directVpcNetworkInterface?: {
>     tags?: string[],
>     subnetwork?: string,
>     network?: string
>   }[],
>   environmentVariables?: Record<string, string>,
>   allTrafficOnLatestRevision?: boolean,
>   secretVolumes?: {
>     secret?: string,
>     mountPath?: string,
>     projectId?: string,
>     versions?: {
>       version?: string,
>       path?: string
>     }[]
>   }[],
>   securityLevel?: SECURITY_LEVEL_UNSPECIFIED | SECURE_ALWAYS | SECURE_OPTIONAL,
>   timeoutSeconds?: number,
>   vpcConnectorEgressSettings?: VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED | PRIVATE_RANGES_ONLY | ALL_TRAFFIC,
>   minInstanceCount?: number,
>   directVpcEgress?: DIRECT_VPC_EGRESS_UNSPECIFIED | VPC_EGRESS_PRIVATE_RANGES_ONLY | VPC_EGRESS_ALL_TRAFFIC,
>   availableMemory?: string,
>   serviceAccountEmail?: string,
>   availableCpu?: string,
>   secretEnvironmentVariables?: {
>     projectId?: string,
>     key?: string,
>     version?: string,
>     secret?: string
>   }[]
> }
> ```

> [accordion] buildConfig full type
>
> ```ts theme={null}
> {
>   onDeployUpdatePolicy?: {
>   },
>   entryPoint?: string,
>   serviceAccount?: string,
>   workerPool?: string,
>   automaticUpdatePolicy?: {
>   },
>   environmentVariables?: Record<string, string>,
>   dockerRepository?: string,
>   runtime?: string,
>   source?: {
>     gitUri?: string,
>     storageSource?: {
>       sourceUploadUrl?: string,
>       bucket?: string,
>       generation?: string | number,
>       object?: string
>     },
>     repoSource?: {
>       repoName?: string,
>       tagName?: string,
>       dir?: string,
>       commitSha?: string,
>       branchName?: string,
>       projectId?: string
>     }
>   },
>   sourceToken?: string,
>   dockerRegistry?: DOCKER_REGISTRY_UNSPECIFIED | CONTAINER_REGISTRY | ARTIFACT_REGISTRY
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.delete

`functions.locations.functions.delete`

Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.delete({ name: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the function which should be deleted. Format: `projects/<id>/locations/<id>/functions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.detachFunction

`functions.locations.functions.detachFunction`

Detaches 2nd Gen function to Cloud Run function

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.detachFunction({ name: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the function for which should be detached. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `body` | `object` | No | Request for the `DetachFunction` method. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.generateDownloadUrl

`functions.locations.functions.generateDownloadUrl`

Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.generateDownloadUrl({ name: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of function for which source code Google Cloud Storage signed URL should be generated. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `body` | `object` | No | Request of `GenerateDownloadUrl` method. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `downloadUrl` | `string \| null` | No | The generated Google Cloud Storage signed URL that should be used for function source code download. |

***

### locations.functions.generateUploadUrl

`functions.locations.functions.generateUploadUrl`

Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: [https://cloud.google.com/storage/docs/access-control/signed-urls](https://cloud.google.com/storage/docs/access-control/signed-urls)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.generateUploadUrl({ parent: 'projects/demo-project/locations/us-central1', environment: 'GEN_2' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`. Format: `projects/<id>/locations/<id>`. |
| `environment` | `ENVIRONMENT_UNSPECIFIED \| GEN_1 \| GEN_2` | No | The function environment the generated upload url will be used for. The upload url for 2nd Gen functions can also be used for 1st gen functions, but not vice versa. If not specified, 2nd generation-style upload URLs are generated. |
| `kmsKeyName` | `string` | No | Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function source code objects in intermediate Cloud Storage buckets. When you generate an upload url and upload your source code, it gets copied to an intermediate Cloud Storage bucket. The source code is then copied to a versioned directory in the sources bucket in the consumer project during the function deployment. It must match the pattern `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `storageSource` | `object \| null` | No | Location of the source in an archive file in Google Cloud Storage. |
| `uploadUrl` | `string \| null` | No | The generated Google Cloud Storage signed URL that should be used for a function source code upload. The uploaded file should be a zip archive which contains a function. |

> [accordion] storageSource full type
>
> ```ts theme={null}
> {
>   sourceUploadUrl?: string | null,
>   bucket?: string | null,
>   generation?: string | number | null,
>   object?: string | null
> } | null
> ```

***

### locations.functions.get

`functions.locations.functions.get`

Returns a function with the given name from the requested project

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.get({ name: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the function which details should be obtained. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `revision` | `string` | No | Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `environment` | `string \| null` | No | Describe whether the function is 1st Gen or 2nd Gen. |
| `name` | `string \| null` | No | A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*` |
| `state` | `string \| null` | No | Output only. State of the function. |
| `upgradeInfo` | `object \| null` | No | Information related to: \* A function's eligibility for 1st Gen to 2nd Gen migration. \* Current state of migration for function undergoing migration. |
| `eventTrigger` | `object \| null` | No | Describes EventTrigger, used to request events to be sent from another service. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. Reserved for future use. |
| `url` | `string \| null` | No | Output only. The deployed url for the function. |
| `serviceConfig` | `object \| null` | No | Describes the Service being deployed. Currently Supported : Cloud Run (fully managed). |
| `stateMessages` | `object[] \| null` | No | Output only. State Messages for this Cloud Function. |
| `labels` | `Record<string, string> \| null` | No | Labels associated with this Cloud Function. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of a Cloud Function. |
| `kmsKeyName` | `string \| null` | No | Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. |
| `createTime` | `string \| null` | No | Output only. The create timestamp of a Cloud Function. This is only applicable to 2nd Gen functions. |
| `buildConfig` | `object \| null` | No | Describes the Build step of the function that builds a container from the given source. |
| `description` | `string \| null` | No | User-provided description of a function. |

> [accordion] upgradeInfo full type
>
> ```ts theme={null}
> {
>   eventTrigger?: {
>     triggerRegion?: string | null,
>     eventType?: string | null,
>     trigger?: string | null,
>     channel?: string | null,
>     service?: string | null,
>     eventFilters?: {
>       attribute?: string | null,
>       operator?: string | null,
>       value?: string | null
>     }[] | null,
>     serviceAccountEmail?: string | null,
>     retryPolicy?: string | null,
>     pubsubTopic?: string | null
>   } | null,
>   buildConfig?: {
>     onDeployUpdatePolicy?: {
>       runtimeVersion?: string | null
>     } | null,
>     entryPoint?: string | null,
>     serviceAccount?: string | null,
>     workerPool?: string | null,
>     sourceProvenance?: {
>       resolvedRepoSource?: {
>         repoName?: string | null,
>         tagName?: string | null,
>         dir?: string | null,
>         commitSha?: string | null,
>         branchName?: string | null,
>         projectId?: string | null
>       } | null,
>       resolvedStorageSource?: {
>         sourceUploadUrl?: string | null,
>         bucket?: string | null,
>         generation?: string | number | null,
>         object?: string | null
>       } | null,
>       gitUri?: string | null
>     } | null,
>     automaticUpdatePolicy?: {
>     } | null,
>     build?: string | null,
>     environmentVariables?: Record<string, string> | null,
>     dockerRepository?: string | null,
>     runtime?: string | null,
>     source?: {
>       gitUri?: string | null,
>       storageSource?: {
>         sourceUploadUrl?: string | null,
>         bucket?: string | null,
>         generation?: string | number | null,
>         object?: string | null
>       } | null,
>       repoSource?: {
>         repoName?: string | null,
>         tagName?: string | null,
>         dir?: string | null,
>         commitSha?: string | null,
>         branchName?: string | null,
>         projectId?: string | null
>       } | null
>     } | null,
>     sourceToken?: string | null,
>     dockerRegistry?: string | null
>   } | null,
>   serviceConfig?: {
>     vpcConnector?: string | null,
>     maxInstanceRequestConcurrency?: number | null,
>     maxInstanceCount?: number | null,
>     ingressSettings?: string | null,
>     binaryAuthorizationPolicy?: string | null,
>     service?: string | null,
>     directVpcNetworkInterface?: {
>       tags?: string[] | null,
>       subnetwork?: string | null,
>       network?: string | null
>     }[] | null,
>     uri?: string | null,
>     environmentVariables?: Record<string, string> | null,
>     allTrafficOnLatestRevision?: boolean | null,
>     secretVolumes?: {
>       secret?: string | null,
>       mountPath?: string | null,
>       projectId?: string | null,
>       versions?: {
>         version?: string | null,
>         path?: string | null
>       }[] | null
>     }[] | null,
>     securityLevel?: string | null,
>     revision?: string | null,
>     timeoutSeconds?: number | null,
>     vpcConnectorEgressSettings?: string | null,
>     minInstanceCount?: number | null,
>     directVpcEgress?: string | null,
>     availableMemory?: string | null,
>     serviceAccountEmail?: string | null,
>     availableCpu?: string | null,
>     secretEnvironmentVariables?: {
>       projectId?: string | null,
>       key?: string | null,
>       version?: string | null,
>       secret?: string | null
>     }[] | null
>   } | null,
>   upgradeState?: string | null
> } | null
> ```

> [accordion] eventTrigger full type
>
> ```ts theme={null}
> {
>   triggerRegion?: string | null,
>   eventType?: string | null,
>   trigger?: string | null,
>   channel?: string | null,
>   service?: string | null,
>   eventFilters?: {
>     attribute?: string | null,
>     operator?: string | null,
>     value?: string | null
>   }[] | null,
>   serviceAccountEmail?: string | null,
>   retryPolicy?: string | null,
>   pubsubTopic?: string | null
> } | null
> ```

> [accordion] serviceConfig full type
>
> ```ts theme={null}
> {
>   vpcConnector?: string | null,
>   maxInstanceRequestConcurrency?: number | null,
>   maxInstanceCount?: number | null,
>   ingressSettings?: string | null,
>   binaryAuthorizationPolicy?: string | null,
>   service?: string | null,
>   directVpcNetworkInterface?: {
>     tags?: string[] | null,
>     subnetwork?: string | null,
>     network?: string | null
>   }[] | null,
>   uri?: string | null,
>   environmentVariables?: Record<string, string> | null,
>   allTrafficOnLatestRevision?: boolean | null,
>   secretVolumes?: {
>     secret?: string | null,
>     mountPath?: string | null,
>     projectId?: string | null,
>     versions?: {
>       version?: string | null,
>       path?: string | null
>     }[] | null
>   }[] | null,
>   securityLevel?: string | null,
>   revision?: string | null,
>   timeoutSeconds?: number | null,
>   vpcConnectorEgressSettings?: string | null,
>   minInstanceCount?: number | null,
>   directVpcEgress?: string | null,
>   availableMemory?: string | null,
>   serviceAccountEmail?: string | null,
>   availableCpu?: string | null,
>   secretEnvironmentVariables?: {
>     projectId?: string | null,
>     key?: string | null,
>     version?: string | null,
>     secret?: string | null
>   }[] | null
> } | null
> ```

> [accordion] stateMessages full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   message?: string | null,
>   severity?: string | null
> }[] | null
> ```

> [accordion] buildConfig full type
>
> ```ts theme={null}
> {
>   onDeployUpdatePolicy?: {
>     runtimeVersion?: string | null
>   } | null,
>   entryPoint?: string | null,
>   serviceAccount?: string | null,
>   workerPool?: string | null,
>   sourceProvenance?: {
>     resolvedRepoSource?: {
>       repoName?: string | null,
>       tagName?: string | null,
>       dir?: string | null,
>       commitSha?: string | null,
>       branchName?: string | null,
>       projectId?: string | null
>     } | null,
>     resolvedStorageSource?: {
>       sourceUploadUrl?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null,
>       object?: string | null
>     } | null,
>     gitUri?: string | null
>   } | null,
>   automaticUpdatePolicy?: {
>   } | null,
>   build?: string | null,
>   environmentVariables?: Record<string, string> | null,
>   dockerRepository?: string | null,
>   runtime?: string | null,
>   source?: {
>     gitUri?: string | null,
>     storageSource?: {
>       sourceUploadUrl?: string | null,
>       bucket?: string | null,
>       generation?: string | number | null,
>       object?: string | null
>     } | null,
>     repoSource?: {
>       repoName?: string | null,
>       tagName?: string | null,
>       dir?: string | null,
>       commitSha?: string | null,
>       branchName?: string | null,
>       projectId?: string | null
>     } | null
>   } | null,
>   sourceToken?: string | null,
>   dockerRegistry?: string | null
> } | null
> ```

***

### locations.functions.getIamPolicy

`functions.locations.functions.getIamPolicy`

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.getIamPolicy({ resource: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/functions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     expression?: string | null,
>     location?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

***

### locations.functions.list

`functions.locations.functions.list`

Returns a list of functions that belong to the requested project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of data. |
| `filter` | `string` | No | The filter for Functions that match the filter expression, following the syntax outlined in [https://google.aip.dev/160](https://google.aip.dev/160). |
| `orderBy` | `string` | No | The sorting order of the resources returned. Value should be a comma separated list of fields. The default sorting order is ascending. See [https://google.aip.dev/132#ordering](https://google.aip.dev/132#ordering). |
| `pageSize` | `number` | No | Maximum number of functions to return per call. The largest allowed page\_size is 1,000, if the page\_size is omitted or specified as greater than 1,000 then it will be replaced as 1,000. The size of the list response can be less than specified when used with filters. |
| `parent` | `string` | Yes | Required. The project and location from which the function should be listed, specified in the format `projects/*/locations/*` If you want to list functions in all locations, use "-" in place of a location. When listing functions in all locations, if one or more location(s) are unreachable, the response will contain functions from all reachable locations along with the names of any unreachable locations. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `functions` | `object[] \| null` | No | The functions that match the request. |
| `unreachable` | `string[] \| null` | No | Locations that could not be reached. The response does not include any functions from these locations. |

> [accordion] functions full type
>
> ```ts theme={null}
> {
>   environment?: string | null,
>   name?: string | null,
>   state?: string | null,
>   upgradeInfo?: {
>     eventTrigger?: {
>       triggerRegion?: string | null,
>       eventType?: string | null,
>       trigger?: string | null,
>       channel?: string | null,
>       service?: string | null,
>       eventFilters?: {
>         attribute?: string | null,
>         operator?: string | null,
>         value?: string | null
>       }[] | null,
>       serviceAccountEmail?: string | null,
>       retryPolicy?: string | null,
>       pubsubTopic?: string | null
>     } | null,
>     buildConfig?: {
>       onDeployUpdatePolicy?: {
>         runtimeVersion?: string | null
>       } | null,
>       entryPoint?: string | null,
>       serviceAccount?: string | null,
>       workerPool?: string | null,
>       sourceProvenance?: {
>         resolvedRepoSource?: {
>           repoName?: string | null,
>           tagName?: string | null,
>           dir?: string | null,
>           commitSha?: string | null,
>           branchName?: string | null,
>           projectId?: string | null
>         } | null,
>         resolvedStorageSource?: {
>           sourceUploadUrl?: string | null,
>           bucket?: string | null,
>           generation?: string | number | null,
>           object?: string | null
>         } | null,
>         gitUri?: string | null
>       } | null,
>       automaticUpdatePolicy?: {
>       } | null,
>       build?: string | null,
>       environmentVariables?: Record<string, string> | null,
>       dockerRepository?: string | null,
>       runtime?: string | null,
>       source?: {
>         gitUri?: string | null,
>         storageSource?: {
>           sourceUploadUrl?: string | null,
>           bucket?: string | null,
>           generation?: string | number | null,
>           object?: string | null
>         } | null,
>         repoSource?: {
>           repoName?: string | null,
>           tagName?: string | null,
>           dir?: string | null,
>           commitSha?: string | null,
>           branchName?: string | null,
>           projectId?: string | null
>         } | null
>       } | null,
>       sourceToken?: string | null,
>       dockerRegistry?: string | null
>     } | null,
>     serviceConfig?: {
>       vpcConnector?: string | null,
>       maxInstanceRequestConcurrency?: number | null,
>       maxInstanceCount?: number | null,
>       ingressSettings?: string | null,
>       binaryAuthorizationPolicy?: string | null,
>       service?: string | null,
>       directVpcNetworkInterface?: {
>         tags?: string[] | null,
>         subnetwork?: string | null,
>         network?: string | null
>       }[] | null,
>       uri?: string | null,
>       environmentVariables?: Record<string, string> | null,
>       allTrafficOnLatestRevision?: boolean | null,
>       secretVolumes?: {
>         secret?: string | null,
>         mountPath?: string | null,
>         projectId?: string | null,
>         versions?: {
>           version?: string | null,
>           path?: string | null
>         }[] | null
>       }[] | null,
>       securityLevel?: string | null,
>       revision?: string | null,
>       timeoutSeconds?: number | null,
>       vpcConnectorEgressSettings?: string | null,
>       minInstanceCount?: number | null,
>       directVpcEgress?: string | null,
>       availableMemory?: string | null,
>       serviceAccountEmail?: string | null,
>       availableCpu?: string | null,
>       secretEnvironmentVariables?: {
>         projectId?: string | null,
>         key?: string | null,
>         version?: string | null,
>         secret?: string | null
>       }[] | null
>     } | null,
>     upgradeState?: string | null
>   } | null,
>   eventTrigger?: {
>     triggerRegion?: string | null,
>     eventType?: string | null,
>     trigger?: string | null,
>     channel?: string | null,
>     service?: string | null,
>     eventFilters?: {
>       attribute?: string | null,
>       operator?: string | null,
>       value?: string | null
>     }[] | null,
>     serviceAccountEmail?: string | null,
>     retryPolicy?: string | null,
>     pubsubTopic?: string | null
>   } | null,
>   satisfiesPzs?: boolean | null,
>   satisfiesPzi?: boolean | null,
>   url?: string | null,
>   serviceConfig?: {
>     vpcConnector?: string | null,
>     maxInstanceRequestConcurrency?: number | null,
>     maxInstanceCount?: number | null,
>     ingressSettings?: string | null,
>     binaryAuthorizationPolicy?: string | null,
>     service?: string | null,
>     directVpcNetworkInterface?: {
>       tags?: string[] | null,
>       subnetwork?: string | null,
>       network?: string | null
>     }[] | null,
>     uri?: string | null,
>     environmentVariables?: Record<string, string> | null,
>     allTrafficOnLatestRevision?: boolean | null,
>     secretVolumes?: {
>       secret?: string | null,
>       mountPath?: string | null,
>       projectId?: string | null,
>       versions?: {
>         version?: string | null,
>         path?: string | null
>       }[] | null
>     }[] | null,
>     securityLevel?: string | null,
>     revision?: string | null,
>     timeoutSeconds?: number | null,
>     vpcConnectorEgressSettings?: string | null,
>     minInstanceCount?: number | null,
>     directVpcEgress?: string | null,
>     availableMemory?: string | null,
>     serviceAccountEmail?: string | null,
>     availableCpu?: string | null,
>     secretEnvironmentVariables?: {
>       projectId?: string | null,
>       key?: string | null,
>       version?: string | null,
>       secret?: string | null
>     }[] | null
>   } | null,
>   stateMessages?: {
>     type?: string | null,
>     message?: string | null,
>     severity?: string | null
>   }[] | null,
>   labels?: Record<string, string> | null,
>   updateTime?: string | null,
>   kmsKeyName?: string | null,
>   createTime?: string | null,
>   buildConfig?: {
>     onDeployUpdatePolicy?: {
>       runtimeVersion?: string | null
>     } | null,
>     entryPoint?: string | null,
>     serviceAccount?: string | null,
>     workerPool?: string | null,
>     sourceProvenance?: {
>       resolvedRepoSource?: {
>         repoName?: string | null,
>         tagName?: string | null,
>         dir?: string | null,
>         commitSha?: string | null,
>         branchName?: string | null,
>         projectId?: string | null
>       } | null,
>       resolvedStorageSource?: {
>         sourceUploadUrl?: string | null,
>         bucket?: string | null,
>         generation?: string | number | null,
>         object?: string | null
>       } | null,
>       gitUri?: string | null
>     } | null,
>     automaticUpdatePolicy?: {
>     } | null,
>     build?: string | null,
>     environmentVariables?: Record<string, string> | null,
>     dockerRepository?: string | null,
>     runtime?: string | null,
>     source?: {
>       gitUri?: string | null,
>       storageSource?: {
>         sourceUploadUrl?: string | null,
>         bucket?: string | null,
>         generation?: string | number | null,
>         object?: string | null
>       } | null,
>       repoSource?: {
>         repoName?: string | null,
>         tagName?: string | null,
>         dir?: string | null,
>         commitSha?: string | null,
>         branchName?: string | null,
>         projectId?: string | null
>       } | null
>     } | null,
>     sourceToken?: string | null,
>     dockerRegistry?: string | null
>   } | null,
>   description?: string | null
> }[] | null
> ```

***

### locations.functions.patch

`functions.locations.functions.patch`

Updates existing function

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.patch({ name: 'projects/demo-project/locations/us-central1/functions/resize-image', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | The list of fields to be updated. If no field mask is provided, all fields will be updated. |
| `name` | `string` | Yes | A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*` Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `environment` | `ENVIRONMENT_UNSPECIFIED \| GEN_1 \| GEN_2` | No | Describe whether the function is 1st Gen or 2nd Gen. |
| `body_name` | `string` | No | A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*` |
| `eventTrigger` | `object` | No | Describes EventTrigger, used to request events to be sent from another service. |
| `serviceConfig` | `object` | No | Describes the Service being deployed. Currently Supported : Cloud Run (fully managed). |
| `labels` | `Record<string, string>` | No | Labels associated with this Cloud Function. |
| `kmsKeyName` | `string` | No | Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. |
| `buildConfig` | `object` | No | Describes the Build step of the function that builds a container from the given source. |
| `description` | `string` | No | User-provided description of a function. |

> [accordion] eventTrigger full type
>
> ```ts theme={null}
> {
>   triggerRegion?: string,
>   eventType?: string,
>   channel?: string,
>   service?: string,
>   eventFilters?: {
>     attribute?: string,
>     operator?: string,
>     value?: string
>   }[],
>   serviceAccountEmail?: string,
>   retryPolicy?: RETRY_POLICY_UNSPECIFIED | RETRY_POLICY_DO_NOT_RETRY | RETRY_POLICY_RETRY,
>   pubsubTopic?: string
> }
> ```

> [accordion] serviceConfig full type
>
> ```ts theme={null}
> {
>   vpcConnector?: string,
>   maxInstanceRequestConcurrency?: number,
>   maxInstanceCount?: number,
>   ingressSettings?: INGRESS_SETTINGS_UNSPECIFIED | ALLOW_ALL | ALLOW_INTERNAL_ONLY | ALLOW_INTERNAL_AND_GCLB,
>   binaryAuthorizationPolicy?: string,
>   directVpcNetworkInterface?: {
>     tags?: string[],
>     subnetwork?: string,
>     network?: string
>   }[],
>   environmentVariables?: Record<string, string>,
>   allTrafficOnLatestRevision?: boolean,
>   secretVolumes?: {
>     secret?: string,
>     mountPath?: string,
>     projectId?: string,
>     versions?: {
>       version?: string,
>       path?: string
>     }[]
>   }[],
>   securityLevel?: SECURITY_LEVEL_UNSPECIFIED | SECURE_ALWAYS | SECURE_OPTIONAL,
>   timeoutSeconds?: number,
>   vpcConnectorEgressSettings?: VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED | PRIVATE_RANGES_ONLY | ALL_TRAFFIC,
>   minInstanceCount?: number,
>   directVpcEgress?: DIRECT_VPC_EGRESS_UNSPECIFIED | VPC_EGRESS_PRIVATE_RANGES_ONLY | VPC_EGRESS_ALL_TRAFFIC,
>   availableMemory?: string,
>   serviceAccountEmail?: string,
>   availableCpu?: string,
>   secretEnvironmentVariables?: {
>     projectId?: string,
>     key?: string,
>     version?: string,
>     secret?: string
>   }[]
> }
> ```

> [accordion] buildConfig full type
>
> ```ts theme={null}
> {
>   onDeployUpdatePolicy?: {
>   },
>   entryPoint?: string,
>   serviceAccount?: string,
>   workerPool?: string,
>   automaticUpdatePolicy?: {
>   },
>   environmentVariables?: Record<string, string>,
>   dockerRepository?: string,
>   runtime?: string,
>   source?: {
>     gitUri?: string,
>     storageSource?: {
>       sourceUploadUrl?: string,
>       bucket?: string,
>       generation?: string | number,
>       object?: string
>     },
>     repoSource?: {
>       repoName?: string,
>       tagName?: string,
>       dir?: string,
>       commitSha?: string,
>       branchName?: string,
>       projectId?: string
>     }
>   },
>   sourceToken?: string,
>   dockerRegistry?: DOCKER_REGISTRY_UNSPECIFIED | CONTAINER_REGISTRY | ARTIFACT_REGISTRY
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.redirectFunctionUpgradeTraffic

`functions.locations.functions.redirectFunctionUpgradeTraffic`

Changes the traffic target of a function from the original 1st Gen function to the 2nd Gen copy. This is the second step of the multi step process to upgrade 1st Gen functions to 2nd Gen

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.redirectFunctionUpgradeTraffic({ name: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the function for which traffic target should be changed to 2nd Gen from 1st Gen. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `body` | `object` | No | Request for the `RedirectFunctionUpgradeTraffic` method. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.rollbackFunctionUpgradeTraffic

`functions.locations.functions.rollbackFunctionUpgradeTraffic`

Reverts the traffic target of a function from the 2nd Gen copy to the original 1st Gen function. After this operation, all new traffic would be served by the 1st Gen

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.rollbackFunctionUpgradeTraffic({ name: 'projects/demo-project/locations/us-central1/functions/resize-image' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the function for which traffic target should be changed back to 1st Gen from 2nd Gen. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `body` | `object` | No | Request for the `RollbackFunctionUpgradeTraffic` method. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.setIamPolicy

`functions.locations.functions.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.setIamPolicy({
	resource: 'projects/demo-project/locations/us-central1/functions/resize-image',
	policy: {
		bindings: [{
			role: 'roles/cloudfunctions.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   bindings?: {
>     role?: string,
>     condition?: {
>       expression?: string,
>       location?: string,
>       description?: string,
>       title?: string
>     },
>     members?: string[]
>   }[],
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   etag?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     expression?: string | null,
>     location?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

***

### locations.functions.setupFunctionUpgradeConfig

`functions.locations.functions.setupFunctionUpgradeConfig`

Creates a 2nd Gen copy of the function configuration based on the 1st Gen function with the given name. This is the first step of the multi step process to upgrade 1st Gen functions to 2nd Gen

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.setupFunctionUpgradeConfig({ name: 'projects/demo-project/locations/us-central1/functions/resize-image', triggerServiceAccount: 'deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the function which should have configuration copied for upgrade. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `triggerServiceAccount` | `string` | No | Optional. The trigger's service account. The service account must have permission to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the Compute Engine default service account: `{project_number}-compute@developer.gserviceaccount.com`. |
| `buildConfigOverrides` | `object` | No | Contains overrides related to the function's build configuration. |
| `serviceConfigOverrides` | `object` | No | Contains overrides related to the function's service configuration. |

> [accordion] buildConfigOverrides full type
>
> ```ts theme={null}
> {
>   runtime?: string
> }
> ```

> [accordion] serviceConfigOverrides full type
>
> ```ts theme={null}
> {
>   maxInstanceCount?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.functions.testIamPermissions

`functions.locations.functions.testIamPermissions`

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.functions.testIamPermissions({
	resource: 'projects/demo-project/locations/us-central1/functions/resize-image',
	permissions: ['cloudfunctions.functions.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/functions/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### locations.list

`functions.locations.list`

Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: \* **Global locations**: If `name` is empty, the method lists the public locations available to all projects. \* **Project-specific locations**: If `name` follows the format `projects/{project}`, the method lists locations... (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource that owns the locations collection, if applicable. Format: `projects/<id>`. |
| `extraLocationTypes` | `string[]` | No | Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage. |
| `pageSize` | `number` | No | The maximum number of results to return. If not set, the service selects a default. |
| `filter` | `string` | No | A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). |
| `pageToken` | `string` | No | A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `locations` | `object[] \| null` | No | A list of locations that matches the specified filter in the request. |

> [accordion] locations full type
>
> ```ts theme={null}
> {
>   locationId?: string | null,
>   name?: string | null,
>   labels?: Record<string, string> | null,
>   displayName?: string | null,
>   metadata?: Record<string, any> | null
> }[] | null
> ```

***

### locations.operations.get

`functions.locations.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.operations.get({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### locations.operations.list

`functions.locations.operations.list`

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.operations.list({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | The standard list filter. |
| `pageToken` | `string` | No | The standard list page token. |
| `returnPartialSuccess` | `boolean` | No | When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation. |
| `pageSize` | `number` | No | The standard list page size. |
| `name` | `string` | Yes | The name of the operation's parent resource. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `unreachable` | `string[] \| null` | No | Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   metadata?: Record<string, any> | null,
>   error?: {
>     message?: string | null,
>     details?: Record<string, any>[] | null,
>     code?: number | null
>   } | null,
>   response?: Record<string, any> | null,
>   done?: boolean | null
> }[] | null
> ```

***

### locations.runtimes.list

`functions.locations.runtimes.list`

Returns a list of runtimes that are supported for the requested project

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.functions.locations.runtimes.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project and location from which the runtimes should be listed, specified in the format `projects/*/locations/*` Format: `projects/<id>/locations/<id>`. |
| `filter` | `string` | No | The filter for Runtimes that match the filter expression, following the syntax outlined in [https://google.aip.dev/160](https://google.aip.dev/160). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `runtimes` | `object[] \| null` | No | The runtimes that match the request. |

> [accordion] runtimes full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   decommissionDate?: {
>     month?: number | null,
>     year?: number | null,
>     day?: number | null
>   } | null,
>   environment?: string | null,
>   stage?: string | null,
>   name?: string | null,
>   deprecationDate?: {
>     month?: number | null,
>     year?: number | null,
>     day?: number | null
>   } | null,
>   warnings?: string[] | null
> }[] | null
> ```

***

## Iam

### iamPolicies.lintPolicy

`iam.iamPolicies.lintPolicy`

Lints, or validates, an IAM policy. Currently checks the google.iam.v1.Binding.condition field, which contains a condition expression for a role binding

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.iamPolicies.lintPolicy({
	fullResourceName: '//cloudresourcemanager.googleapis.com/projects/demo-project',
	condition: { title: 'until-2027', expression: 'request.time < timestamp("2027-01-01T00:00:00Z")' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `condition` | `object` | No | Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at [https://github.com/google/cel-spec](https://github.com/google/cel-spec). |
| `fullResourceName` | `string` | No | The full resource name of the policy this lint request is about. The name follows the Google Cloud format for full resource names. For example, a Google Cloud project with ID `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`. The resource name is not used to read a policy from IAM. Only the data in the request object is linted. |

> [accordion] condition full type
>
> ```ts theme={null}
> {
>   expression?: string,
>   title?: string,
>   location?: string,
>   description?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `lintResults` | `object[] \| null` | No | List of lint results sorted by `severity` in descending order. |

> [accordion] lintResults full type
>
> ```ts theme={null}
> {
>   fieldName?: string | null,
>   validationUnitName?: string | null,
>   debugMessage?: string | null,
>   level?: string | null,
>   locationOffset?: number | null,
>   severity?: string | null
> }[] | null
> ```

***

### iamPolicies.queryAuditableServices

`iam.iamPolicies.queryAuditableServices`

Returns a list of services that allow you to opt into audit logs that are not generated by default. To learn more about audit logs, see the [Logging documentation](https://cloud.google.com/logging/docs/audit)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.iamPolicies.queryAuditableServices({ fullResourceName: '//cloudresourcemanager.googleapis.com/projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fullResourceName` | `string` | No | Required. The full resource name to query from the list of auditable services. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `services` | `object[] \| null` | No | The auditable services for a resource. |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.addAttestationRule

`iam.locations.workloadIdentityPools.addAttestationRule`

Add an AttestationRule on a WorkloadIdentityPoolManagedIdentity. The total attestation rules after addition must not exceed 50

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.addAttestationRule({
	resource: 'projects/demo-project/locations/global/workloadIdentityPools/github',
	attestationRule: { googleCloudResource: '//run.googleapis.com/projects/123456789012/type/Service/*' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Required. The resource name of the managed identity or namespace resource to add an attestation rule to. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `attestationRule` | `object` | No | Defines which workloads can receive an identity within a pool. When an AttestationRule is defined under a managed identity, matching workloads may receive that identity. |

> [accordion] attestationRule full type
>
> ```ts theme={null}
> {
>   googleCloudResource?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.create

`iam.locations.workloadIdentityPools.create`

Creates a new WorkloadIdentityPool. You cannot reuse the name of a deleted pool until 30 days after deletion

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.create({ parent: 'projects/demo-project/locations/global', workloadIdentityPoolId: 'github', displayName: 'GitHub Actions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource to create the pool in. The only supported location is `global`. Format: `projects/<id>/locations/<id>`. |
| `workloadIdentityPoolId` | `string` | No | Required. The ID to use for the pool, which becomes the final component of the resource name. This value should be 4-32 characters, and may contain the characters \[a-z0-9-]. The prefix `gcp-` is reserved for use by Google, and may not be specified. |
| `displayName` | `string` | No | Optional. A display name for the pool. Cannot exceed 32 characters. |
| `inlineCertificateIssuanceConfig` | `object` | No | Represents configuration for generating mutual TLS (mTLS) certificates for the identities within this pool. |
| `disabled` | `boolean` | No | Optional. Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again. |
| `description` | `string` | No | Optional. A description of the pool. Cannot exceed 256 characters. |
| `name` | `string` | No | Identifier. The resource name of the pool. |
| `mode` | `MODE_UNSPECIFIED \| FEDERATION_ONLY \| TRUST_DOMAIN \| SYSTEM_TRUST_DOMAIN` | No | Immutable. The mode the pool is operating in. |
| `inlineTrustConfig` | `object` | No | Defines configuration for extending trust to additional trust domains. By establishing trust with another domain, the current domain will recognize and accept certificates issued by entities within the trusted domains. Note that a trust domain automatically trusts itself, eliminating the need for explicit configuration. |

> [accordion] inlineCertificateIssuanceConfig full type
>
> ```ts theme={null}
> {
>   caPools?: Record<string, string>,
>   keyAlgorithm?: KEY_ALGORITHM_UNSPECIFIED | RSA_2048 | RSA_3072 | RSA_4096 | ECDSA_P256 | ECDSA_P384,
>   useDefaultSharedCa?: boolean,
>   rotationWindowPercentage?: number,
>   lifetime?: string
> }
> ```

> [accordion] inlineTrustConfig full type
>
> ```ts theme={null}
> {
>   additionalTrustBundles?: Record<string, {
>     intermediateCas?: {
>       pemCertificate?: string
>     }[],
>     trustAnchors?: {
>       pemCertificate?: string
>     }[],
>     trustDefaultSharedCa?: boolean
>   }>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.delete

`iam.locations.workloadIdentityPools.delete`

Deletes a WorkloadIdentityPool. You cannot use a deleted pool to exchange external credentials for Google Cloud credentials

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.delete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the pool to delete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.get

`iam.locations.workloadIdentityPools.get`

Gets an individual WorkloadIdentityPool

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the pool to retrieve. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. A display name for the pool. Cannot exceed 32 characters. |
| `inlineCertificateIssuanceConfig` | `object \| null` | No | Represents configuration for generating mutual TLS (mTLS) certificates for the identities within this pool. |
| `disabled` | `boolean \| null` | No | Optional. Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again. |
| `expireTime` | `string \| null` | No | Output only. Time after which the workload identity pool will be permanently purged and cannot be recovered. |
| `description` | `string \| null` | No | Optional. A description of the pool. Cannot exceed 256 characters. |
| `name` | `string \| null` | No | Identifier. The resource name of the pool. |
| `mode` | `string \| null` | No | Immutable. The mode the pool is operating in. |
| `state` | `string \| null` | No | Output only. The state of the pool. |
| `inlineTrustConfig` | `object \| null` | No | Defines configuration for extending trust to additional trust domains. By establishing trust with another domain, the current domain will recognize and accept certificates issued by entities within the trusted domains. Note that a trust domain automatically trusts itself, eliminating the need for explicit configuration. |

> [accordion] inlineCertificateIssuanceConfig full type
>
> ```ts theme={null}
> {
>   caPools?: Record<string, string> | null,
>   keyAlgorithm?: string | null,
>   useDefaultSharedCa?: boolean | null,
>   rotationWindowPercentage?: number | null,
>   lifetime?: string | null
> } | null
> ```

> [accordion] inlineTrustConfig full type
>
> ```ts theme={null}
> {
>   additionalTrustBundles?: Record<string, {
>     intermediateCas?: {
>       pemCertificate?: string | null
>     }[] | null,
>     trustAnchors?: {
>       pemCertificate?: string | null
>     }[] | null,
>     trustDefaultSharedCa?: boolean | null
>   }> | null
> } | null
> ```

***

### locations.workloadIdentityPools.getIamPolicy

`iam.locations.workloadIdentityPools.getIamPolicy`

Gets the IAM policy of a WorkloadIdentityPool

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.getIamPolicy({ resource: 'projects/demo-project/locations/global/workloadIdentityPools/github' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `options` | `object` | No | Encapsulates settings provided to GetIamPolicy. |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   requestedPolicyVersion?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     title?: string | null,
>     location?: string | null,
>     description?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.list

`iam.locations.workloadIdentityPools.list`

Lists all non-deleted WorkloadIdentityPools in a project. If `show_deleted` is set to `true`, then deleted pools are also listed (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.list({ parent: 'projects/demo-project/locations/global' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `showDeleted` | `boolean` | No | Whether to return soft-deleted pools. |
| `parent` | `string` | Yes | Required. The parent resource to list pools for. Format: `projects/<id>/locations/<id>`. |
| `pageToken` | `string` | No | A page token, received from a previous `ListWorkloadIdentityPools` call. Provide this to retrieve the subsequent page. |
| `pageSize` | `number` | No | The maximum number of pools to return. If unspecified, at most 50 pools are returned. The maximum value is 1000; values above are 1000 truncated to 1000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `workloadIdentityPools` | `object[] \| null` | No | A list of pools. |

> [accordion] workloadIdentityPools full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   inlineCertificateIssuanceConfig?: {
>     caPools?: Record<string, string> | null,
>     keyAlgorithm?: string | null,
>     useDefaultSharedCa?: boolean | null,
>     rotationWindowPercentage?: number | null,
>     lifetime?: string | null
>   } | null,
>   disabled?: boolean | null,
>   expireTime?: string | null,
>   description?: string | null,
>   name?: string | null,
>   mode?: string | null,
>   state?: string | null,
>   inlineTrustConfig?: {
>     additionalTrustBundles?: Record<string, {
>       intermediateCas?: {
>         pemCertificate?: string | null
>       }[] | null,
>       trustAnchors?: {
>         pemCertificate?: string | null
>       }[] | null,
>       trustDefaultSharedCa?: boolean | null
>     }> | null
>   } | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.listAttestationRules

`iam.locations.workloadIdentityPools.listAttestationRules`

List all AttestationRule on a WorkloadIdentityPoolManagedIdentity (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.listAttestationRules({ resource: 'projects/demo-project/locations/global/workloadIdentityPools/github' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. A page token, received from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to retrieve the subsequent page. |
| `filter` | `string` | No | Optional. A query filter. Supports the following function: \* `container_ids()`: Returns only the AttestationRules under the specific container ids. The function expects a comma-delimited list with only project numbers and must use the format `projects/`. For example: `container_ids(projects/, projects/,...)`. |
| `resource` | `string` | Yes | Required. The resource name of the managed identity or namespace resource to list attestation rules of. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `pageSize` | `number` | No | Optional. The maximum number of AttestationRules to return. If unspecified, at most 50 AttestationRules are returned. The maximum value is 100; values above 100 are truncated to 100. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attestationRules` | `object[] \| null` | No | A list of AttestationRules. |
| `nextPageToken` | `string \| null` | No | Optional. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

> [accordion] attestationRules full type
>
> ```ts theme={null}
> {
>   googleCloudResource?: string | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.namespaces.create

`iam.locations.workloadIdentityPools.namespaces.create`

Creates a new WorkloadIdentityPoolNamespace in a WorkloadIdentityPool

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.create({ parent: 'projects/demo-project/locations/global/workloadIdentityPools/github', workloadIdentityPoolNamespaceId: 'ns-1', description: 'Production workloads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource to create the namespace in. The only supported location is `global`. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `workloadIdentityPoolNamespaceId` | `string` | No | Required. The ID to use for the namespace. This value must: \* contain at most 63 characters \* contain only lowercase alphanumeric characters or `-` \* start with an alphanumeric character \* end with an alphanumeric character The prefix "gcp-" will be reserved for future uses. |
| `disabled` | `boolean` | No | Optional. Whether the namespace is disabled. If disabled, credentials may no longer be issued for identities within this namespace, however existing credentials will still be accepted until they expire. |
| `name` | `string` | No | Identifier. The resource name of the namespace. |
| `description` | `string` | No | Optional. A description of the namespace. Cannot exceed 256 characters. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.delete

`iam.locations.workloadIdentityPools.namespaces.delete`

Deletes a WorkloadIdentityPoolNamespace. You can undelete a namespace for 30 days

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.delete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the namespace to delete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.get

`iam.locations.workloadIdentityPools.namespaces.get`

Gets an individual WorkloadIdentityPoolNamespace

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the namespace to retrieve. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Output only. The state of the namespace. |
| `disabled` | `boolean \| null` | No | Optional. Whether the namespace is disabled. If disabled, credentials may no longer be issued for identities within this namespace, however existing credentials will still be accepted until they expire. |
| `name` | `string \| null` | No | Identifier. The resource name of the namespace. |
| `expireTime` | `string \| null` | No | Output only. Time after which the namespace will be permanently purged and cannot be recovered. |
| `description` | `string \| null` | No | Optional. A description of the namespace. Cannot exceed 256 characters. |
| `ownerService` | `object \| null` | No | The Google Cloud service that owns this namespace. |

> [accordion] ownerService full type
>
> ```ts theme={null}
> {
>   principalSubject?: string | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.list

`iam.locations.workloadIdentityPools.namespaces.list`

Lists all non-deleted WorkloadIdentityPoolNamespaces in a workload identity pool. If `show_deleted` is set to `true`, then deleted namespaces are also listed (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.list({ parent: 'projects/demo-project/locations/global/workloadIdentityPools/github' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of namespaces to return. If unspecified, at most 50 namespaces are returned. The maximum value is 1000; values above are 1000 truncated to 1000. |
| `showDeleted` | `boolean` | No | Whether to return soft-deleted namespaces. |
| `pageToken` | `string` | No | A page token, received from a previous `ListWorkloadIdentityPoolNamespaces` call. Provide this to retrieve the subsequent page. |
| `parent` | `string` | Yes | Required. The parent resource to list namespaces for. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `workloadIdentityPoolNamespaces` | `object[] \| null` | No | A list of namespaces. |

> [accordion] workloadIdentityPoolNamespaces full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   disabled?: boolean | null,
>   name?: string | null,
>   expireTime?: string | null,
>   description?: string | null,
>   ownerService?: {
>     principalSubject?: string | null
>   } | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.addAttestationRule

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.addAttestationRule`

Add an AttestationRule on a WorkloadIdentityPoolManagedIdentity. The total attestation rules after addition must not exceed 50

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.addAttestationRule({
	resource: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1',
	attestationRule: { googleCloudResource: '//run.googleapis.com/projects/123456789012/type/Service/*' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Required. The resource name of the managed identity or namespace resource to add an attestation rule to. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>`. |
| `attestationRule` | `object` | No | Defines which workloads can receive an identity within a pool. When an AttestationRule is defined under a managed identity, matching workloads may receive that identity. |

> [accordion] attestationRule full type
>
> ```ts theme={null}
> {
>   googleCloudResource?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.create

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.create`

Creates a new WorkloadIdentityPoolManagedIdentity in a WorkloadIdentityPoolNamespace

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.create({ parent: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1', workloadIdentityPoolManagedIdentityId: 'api', description: 'API service' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource to create the manage identity in. The only supported location is `global`. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>`. |
| `workloadIdentityPoolManagedIdentityId` | `string` | No | Required. The ID to use for the managed identity. This value must: \* contain at most 63 characters \* contain only lowercase alphanumeric characters or `-` \* start with an alphanumeric character \* end with an alphanumeric character The prefix "gcp-" will be reserved for future uses. |
| `description` | `string` | No | Optional. A description of the managed identity. Cannot exceed 256 characters. |
| `disabled` | `boolean` | No | Optional. Whether the managed identity is disabled. If disabled, credentials may no longer be issued for the identity, however existing credentials will still be accepted until they expire. |
| `name` | `string` | No | Identifier. The resource name of the managed identity. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.delete

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.delete`

Deletes a WorkloadIdentityPoolManagedIdentity. You can undelete a managed identity for 30 days

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.delete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the managed identity to delete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.get

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.get`

Gets an individual WorkloadIdentityPoolManagedIdentity

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the managed identity to retrieve. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | Optional. A description of the managed identity. Cannot exceed 256 characters. |
| `expireTime` | `string \| null` | No | Output only. Time after which the managed identity will be permanently purged and cannot be recovered. |
| `disabled` | `boolean \| null` | No | Optional. Whether the managed identity is disabled. If disabled, credentials may no longer be issued for the identity, however existing credentials will still be accepted until they expire. |
| `state` | `string \| null` | No | Output only. The state of the managed identity. |
| `name` | `string \| null` | No | Identifier. The resource name of the managed identity. |

***

### locations.workloadIdentityPools.namespaces.managedIdentities.list

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.list`

Lists all non-deleted WorkloadIdentityPoolManagedIdentitys in a namespace. If `show_deleted` is set to `true`, then deleted managed identities are also listed (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.list({ parent: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of managed identities to return. If unspecified, at most 50 managed identities are returned. The maximum value is 1000; values above are 1000 truncated to 1000. |
| `parent` | `string` | Yes | Required. The parent resource to list managed identities for. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>`. |
| `showDeleted` | `boolean` | No | Whether to return soft-deleted managed identities. |
| `pageToken` | `string` | No | A page token, received from a previous `ListWorkloadIdentityPoolManagedIdentities` call. Provide this to retrieve the subsequent page. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `workloadIdentityPoolManagedIdentities` | `object[] \| null` | No | A list of managed identities. |

> [accordion] workloadIdentityPoolManagedIdentities full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   expireTime?: string | null,
>   disabled?: boolean | null,
>   state?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.listAttestationRules

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.listAttestationRules`

List all AttestationRule on a WorkloadIdentityPoolManagedIdentity (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.listAttestationRules({ resource: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of AttestationRules to return. If unspecified, at most 50 AttestationRules are returned. The maximum value is 100; values above 100 are truncated to 100. |
| `resource` | `string` | Yes | Required. The resource name of the managed identity or namespace resource to list attestation rules of. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>`. |
| `pageToken` | `string` | No | Optional. A page token, received from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to retrieve the subsequent page. |
| `filter` | `string` | No | Optional. A query filter. Supports the following function: \* `container_ids()`: Returns only the AttestationRules under the specific container ids. The function expects a comma-delimited list with only project numbers and must use the format `projects/`. For example: `container_ids(projects/, projects/,...)`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attestationRules` | `object[] \| null` | No | A list of AttestationRules. |
| `nextPageToken` | `string \| null` | No | Optional. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

> [accordion] attestationRules full type
>
> ```ts theme={null}
> {
>   googleCloudResource?: string | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.operations.get

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.operations.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.patch

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.patch`

Updates an existing WorkloadIdentityPoolManagedIdentity in a WorkloadIdentityPoolNamespace

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.patch({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The resource name of the managed identity. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>`. |
| `updateMask` | `string` | No | Required. The list of fields to update. |
| `description` | `string` | No | Optional. A description of the managed identity. Cannot exceed 256 characters. |
| `disabled` | `boolean` | No | Optional. Whether the managed identity is disabled. If disabled, credentials may no longer be issued for the identity, however existing credentials will still be accepted until they expire. |
| `body_name` | `string` | No | Identifier. The resource name of the managed identity. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.removeAttestationRule

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.removeAttestationRule`

Remove an AttestationRule on a WorkloadIdentityPoolManagedIdentity

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.removeAttestationRule({
	resource: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1',
	attestationRule: { googleCloudResource: '//run.googleapis.com/projects/123456789012/type/Service/*' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Required. The resource name of the managed identity or namespace resource to remove an attestation rule from. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>`. |
| `attestationRule` | `object` | No | Defines which workloads can receive an identity within a pool. When an AttestationRule is defined under a managed identity, matching workloads may receive that identity. |

> [accordion] attestationRule full type
>
> ```ts theme={null}
> {
>   googleCloudResource?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.setAttestationRules

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.setAttestationRules`

Set all AttestationRule on a WorkloadIdentityPoolManagedIdentity. A maximum of 50 AttestationRules can be set

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.setAttestationRules({
	resource: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1',
	attestationRules: [{ googleCloudResource: '//run.googleapis.com/projects/123456789012/type/Service/*' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Required. The resource name of the managed identity or namespace resource to add an attestation rule to. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>`. |
| `attestationRules` | `object[]` | No | Required. The attestation rules to be set. At most 50 attestation rules can be set. |

> [accordion] attestationRules full type
>
> ```ts theme={null}
> {
>   googleCloudResource?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.undelete

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.undelete`

Undeletes a WorkloadIdentityPoolManagedIdentity, as long as it was deleted fewer than 30 days ago

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.undelete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the managed identity to undelete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>`. |
| `body` | `object` | No | Request message for UndeleteWorkloadIdentityPoolManagedIdentity. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.managedIdentities.workloadSources.operations.get

`iam.locations.workloadIdentityPools.namespaces.managedIdentities.workloadSources.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.managedIdentities.workloadSources.operations.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/managedIdentities/mi-1/workloadSources/ws-1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/managedIdentities/<id>/workloadSources/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.operations.get

`iam.locations.workloadIdentityPools.namespaces.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.operations.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.patch

`iam.locations.workloadIdentityPools.namespaces.patch`

Updates an existing WorkloadIdentityPoolNamespace in a WorkloadIdentityPool

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.patch({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The resource name of the namespace. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>`. |
| `updateMask` | `string` | No | Required. The list of fields to update. |
| `disabled` | `boolean` | No | Optional. Whether the namespace is disabled. If disabled, credentials may no longer be issued for identities within this namespace, however existing credentials will still be accepted until they expire. |
| `body_name` | `string` | No | Identifier. The resource name of the namespace. |
| `description` | `string` | No | Optional. A description of the namespace. Cannot exceed 256 characters. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.namespaces.undelete

`iam.locations.workloadIdentityPools.namespaces.undelete`

Undeletes a WorkloadIdentityPoolNamespace, as long as it was deleted fewer than 30 days ago

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.namespaces.undelete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/namespaces/ns-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the namespace to undelete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/namespaces/<id>`. |
| `body` | `object` | No | Request message for UndeleteWorkloadIdentityPoolNamespace. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.operations.get

`iam.locations.workloadIdentityPools.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.operations.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.patch

`iam.locations.workloadIdentityPools.patch`

Updates an existing WorkloadIdentityPool

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.patch({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The resource name of the pool. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `updateMask` | `string` | No | Required. The list of fields to update. |
| `displayName` | `string` | No | Optional. A display name for the pool. Cannot exceed 32 characters. |
| `inlineCertificateIssuanceConfig` | `object` | No | Represents configuration for generating mutual TLS (mTLS) certificates for the identities within this pool. |
| `disabled` | `boolean` | No | Optional. Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again. |
| `description` | `string` | No | Optional. A description of the pool. Cannot exceed 256 characters. |
| `body_name` | `string` | No | Identifier. The resource name of the pool. |
| `mode` | `MODE_UNSPECIFIED \| FEDERATION_ONLY \| TRUST_DOMAIN \| SYSTEM_TRUST_DOMAIN` | No | Immutable. The mode the pool is operating in. |
| `inlineTrustConfig` | `object` | No | Defines configuration for extending trust to additional trust domains. By establishing trust with another domain, the current domain will recognize and accept certificates issued by entities within the trusted domains. Note that a trust domain automatically trusts itself, eliminating the need for explicit configuration. |

> [accordion] inlineCertificateIssuanceConfig full type
>
> ```ts theme={null}
> {
>   caPools?: Record<string, string>,
>   keyAlgorithm?: KEY_ALGORITHM_UNSPECIFIED | RSA_2048 | RSA_3072 | RSA_4096 | ECDSA_P256 | ECDSA_P384,
>   useDefaultSharedCa?: boolean,
>   rotationWindowPercentage?: number,
>   lifetime?: string
> }
> ```

> [accordion] inlineTrustConfig full type
>
> ```ts theme={null}
> {
>   additionalTrustBundles?: Record<string, {
>     intermediateCas?: {
>       pemCertificate?: string
>     }[],
>     trustAnchors?: {
>       pemCertificate?: string
>     }[],
>     trustDefaultSharedCa?: boolean
>   }>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.create

`iam.locations.workloadIdentityPools.providers.create`

Creates a new WorkloadIdentityPoolProvider in a WorkloadIdentityPool. You cannot reuse the name of a deleted provider until 30 days after deletion

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.create({
	parent: 'projects/demo-project/locations/global/workloadIdentityPools/github',
	workloadIdentityPoolProviderId: 'github-actions',
	oidc: { issuerUri: 'https://token.actions.githubusercontent.com' },
	attributeMapping: { 'google.subject': 'assertion.sub', 'attribute.repository': 'assertion.repository' },
	attributeCondition: 'assertion.repository_owner == \'acme\'',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workloadIdentityPoolProviderId` | `string` | No | Required. The ID for the provider, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters \[a-z0-9-]. The prefix `gcp-` is reserved for use by Google, and may not be specified. |
| `parent` | `string` | Yes | Required. The pool to create this provider in. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `displayName` | `string` | No | Optional. A display name for the provider. Cannot exceed 32 characters. |
| `actorProviders` | `string[]` | No | Optional. A list of the resource names of WorkloadIdentityPoolProviders in the same pool that are authorized to issue actor tokens for this provider. An actor token represents the identity of the acting party to whom authority is delegated. At most 3 actor providers can be specified. |
| `saml` | `object` | No | Represents an SAML 2.0 identity provider. |
| `description` | `string` | No | Optional. A description for the provider. Cannot exceed 256 characters. |
| `x509` | `object` | No | An X.509-type identity provider represents a CA. It is trusted to assert a client identity if the client has a certificate that chains up to this CA. |
| `oidc` | `object` | No | Represents an OpenId Connect 1.0 identity provider. |
| `attributeCondition` | `string` | No | Optional. [A Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: \* `assertion`: JSON representing the authentication credential issued by the provider. \* `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. |
| `attributeMapping` | `Record<string, string>` | No | Optional. Maps attributes from authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: \* `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. Cannot exceed 127 bytes. \* `google.groups`: Groups the external identity belongs to. |
| `aws` | `object` | No | Represents an Amazon Web Services identity provider. |
| `name` | `string` | No | Identifier. The resource name of the provider. |
| `disabled` | `boolean` | No | Optional. Whether the provider is disabled. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access. |

> [accordion] saml full type
>
> ```ts theme={null}
> {
>   idpMetadataXml?: string
> }
> ```

> [accordion] x509 full type
>
> ```ts theme={null}
> {
>   trustStore?: {
>     intermediateCas?: {
>       pemCertificate?: string
>     }[],
>     trustAnchors?: {
>       pemCertificate?: string
>     }[],
>     trustDefaultSharedCa?: boolean
>   }
> }
> ```

> [accordion] oidc full type
>
> ```ts theme={null}
> {
>   discoveryUri?: string,
>   allowedAudiences?: string[],
>   jwksJson?: string,
>   issuerUri?: string
> }
> ```

> [accordion] aws full type
>
> ```ts theme={null}
> {
>   accountId?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.delete

`iam.locations.workloadIdentityPools.providers.delete`

Deletes a WorkloadIdentityPoolProvider. Deleting a provider does not revoke credentials that have already been issued; they continue to grant access

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.delete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the provider to delete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.get

`iam.locations.workloadIdentityPools.providers.get`

Gets an individual WorkloadIdentityPoolProvider

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the provider to retrieve. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. A display name for the provider. Cannot exceed 32 characters. |
| `state` | `string \| null` | No | Output only. The state of the provider. |
| `actorProviders` | `string[] \| null` | No | Optional. A list of the resource names of WorkloadIdentityPoolProviders in the same pool that are authorized to issue actor tokens for this provider. An actor token represents the identity of the acting party to whom authority is delegated. At most 3 actor providers can be specified. |
| `saml` | `object \| null` | No | Represents an SAML 2.0 identity provider. |
| `description` | `string \| null` | No | Optional. A description for the provider. Cannot exceed 256 characters. |
| `x509` | `object \| null` | No | An X.509-type identity provider represents a CA. It is trusted to assert a client identity if the client has a certificate that chains up to this CA. |
| `oidc` | `object \| null` | No | Represents an OpenId Connect 1.0 identity provider. |
| `attributeCondition` | `string \| null` | No | Optional. [A Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: \* `assertion`: JSON representing the authentication credential issued by the provider. \* `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. |
| `attributeMapping` | `Record<string, string> \| null` | No | Optional. Maps attributes from authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: \* `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. Cannot exceed 127 bytes. \* `google.groups`: Groups the external identity belongs to. |
| `aws` | `object \| null` | No | Represents an Amazon Web Services identity provider. |
| `name` | `string \| null` | No | Identifier. The resource name of the provider. |
| `disabled` | `boolean \| null` | No | Optional. Whether the provider is disabled. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access. |
| `expireTime` | `string \| null` | No | Output only. Time after which the workload identity pool provider will be permanently purged and cannot be recovered. |

> [accordion] saml full type
>
> ```ts theme={null}
> {
>   idpMetadataXml?: string | null
> } | null
> ```

> [accordion] x509 full type
>
> ```ts theme={null}
> {
>   trustStore?: {
>     intermediateCas?: {
>       pemCertificate?: string | null
>     }[] | null,
>     trustAnchors?: {
>       pemCertificate?: string | null
>     }[] | null,
>     trustDefaultSharedCa?: boolean | null
>   } | null
> } | null
> ```

> [accordion] oidc full type
>
> ```ts theme={null}
> {
>   discoveryUri?: string | null,
>   allowedAudiences?: string[] | null,
>   jwksJson?: string | null,
>   issuerUri?: string | null
> } | null
> ```

> [accordion] aws full type
>
> ```ts theme={null}
> {
>   accountId?: string | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.keys.create

`iam.locations.workloadIdentityPools.providers.keys.create`

Create a new WorkloadIdentityPoolProviderKey in a WorkloadIdentityPoolProvider

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.keys.create({
	parent: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions',
	workloadIdentityPoolProviderKeyId: 'saml-key',
	use: 'ENCRYPTION',
	keyData: { keySpec: 'RSA_2048' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent provider resource to create the key in. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>`. |
| `workloadIdentityPoolProviderKeyId` | `string` | No | Required. The ID to use for the key, which becomes the final component of the resource name. This value should be 4-32 characters, and may contain the characters \[a-z0-9-]. |
| `name` | `string` | No | Identifier. The resource name of the key. |
| `use` | `KEY_USE_UNSPECIFIED \| ENCRYPTION` | No | Required. The purpose of the key. |
| `keyData` | `object` | No | Represents a public key data along with its format. |

> [accordion] keyData full type
>
> ```ts theme={null}
> {
>   keySpec?: KEY_SPEC_UNSPECIFIED | RSA_2048 | RSA_3072 | RSA_4096
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.keys.delete

`iam.locations.workloadIdentityPools.providers.keys.delete`

Deletes an WorkloadIdentityPoolProviderKey. You can undelete a key for 30 days

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.keys.delete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions/keys/a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the encryption key to delete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>/keys/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.keys.get

`iam.locations.workloadIdentityPools.providers.keys.get`

Gets an individual WorkloadIdentityPoolProviderKey

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.keys.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions/keys/a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the key to retrieve. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>/keys/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The resource name of the key. |
| `use` | `string \| null` | No | Required. The purpose of the key. |
| `state` | `string \| null` | No | Output only. The state of the key. |
| `keyData` | `object \| null` | No | Represents a public key data along with its format. |
| `expireTime` | `string \| null` | No | Output only. Time after which the key will be permanently purged and cannot be recovered. Note that the key may get purged before this timestamp if the total limit of keys per provider is crossed. |

> [accordion] keyData full type
>
> ```ts theme={null}
> {
>   key?: string | null,
>   notAfterTime?: string | null,
>   notBeforeTime?: string | null,
>   format?: string | null,
>   keySpec?: string | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.keys.list

`iam.locations.workloadIdentityPools.providers.keys.list`

Lists all non-deleted WorkloadIdentityPoolProviderKeys in a project. If show\_deleted is set to `true`, then deleted pools are also listed (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.keys.list({ parent: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A page token, received from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to retrieve the subsequent page. |
| `pageSize` | `number` | No | The maximum number of keys to return. If unspecified, all keys are returned. The maximum value is 10; values above 10 are truncated to 10. |
| `parent` | `string` | Yes | Required. The parent provider resource to list encryption keys for. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>`. |
| `showDeleted` | `boolean` | No | Whether to return soft deleted resources as well. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `workloadIdentityPoolProviderKeys` | `object[] \| null` | No | A list of WorkloadIdentityPoolProviderKey |

> [accordion] workloadIdentityPoolProviderKeys full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   use?: string | null,
>   state?: string | null,
>   keyData?: {
>     key?: string | null,
>     notAfterTime?: string | null,
>     notBeforeTime?: string | null,
>     format?: string | null,
>     keySpec?: string | null
>   } | null,
>   expireTime?: string | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.providers.keys.operations.get

`iam.locations.workloadIdentityPools.providers.keys.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.keys.operations.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions/keys/a1b2c3/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>/keys/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.keys.undelete

`iam.locations.workloadIdentityPools.providers.keys.undelete`

Undeletes an WorkloadIdentityPoolProviderKey, as long as it was deleted fewer than 30 days ago

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.keys.undelete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions/keys/a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the encryption key to undelete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>/keys/<id>`. |
| `body` | `object` | No | Request message for UndeleteWorkloadIdentityPoolProviderKey. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.list

`iam.locations.workloadIdentityPools.providers.list`

Lists all non-deleted WorkloadIdentityPoolProviders in a WorkloadIdentityPool. If `show_deleted` is set to `true`, then deleted providers are also listed (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.list({ parent: 'projects/demo-project/locations/global/workloadIdentityPools/github' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A page token, received from a previous `ListWorkloadIdentityPoolProviders` call. Provide this to retrieve the subsequent page. |
| `parent` | `string` | Yes | Required. The pool to list providers for. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `showDeleted` | `boolean` | No | Whether to return soft-deleted providers. |
| `pageSize` | `number` | No | The maximum number of providers to return. If unspecified, at most 50 providers are returned. The maximum value is 100; values above 100 are truncated to 100. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `workloadIdentityPoolProviders` | `object[] \| null` | No | A list of providers. |
| `nextPageToken` | `string \| null` | No | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

> [accordion] workloadIdentityPoolProviders full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   state?: string | null,
>   actorProviders?: string[] | null,
>   saml?: {
>     idpMetadataXml?: string | null
>   } | null,
>   description?: string | null,
>   x509?: {
>     trustStore?: {
>       intermediateCas?: {
>         pemCertificate?: string | null
>       }[] | null,
>       trustAnchors?: {
>         pemCertificate?: string | null
>       }[] | null,
>       trustDefaultSharedCa?: boolean | null
>     } | null
>   } | null,
>   oidc?: {
>     discoveryUri?: string | null,
>     allowedAudiences?: string[] | null,
>     jwksJson?: string | null,
>     issuerUri?: string | null
>   } | null,
>   attributeCondition?: string | null,
>   attributeMapping?: Record<string, string> | null,
>   aws?: {
>     accountId?: string | null
>   } | null,
>   name?: string | null,
>   disabled?: boolean | null,
>   expireTime?: string | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.providers.operations.get

`iam.locations.workloadIdentityPools.providers.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.operations.get({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.patch

`iam.locations.workloadIdentityPools.providers.patch`

Updates an existing WorkloadIdentityPoolProvider

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.patch({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The resource name of the provider. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>`. |
| `updateMask` | `string` | No | Required. The list of fields to update. |
| `displayName` | `string` | No | Optional. A display name for the provider. Cannot exceed 32 characters. |
| `actorProviders` | `string[]` | No | Optional. A list of the resource names of WorkloadIdentityPoolProviders in the same pool that are authorized to issue actor tokens for this provider. An actor token represents the identity of the acting party to whom authority is delegated. At most 3 actor providers can be specified. |
| `saml` | `object` | No | Represents an SAML 2.0 identity provider. |
| `description` | `string` | No | Optional. A description for the provider. Cannot exceed 256 characters. |
| `x509` | `object` | No | An X.509-type identity provider represents a CA. It is trusted to assert a client identity if the client has a certificate that chains up to this CA. |
| `oidc` | `object` | No | Represents an OpenId Connect 1.0 identity provider. |
| `attributeCondition` | `string` | No | Optional. [A Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: \* `assertion`: JSON representing the authentication credential issued by the provider. \* `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. |
| `attributeMapping` | `Record<string, string>` | No | Optional. Maps attributes from authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: \* `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. Cannot exceed 127 bytes. \* `google.groups`: Groups the external identity belongs to. |
| `aws` | `object` | No | Represents an Amazon Web Services identity provider. |
| `body_name` | `string` | No | Identifier. The resource name of the provider. |
| `disabled` | `boolean` | No | Optional. Whether the provider is disabled. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access. |

> [accordion] saml full type
>
> ```ts theme={null}
> {
>   idpMetadataXml?: string
> }
> ```

> [accordion] x509 full type
>
> ```ts theme={null}
> {
>   trustStore?: {
>     intermediateCas?: {
>       pemCertificate?: string
>     }[],
>     trustAnchors?: {
>       pemCertificate?: string
>     }[],
>     trustDefaultSharedCa?: boolean
>   }
> }
> ```

> [accordion] oidc full type
>
> ```ts theme={null}
> {
>   discoveryUri?: string,
>   allowedAudiences?: string[],
>   jwksJson?: string,
>   issuerUri?: string
> }
> ```

> [accordion] aws full type
>
> ```ts theme={null}
> {
>   accountId?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.providers.undelete

`iam.locations.workloadIdentityPools.providers.undelete`

Undeletes a WorkloadIdentityPoolProvider, as long as it was deleted fewer than 30 days ago

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.providers.undelete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github/providers/github-actions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the provider to undelete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>/providers/<id>`. |
| `body` | `object` | No | Request message for UndeleteWorkloadIdentityPoolProvider. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.removeAttestationRule

`iam.locations.workloadIdentityPools.removeAttestationRule`

Remove an AttestationRule on a WorkloadIdentityPoolManagedIdentity

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.removeAttestationRule({
	resource: 'projects/demo-project/locations/global/workloadIdentityPools/github',
	attestationRule: { googleCloudResource: '//run.googleapis.com/projects/123456789012/type/Service/*' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Required. The resource name of the managed identity or namespace resource to remove an attestation rule from. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `attestationRule` | `object` | No | Defines which workloads can receive an identity within a pool. When an AttestationRule is defined under a managed identity, matching workloads may receive that identity. |

> [accordion] attestationRule full type
>
> ```ts theme={null}
> {
>   googleCloudResource?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.setAttestationRules

`iam.locations.workloadIdentityPools.setAttestationRules`

Set all AttestationRule on a WorkloadIdentityPoolManagedIdentity. A maximum of 50 AttestationRules can be set

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.setAttestationRules({
	resource: 'projects/demo-project/locations/global/workloadIdentityPools/github',
	attestationRules: [{ googleCloudResource: '//run.googleapis.com/projects/123456789012/type/Service/*' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | Required. The resource name of the managed identity or namespace resource to add an attestation rule to. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `attestationRules` | `object[]` | No | Required. The attestation rules to be set. At most 50 attestation rules can be set. |

> [accordion] attestationRules full type
>
> ```ts theme={null}
> {
>   googleCloudResource?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workloadIdentityPools.setIamPolicy

`iam.locations.workloadIdentityPools.setIamPolicy`

Sets the IAM policies on a WorkloadIdentityPool

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.setIamPolicy({
	resource: 'projects/demo-project/locations/global/workloadIdentityPools/github',
	policy: {
		bindings: [{
			role: 'roles/iam.workloadIdentityPoolViewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[],
>   version?: number,
>   etag?: string,
>   bindings?: {
>     condition?: {
>       expression?: string,
>       title?: string,
>       location?: string,
>       description?: string
>     },
>     members?: string[],
>     role?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     title?: string | null,
>     location?: string | null,
>     description?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### locations.workloadIdentityPools.testIamPermissions

`iam.locations.workloadIdentityPools.testIamPermissions`

Returns the caller's permissions on a WorkloadIdentityPool

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.testIamPermissions({
	resource: 'projects/demo-project/locations/global/workloadIdentityPools/github',
	permissions: ['iam.workloadIdentityPools.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### locations.workloadIdentityPools.undelete

`iam.locations.workloadIdentityPools.undelete`

Undeletes a WorkloadIdentityPool, as long as it was deleted fewer than 30 days ago

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.locations.workloadIdentityPools.undelete({ name: 'projects/demo-project/locations/global/workloadIdentityPools/github' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the pool to undelete. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |
| `body` | `object` | No | Request message for UndeleteWorkloadIdentityPool. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### organizations.roles.create

`iam.organizations.roles.create`

Creates a new custom Role

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.organizations.roles.create({
	parent: 'organizations/123456789012',
	roleId: 'topicReader',
	role: {
		title: 'Topic reader',
		includedPermissions: ['pubsub.topics.get'],
		stage: 'GA',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The `parent` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: \* [projects.roles.create](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/create): `projects/{PROJECT_ID}`. This method creates project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Format: `organizations/<id>`. |
| `roleId` | `string` | No | The role ID to use for this role. A role ID may contain alphanumeric characters, underscores (`_`), and periods (`.`). It must contain a minimum of 3 characters and a maximum of 64 characters. |
| `role` | `object` | No | A role in the Identity and Access Management API. |

> [accordion] role full type
>
> ```ts theme={null}
> {
>   etag?: string,
>   title?: string,
>   stage?: ALPHA | BETA | GA | DEPRECATED | DISABLED | EAP,
>   includedPermissions?: string[],
>   description?: string,
>   deleted?: boolean,
>   name?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### organizations.roles.delete

`iam.organizations.roles.delete`

Deletes a custom Role. When you delete a custom role, the following changes occur immediately: \* You cannot bind a principal to the custom role in an IAM Policy. \* Existing bindings to the custom role are not changed, but they have no effect. \* By default, the response from ListRoles does not include the custom role

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.organizations.roles.delete({ name: 'organizations/123456789012/roles/deployer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: \* [projects.roles.delete](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/delete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. Format: `organizations/<id>/roles/<id>`. |
| `etag` | `string` | No | Used to perform a consistent read-modify-write. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### organizations.roles.get

`iam.organizations.roles.get`

Gets the definition of a Role

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.organizations.roles.get({ name: 'organizations/123456789012/roles/deployer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The `name` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: \* [roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. Format: `organizations/<id>/roles/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### organizations.roles.list

`iam.organizations.roles.list`

Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.organizations.roles.list({ parent: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000. |
| `pageToken` | `string` | No | Optional pagination token returned in an earlier ListRolesResponse. |
| `showDeleted` | `boolean` | No | Include Roles that have been deleted. |
| `view` | `BASIC \| FULL` | No | Optional view for the returned Role objects. When `FULL` is specified, the `includedPermissions` field is returned, which includes a list of all permissions in the role. The default value is `BASIC`, which does not return the `includedPermissions` field. |
| `parent` | `string` | Yes | The `parent` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: \* [roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty string. Format: `organizations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | To retrieve the next page of results, set `ListRolesRequest.page_token` to this value. |
| `roles` | `object[] \| null` | No | The Roles defined on this resource. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   etag?: string | null,
>   title?: string | null,
>   stage?: string | null,
>   includedPermissions?: string[] | null,
>   description?: string | null,
>   deleted?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### organizations.roles.patch

`iam.organizations.roles.patch`

Updates the definition of a custom Role

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.organizations.roles.patch({ name: 'organizations/123456789012/roles/deployer', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: \* [projects.roles.patch](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/patch): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. Format: `organizations/<id>/roles/<id>`. |
| `updateMask` | `string` | No | A mask describing which fields in the Role have changed. |
| `etag` | `string` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `ALPHA \| BETA \| GA \| DEPRECATED \| DISABLED \| EAP` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[]` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `body_name` | `string` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### organizations.roles.undelete

`iam.organizations.roles.undelete`

Undeletes a custom Role

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.organizations.roles.undelete({ name: 'organizations/123456789012/roles/deployer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: \* [projects.roles.undelete](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/undelete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. Format: `organizations/<id>/roles/<id>`. |
| `etag` | `string` | No | Used to perform a consistent read-modify-write. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### permissions.queryTestablePermissions

`iam.permissions.queryTestablePermissions`

Lists every permission that you can test on a resource. A permission is testable if you can check whether a principal has that permission on the resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.permissions.queryTestablePermissions({ fullResourceName: '//cloudresourcemanager.googleapis.com/projects/demo-project', pageSize: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional limit on the number of permissions to include in the response. The default is 100, and the maximum is 1,000. |
| `pageToken` | `string` | No | Optional pagination token returned in an earlier QueryTestablePermissionsRequest. |
| `fullResourceName` | `string` | No | Required. The full resource name to query from the list of testable permissions. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | To retrieve the next page of results, set `QueryTestableRolesRequest.page_token` to this value. |
| `permissions` | `object[] \| null` | No | The Permissions testable on the requested resource. |

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   title?: string | null,
>   stage?: string | null,
>   customRolesSupportLevel?: string | null,
>   name?: string | null,
>   primaryPermission?: string | null,
>   onlyInPredefinedRoles?: boolean | null,
>   apiDisabled?: boolean | null
> }[] | null
> ```

***

### projects.roles.create

`iam.projects.roles.create`

Creates a new custom Role

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.projects.roles.create({
	parent: 'projects/demo-project',
	roleId: 'topicReader',
	role: {
		title: 'Topic reader',
		includedPermissions: ['pubsub.topics.get'],
		stage: 'GA',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The `parent` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: \* [projects.roles.create](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/create): `projects/{PROJECT_ID}`. This method creates project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Format: `projects/<id>`. |
| `roleId` | `string` | No | The role ID to use for this role. A role ID may contain alphanumeric characters, underscores (`_`), and periods (`.`). It must contain a minimum of 3 characters and a maximum of 64 characters. |
| `role` | `object` | No | A role in the Identity and Access Management API. |

> [accordion] role full type
>
> ```ts theme={null}
> {
>   etag?: string,
>   title?: string,
>   stage?: ALPHA | BETA | GA | DEPRECATED | DISABLED | EAP,
>   includedPermissions?: string[],
>   description?: string,
>   deleted?: boolean,
>   name?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### projects.roles.delete

`iam.projects.roles.delete`

Deletes a custom Role. When you delete a custom role, the following changes occur immediately: \* You cannot bind a principal to the custom role in an IAM Policy. \* Existing bindings to the custom role are not changed, but they have no effect. \* By default, the response from ListRoles does not include the custom role

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.projects.roles.delete({ name: 'projects/demo-project/roles/deployer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: \* [projects.roles.delete](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/delete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. Format: `projects/<id>/roles/<id>`. |
| `etag` | `string` | No | Used to perform a consistent read-modify-write. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### projects.roles.get

`iam.projects.roles.get`

Gets the definition of a Role

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.projects.roles.get({ name: 'projects/demo-project/roles/deployer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The `name` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: \* [roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. Format: `projects/<id>/roles/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### projects.roles.list

`iam.projects.roles.list`

Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.projects.roles.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `view` | `BASIC \| FULL` | No | Optional view for the returned Role objects. When `FULL` is specified, the `includedPermissions` field is returned, which includes a list of all permissions in the role. The default value is `BASIC`, which does not return the `includedPermissions` field. |
| `parent` | `string` | Yes | The `parent` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: \* [roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty string. Format: `projects/<id>`. |
| `pageSize` | `number` | No | Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000. |
| `showDeleted` | `boolean` | No | Include Roles that have been deleted. |
| `pageToken` | `string` | No | Optional pagination token returned in an earlier ListRolesResponse. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | To retrieve the next page of results, set `ListRolesRequest.page_token` to this value. |
| `roles` | `object[] \| null` | No | The Roles defined on this resource. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   etag?: string | null,
>   title?: string | null,
>   stage?: string | null,
>   includedPermissions?: string[] | null,
>   description?: string | null,
>   deleted?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### projects.roles.patch

`iam.projects.roles.patch`

Updates the definition of a custom Role

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.projects.roles.patch({ name: 'projects/demo-project/roles/deployer', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: \* [projects.roles.patch](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/patch): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. Format: `projects/<id>/roles/<id>`. |
| `updateMask` | `string` | No | A mask describing which fields in the Role have changed. |
| `etag` | `string` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `ALPHA \| BETA \| GA \| DEPRECATED \| DISABLED \| EAP` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[]` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `body_name` | `string` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### projects.roles.undelete

`iam.projects.roles.undelete`

Undeletes a custom Role

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.projects.roles.undelete({ name: 'projects/demo-project/roles/deployer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: \* [projects.roles.undelete](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/undelete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. Format: `projects/<id>/roles/<id>`. |
| `etag` | `string` | No | Used to perform a consistent read-modify-write. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### roles.get

`iam.roles.get`

Gets the definition of a Role

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.roles.get({ name: 'roles/viewer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The `name` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: \* [roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. Format: `roles/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Used to perform a consistent read-modify-write. (base64) |
| `title` | `string \| null` | No | Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| `stage` | `string \| null` | No | The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. |
| `includedPermissions` | `string[] \| null` | No | The names of the permissions this role grants when bound in an IAM policy. |
| `description` | `string \| null` | No | Optional. A human-readable description for the role. |
| `deleted` | `boolean \| null` | No | The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. |
| `name` | `string \| null` | No | The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |

***

### roles.list

`iam.roles.list`

Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.roles.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000. |
| `parent` | `string` | No | The `parent` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: \* [roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty string. |
| `view` | `BASIC \| FULL` | No | Optional view for the returned Role objects. When `FULL` is specified, the `includedPermissions` field is returned, which includes a list of all permissions in the role. The default value is `BASIC`, which does not return the `includedPermissions` field. |
| `pageToken` | `string` | No | Optional pagination token returned in an earlier ListRolesResponse. |
| `showDeleted` | `boolean` | No | Include Roles that have been deleted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | To retrieve the next page of results, set `ListRolesRequest.page_token` to this value. |
| `roles` | `object[] \| null` | No | The Roles defined on this resource. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   etag?: string | null,
>   title?: string | null,
>   stage?: string | null,
>   includedPermissions?: string[] | null,
>   description?: string | null,
>   deleted?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### roles.queryGrantableRoles

`iam.roles.queryGrantableRoles`

Lists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.roles.queryGrantableRoles({ fullResourceName: '//cloudresourcemanager.googleapis.com/projects/demo-project', pageSize: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fullResourceName` | `string` | No | Required. Required. The full resource name to query from the list of grantable roles. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`. |
| `view` | `BASIC \| FULL` | No | — |
| `pageToken` | `string` | No | Optional pagination token returned in an earlier QueryGrantableRolesResponse. |
| `pageSize` | `number` | No | Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 3,000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `roles` | `object[] \| null` | No | The list of matching roles. |
| `nextPageToken` | `string \| null` | No | To retrieve the next page of results, set `QueryGrantableRolesRequest.page_token` to this value. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   etag?: string | null,
>   title?: string | null,
>   stage?: string | null,
>   includedPermissions?: string[] | null,
>   description?: string | null,
>   deleted?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### serviceAccounts.create

`iam.serviceAccounts.create`

Creates a ServiceAccount

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.create({
	name: 'projects/demo-project',
	accountId: 'deployer',
	serviceAccount: { displayName: 'Deployer' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`. Format: `projects/<id>`. |
| `accountId` | `string` | No | Required. The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression `a-z` to comply with RFC1035. |
| `serviceAccount` | `object` | No | An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service account. // |

> [accordion] serviceAccount full type
>
> ```ts theme={null}
> {
>   displayName?: string,
>   name?: string,
>   etag?: string,
>   description?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes. |
| `projectId` | `string \| null` | No | Output only. The ID of the project that owns the service account. |
| `oauth2ClientId` | `string \| null` | No | Output only. The OAuth 2.0 client ID for the service account. |
| `email` | `string \| null` | No | Output only. The email address of the service account. |
| `name` | `string \| null` | No | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. |
| `uniqueId` | `string \| null` | No | Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account. |
| `etag` | `string \| null` | No | Deprecated. Do not use. (base64) |
| `description` | `string \| null` | No | Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes. |
| `disabled` | `boolean \| null` | No | Output only. Whether the service account is disabled. |

***

### serviceAccounts.delete

`iam.serviceAccounts.delete`

Deletes a ServiceAccount. **Warning:** After you delete a service account, you might not be able to undelete it. If you know that you need to re-enable the service account in the future, use DisableServiceAccount instead

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.delete({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### serviceAccounts.disable

`iam.serviceAccounts.disable`

Disables a ServiceAccount immediately. If an application uses the service account to authenticate, that application can no longer call Google APIs or access Google Cloud resources

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.disable({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |
| `body` | `object` | No | The service account disable request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### serviceAccounts.enable

`iam.serviceAccounts.enable`

Enables a ServiceAccount that was disabled by DisableServiceAccount. If the service account is already enabled, then this method has no effect

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.enable({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |
| `body` | `object` | No | The service account enable request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### serviceAccounts.get

`iam.serviceAccounts.get`

Gets a ServiceAccount

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.get({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes. |
| `projectId` | `string \| null` | No | Output only. The ID of the project that owns the service account. |
| `oauth2ClientId` | `string \| null` | No | Output only. The OAuth 2.0 client ID for the service account. |
| `email` | `string \| null` | No | Output only. The email address of the service account. |
| `name` | `string \| null` | No | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. |
| `uniqueId` | `string \| null` | No | Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account. |
| `etag` | `string \| null` | No | Deprecated. Do not use. (base64) |
| `description` | `string \| null` | No | Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes. |
| `disabled` | `boolean \| null` | No | Output only. Whether the service account is disabled. |

***

### serviceAccounts.getIamPolicy

`iam.serviceAccounts.getIamPolicy`

Gets the IAM policy that is attached to a ServiceAccount. This IAM policy specifies which principals have access to the service account

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.getIamPolicy({ resource: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/serviceAccounts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     title?: string | null,
>     location?: string | null,
>     description?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### serviceAccounts.keys.create

`iam.serviceAccounts.keys.create`

Creates a ServiceAccountKey

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.keys.create({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com', privateKeyType: 'TYPE_GOOGLE_CREDENTIALS_FILE' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |
| `privateKeyType` | `TYPE_UNSPECIFIED \| TYPE_PKCS12_FILE \| TYPE_GOOGLE_CREDENTIALS_FILE` | No | The output format of the private key. The default value is `TYPE_GOOGLE_CREDENTIALS_FILE`, which is the Google Credentials File format. |
| `keyAlgorithm` | `KEY_ALG_UNSPECIFIED \| KEY_ALG_RSA_1024 \| KEY_ALG_RSA_2048` | No | Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `privateKeyType` | `string \| null` | No | The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys. |
| `validAfterTime` | `string \| null` | No | The key can be used after this timestamp. |
| `extendedStatus` | `object[] \| null` | No | Output only. Extended Status provides permanent information about a service account key. For example, if this key was detected as exposed or compromised, that information will remain for the lifetime of the key in the extended\_status. |
| `keyOrigin` | `string \| null` | No | The key origin. |
| `keyType` | `string \| null` | No | The key type. |
| `disabled` | `boolean \| null` | No | The key status. |
| `disableReason` | `string \| null` | No | Output only. optional. If the key is disabled, it may have a DisableReason describing why it was disabled. |
| `validBeforeTime` | `string \| null` | No | The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time. |
| `keyAlgorithm` | `string \| null` | No | Specifies the algorithm (and possibly key size) for the key. |
| `name` | `string \| null` | No | The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
| `privateKeyData` | `string \| null` | No | The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. (base64) |
| `publicKeyData` | `string \| null` | No | The public key data. Only provided in `GetServiceAccountKey` responses. (base64) |

> [accordion] extendedStatus full type
>
> ```ts theme={null}
> {
>   key?: string | null,
>   value?: string | null
> }[] | null
> ```

***

### serviceAccounts.keys.delete

`iam.serviceAccounts.keys.delete`

Deletes a ServiceAccountKey. Deleting a service account key does not revoke short-lived credentials that have been issued based on the service account key

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.keys.delete({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com/keys/a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account key. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` \* `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>/keys/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### serviceAccounts.keys.disable

`iam.serviceAccounts.keys.disable`

Disable a ServiceAccountKey. A disabled service account key can be re-enabled with EnableServiceAccountKey

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.keys.disable({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com/keys/a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account key. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` \* `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>/keys/<id>`. |
| `body` | `object` | No | The service account key disable request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### serviceAccounts.keys.enable

`iam.serviceAccounts.keys.enable`

Enable a ServiceAccountKey

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.keys.enable({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com/keys/a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account key. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` \* `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>/keys/<id>`. |
| `body` | `object` | No | The service account key enable request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### serviceAccounts.keys.get

`iam.serviceAccounts.keys.get`

Gets a ServiceAccountKey

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.keys.get({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com/keys/a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account key. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` \* `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>/keys/<id>`. |
| `publicKeyType` | `TYPE_NONE \| TYPE_X509_PEM_FILE \| TYPE_RAW_PUBLIC_KEY` | No | Optional. The output format of the public key. The default is `TYPE_NONE`, which means that the public key is not returned. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `privateKeyType` | `string \| null` | No | The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys. |
| `validAfterTime` | `string \| null` | No | The key can be used after this timestamp. |
| `extendedStatus` | `object[] \| null` | No | Output only. Extended Status provides permanent information about a service account key. For example, if this key was detected as exposed or compromised, that information will remain for the lifetime of the key in the extended\_status. |
| `keyOrigin` | `string \| null` | No | The key origin. |
| `keyType` | `string \| null` | No | The key type. |
| `disabled` | `boolean \| null` | No | The key status. |
| `disableReason` | `string \| null` | No | Output only. optional. If the key is disabled, it may have a DisableReason describing why it was disabled. |
| `validBeforeTime` | `string \| null` | No | The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time. |
| `keyAlgorithm` | `string \| null` | No | Specifies the algorithm (and possibly key size) for the key. |
| `name` | `string \| null` | No | The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
| `privateKeyData` | `string \| null` | No | The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. (base64) |
| `publicKeyData` | `string \| null` | No | The public key data. Only provided in `GetServiceAccountKey` responses. (base64) |

> [accordion] extendedStatus full type
>
> ```ts theme={null}
> {
>   key?: string | null,
>   value?: string | null
> }[] | null
> ```

***

### serviceAccounts.keys.list

`iam.serviceAccounts.keys.list`

Lists every ServiceAccountKey for a service account

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.keys.list({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |
| `keyTypes` | `(KEY_TYPE_UNSPECIFIED \| USER_MANAGED \| SYSTEM_MANAGED)[]` | No | Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keys` | `object[] \| null` | No | The public keys for the service account. |

> [accordion] keys full type
>
> ```ts theme={null}
> {
>   privateKeyType?: string | null,
>   validAfterTime?: string | null,
>   extendedStatus?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   keyOrigin?: string | null,
>   keyType?: string | null,
>   disabled?: boolean | null,
>   disableReason?: string | null,
>   validBeforeTime?: string | null,
>   keyAlgorithm?: string | null,
>   name?: string | null,
>   privateKeyData?: string | null,
>   publicKeyData?: string | null
> }[] | null
> ```

***

### serviceAccounts.keys.upload

`iam.serviceAccounts.keys.upload`

Uploads the public key portion of a key pair that you manage, and associates the public key with a ServiceAccount. After you upload the public key, you can use the private key from the key pair as a service account key

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.keys.upload({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com', publicKeyData: 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURBekNDQWV1Z0F3SUJBZ0lVSEViT2RsQm9TTVlWY1hjSWkwbjFTRHpCQWl3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0VURVBNQTBHQTFVRUF3d0dkVzUxYzJWa01CNFhEVEkyTVRJd01qRTJNemN3TWxvWERUTTJNVEV5T1RFMgpNemN3TWxvd0VURVBNQTBHQTFVRUF3d0dkVzUxYzJWa01JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBCk1JSUJDZ0tDQVFFQXZvZDVwYkRZKzhGSmFDUUs3NHQrWFYzTk9Mb0NEUzR3REFKSURpa3prcTF1cFJ3WVRWYkUKSUZCa0R3T0c1MHA3TXBWM0ZiUEwweGRFR2ZkbVVwT1JLSjA3SFdjQ0dvcGJFWVBDRURrZ2FjTHAyZWFGZ2lndQpBUlREK2Fvb1lwaG9tcXhnRmcvd1RIV2F0Q294Q2w0S3BHVnhBS2RaMGxzeHRuNEkzWlhHQ2NSMjFLcHVJNlFOClpXVklSeG9Na0tuYitnZksvbXEwQ2VSV0JDdlE3NVRoVmlZRlBtYjRLUGhHOStXbThsMG5aSHR1dVpGeVdSanQKcTBtS0ZiejlmbzdUc3gxT3FNaVY2dDJYbUEwcjBrQ09Zall5TlVXYWZpRzJDT08rYWlLaE53R1pJdkVPZ1F0Rwo5Q2lGODh6ejhoN21mVkFyRFBhM1lBVWJDL2hqcmxURG53SURBUUFCbzFNd1VUQWRCZ05WSFE0RUZnUVUzeUJvCm55Q3hOUmY3QTdob2dtTUJkbFFLdStVd0h3WURWUjBqQkJnd0ZvQVUzeUJvbnlDeE5SZjdBN2hvZ21NQmRsUUsKdStVd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQVFFQXJJUDlWZ090dkZ0MApPQ29BYVp3ZzU4Um44UzNuUVlEYUlrZFU3ZmE4dHVYRHRkeTltU05zeEZmaDBZdGRQek1yUmZ0QUY4V09zdHZsCkFFbzN2R3pJT2FHbmdhazdQQWd2S1JqeTVQQkZ2YkNvOUZVVkRtZm84SU9sY3gvZHpkYTYwUXlqMk9DazlvclkKTXhrYVpjVWdTZm1uZkNzSlVSZjM5WGFtMi9kOWR2c1I3RlRXUGxuZGJxbVQwTGxmM2VvRmg1M1ZPTHZFS00xSgptK0ZaREV2T3Z1a09pSmZaWFpCTmhVRzJpVWkwc2JvZGJSdFVDQ0RRdVYxblNWWEREMk5lb0xPRU1HWFhxV2x4CkkvZDNVWjY5NmRDdTEra3VmZnlTR041blJPcm9NN3ZjN29STFpJbjFGUUQ5UzFYQ0E3Ti8rU3dsMldCbDFWcE4KUituTFdwUXlmQT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the service account key. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |
| `publicKeyData` | `string` | No | The public key to associate with the service account. Must be an RSA public key that is wrapped in an X.509 v3 certificate. Include the first line, `-----BEGIN CERTIFICATE-----`, and the last line, `-----END CERTIFICATE-----`. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `privateKeyType` | `string \| null` | No | The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys. |
| `validAfterTime` | `string \| null` | No | The key can be used after this timestamp. |
| `extendedStatus` | `object[] \| null` | No | Output only. Extended Status provides permanent information about a service account key. For example, if this key was detected as exposed or compromised, that information will remain for the lifetime of the key in the extended\_status. |
| `keyOrigin` | `string \| null` | No | The key origin. |
| `keyType` | `string \| null` | No | The key type. |
| `disabled` | `boolean \| null` | No | The key status. |
| `disableReason` | `string \| null` | No | Output only. optional. If the key is disabled, it may have a DisableReason describing why it was disabled. |
| `validBeforeTime` | `string \| null` | No | The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time. |
| `keyAlgorithm` | `string \| null` | No | Specifies the algorithm (and possibly key size) for the key. |
| `name` | `string \| null` | No | The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. |
| `privateKeyData` | `string \| null` | No | The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. (base64) |
| `publicKeyData` | `string \| null` | No | The public key data. Only provided in `GetServiceAccountKey` responses. (base64) |

> [accordion] extendedStatus full type
>
> ```ts theme={null}
> {
>   key?: string | null,
>   value?: string | null
> }[] | null
> ```

***

### serviceAccounts.list

`iam.serviceAccounts.list`

Lists every ServiceAccount that belongs to a specific project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`. Format: `projects/<id>`. |
| `pageToken` | `string` | No | Optional pagination token returned in an earlier ListServiceAccountsResponse.next\_page\_token. |
| `pageSize` | `number` | No | Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the ListServiceAccountsResponse.next\_page\_token in a subsequent request. The default is 20, and the maximum is 100. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `accounts` | `object[] \| null` | No | The list of matching service accounts. |
| `nextPageToken` | `string \| null` | No | To retrieve the next page of results, set ListServiceAccountsRequest.page\_token to this value. |

> [accordion] accounts full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   projectId?: string | null,
>   oauth2ClientId?: string | null,
>   email?: string | null,
>   name?: string | null,
>   uniqueId?: string | null,
>   etag?: string | null,
>   description?: string | null,
>   disabled?: boolean | null
> }[] | null
> ```

***

### serviceAccounts.patch

`iam.serviceAccounts.patch`

Patches a ServiceAccount

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.patch({
	name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com',
	updateMask: 'displayName',
	serviceAccount: { displayName: 'Deployer' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |
| `updateMask` | `string` | No | — |
| `serviceAccount` | `object` | No | An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service account. // |

> [accordion] serviceAccount full type
>
> ```ts theme={null}
> {
>   displayName?: string,
>   name?: string,
>   etag?: string,
>   description?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes. |
| `projectId` | `string \| null` | No | Output only. The ID of the project that owns the service account. |
| `oauth2ClientId` | `string \| null` | No | Output only. The OAuth 2.0 client ID for the service account. |
| `email` | `string \| null` | No | Output only. The email address of the service account. |
| `name` | `string \| null` | No | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. |
| `uniqueId` | `string \| null` | No | Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account. |
| `etag` | `string \| null` | No | Deprecated. Do not use. (base64) |
| `description` | `string \| null` | No | Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes. |
| `disabled` | `boolean \| null` | No | Output only. Whether the service account is disabled. |

***

### serviceAccounts.setIamPolicy

`iam.serviceAccounts.setIamPolicy`

Sets the IAM policy that is attached to a ServiceAccount. Use this method to grant or revoke access to the service account

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.setIamPolicy({
	resource: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com',
	policy: {
		bindings: [{
			role: 'roles/iam.serviceAccountUser',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/serviceAccounts/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[],
>   version?: number,
>   etag?: string,
>   bindings?: {
>     condition?: {
>       expression?: string,
>       title?: string,
>       location?: string,
>       description?: string
>     },
>     members?: string[],
>     role?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     title?: string | null,
>     location?: string | null,
>     description?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### serviceAccounts.signBlob

`iam.serviceAccounts.signBlob`

Signs a blob using the system-managed private key for a ServiceAccount

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.signBlob({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com', bytesToSign: 'SGVsbG8gZnJvbSBDb3JzYWly' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain… Format: `projects/<id>/serviceAccounts/<id>`. |
| `bytesToSign` | `string` | No | Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The bytes to sign. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `signature` | `string \| null` | No | Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The signed blob. (base64) |
| `keyId` | `string \| null` | No | Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The id of the key used to sign the blob. |

***

### serviceAccounts.signJwt

`iam.serviceAccounts.signJwt`

Signs a JSON Web Token (JWT) using the system-managed private key for a ServiceAccount

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.signJwt({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com', payload: '{"sub":"deployer@demo-project.iam.gserviceaccount.com","aud":"https://example.com","exp":1764720000}' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain… Format: `projects/<id>/serviceAccounts/<id>`. |
| `payload` | `string` | No | Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The JWT payload to sign. Must be a serialized JSON object that contains a JWT Claims Set. For example: `{"sub": "user@example.com", "iat": 313435}` If the JWT Claims Set contains an expiration time (`exp`) claim, it must be an integer timestamp that is not in the past and no more than 12 hours in the future. If the JWT Claims Set does not contain an expiration time (`exp`) claim, this claim is added automatically, with a timestamp that is 1 hour in the future. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keyId` | `string \| null` | No | Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The id of the key used to sign the JWT. |
| `signedJwt` | `string \| null` | No | Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The signed JWT. |

***

### serviceAccounts.testIamPermissions

`iam.serviceAccounts.testIamPermissions`

Tests whether the caller has the specified permissions on a ServiceAccount

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.testIamPermissions({
	resource: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com',
	permissions: ['iam.serviceAccounts.actAs'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/serviceAccounts/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### serviceAccounts.undelete

`iam.serviceAccounts.undelete`

Restores a deleted ServiceAccount. **Important:** It is not always possible to restore a deleted service account. Use this method only as a last resort

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.undelete({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |
| `body` | `object` | No | The service account undelete request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `restoredAccount` | `object \| null` | No | An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service account. // |

> [accordion] restoredAccount full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   projectId?: string | null,
>   oauth2ClientId?: string | null,
>   email?: string | null,
>   name?: string | null,
>   uniqueId?: string | null,
>   etag?: string | null,
>   description?: string | null,
>   disabled?: boolean | null
> } | null
> ```

***

### serviceAccounts.update

`iam.serviceAccounts.update`

**Note:** We are in the process of deprecating this method. Use PatchServiceAccount instead

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.iam.serviceAccounts.update({ name: 'projects/demo-project/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com', description: 'Managed by Corsair' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. Format: `projects/<id>/serviceAccounts/<id>`. |
| `displayName` | `string` | No | Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes. |
| `body_name` | `string` | No | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. |
| `etag` | `string` | No | Deprecated. Do not use. (base64) |
| `description` | `string` | No | Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes. |
| `projectId` | `string \| null` | No | Output only. The ID of the project that owns the service account. |
| `oauth2ClientId` | `string \| null` | No | Output only. The OAuth 2.0 client ID for the service account. |
| `email` | `string \| null` | No | Output only. The email address of the service account. |
| `name` | `string \| null` | No | The resource name of the service account. Use one of the following formats: \* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: \* `projects/-/serviceAccounts/{EMAIL_ADDRESS}` \* `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. |
| `uniqueId` | `string \| null` | No | Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account. |
| `etag` | `string \| null` | No | Deprecated. Do not use. (base64) |
| `description` | `string \| null` | No | Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes. |
| `disabled` | `boolean \| null` | No | Output only. Whether the service account is disabled. |

***

## Iam Credentials

### locations.workforcePools.getAllowedLocations

`iamCredentials.locations.workforcePools.getAllowedLocations`

Returns the trust boundary info for a given workforce pool

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iamCredentials.locations.workforcePools.getAllowedLocations({ name: 'locations/us-central1/workforcePools/staff' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name of workforce pool. Format: `locations/<id>/workforcePools/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locations` | `string[] \| null` | No | Output only. The human readable trust boundary locations. For example, \["us-central1", "europe-west1"] |
| `encodedLocations` | `string \| null` | No | Output only. The hex encoded bitmap of the trust boundary locations |

***

### locations.workloadIdentityPools.getAllowedLocations

`iamCredentials.locations.workloadIdentityPools.getAllowedLocations`

Returns the trust boundary info for a given workload identity pool

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iamCredentials.locations.workloadIdentityPools.getAllowedLocations({ name: 'projects/demo-project/locations/us-central1/workloadIdentityPools/github' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name of workload identity pool. Format: `projects/<id>/locations/<id>/workloadIdentityPools/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `encodedLocations` | `string \| null` | No | Output only. The hex encoded bitmap of the trust boundary locations |
| `locations` | `string[] \| null` | No | Output only. The human readable trust boundary locations. For example, \["us-central1", "europe-west1"] |

***

### serviceAccounts.generateAccessToken

`iamCredentials.serviceAccounts.generateAccessToken`

Generates an OAuth 2.0 access token for a service account

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iamCredentials.serviceAccounts.generateAccessToken({
	name: 'projects/-/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com',
	scope: ['https://www.googleapis.com/auth/cloud-platform'],
	lifetime: '3600s',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. Format: `projects/<id>/serviceAccounts/<id>`. |
| `lifetime` | `string` | No | The desired lifetime duration of the access token in seconds. By default, the maximum allowed value is 1 hour. To set a lifetime of up to 12 hours, you can add the service account as an allowed value in an Organization Policy that enforces the `constraints/iam.allowServiceAccountCredentialLifetimeExtension` constraint. See detailed instructions at [https://cloud.google.com/iam/help/credentials/lifetime](https://cloud.google.com/iam/help/credentials/lifetime) If a value is not specified, the token's lifetime will be set to a default value of 1 hour. |
| `scope` | `string[]` | No | Required. Code to identify the scopes to be included in the OAuth 2.0 access token. See [https://developers.google.com/identity/protocols/googlescopes](https://developers.google.com/identity/protocols/googlescopes) for more information. At least one value required. |
| `delegates` | `string[]` | No | The sequence of service accounts in a delegation chain. This field is required for [delegated requests](https://cloud.google.com/iam/help/credentials/delegated-request). For [direct requests](https://cloud.google.com/iam/help/credentials/direct-request), which are more common, do not specify this field. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expireTime` | `string \| null` | No | Token expiration time. The expiration time is always set. |
| `accessToken` | `string \| null` | No | The OAuth 2.0 access token. |

***

### serviceAccounts.generateIdToken

`iamCredentials.serviceAccounts.generateIdToken`

Generates an OpenID Connect ID token for a service account

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iamCredentials.serviceAccounts.generateIdToken({ name: 'projects/-/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com', audience: 'https://api-abc123-uc.a.run.app', includeEmail: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. Format: `projects/<id>/serviceAccounts/<id>`. |
| `audience` | `string` | No | Required. The audience for the token, such as the API or account that this token grants access to. |
| `includeEmail` | `boolean` | No | Include the service account email in the token. If set to `true`, the token will contain `email` and `email_verified` claims. |
| `organizationNumberIncluded` | `boolean` | No | Include the organization number of the service account in the token. If set to `true`, the token will contain a `google.organization_number` claim. The value of the claim will be `null` if the service account isn't associated with an organization. |
| `delegates` | `string[]` | No | The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `token` | `string \| null` | No | The OpenId Connect ID token. The token is a JSON Web Token (JWT) that contains a payload with claims. See the [JSON Web Token spec](https://tools.ietf.org/html/rfc7519) for more information. Here is an example of a decoded JWT payload: `{ "iss": "https://accounts.google.com", "iat": 1496953245, "exp": 1496953245, "aud": "https://www.example.com", "sub": "107517467455664443765", "azp": "107517467455664443765", "email": "my-iam-account@my-project.iam.gserviceaccount.com", "email_verified": true, "google": { "organization_number": 123456 } }` |

***

### serviceAccounts.getAllowedLocations

`iamCredentials.serviceAccounts.getAllowedLocations`

Returns the trust boundary info for a given service account

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.iamCredentials.serviceAccounts.getAllowedLocations({ name: 'projects/-/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name of service account. Format: `projects/-/serviceAccounts/{service_account_email}` Format: `projects/<id>/serviceAccounts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `encodedLocations` | `string \| null` | No | Output only. The hex encoded bitmap of the trust boundary locations |
| `locations` | `string[] \| null` | No | Output only. The human readable trust boundary locations. For example, \["us-central1", "europe-west1"] |

***

### serviceAccounts.signBlob

`iamCredentials.serviceAccounts.signBlob`

Signs a blob using a service account's system-managed private key

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iamCredentials.serviceAccounts.signBlob({ name: 'projects/-/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com', payload: 'SGVsbG8gZnJvbSBDb3JzYWly' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. Format: `projects/<id>/serviceAccounts/<id>`. |
| `delegates` | `string[]` | No | The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. |
| `payload` | `string` | No | Required. The bytes to sign. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `signedBlob` | `string \| null` | No | The signature for the blob. Does not include the original blob. After the key pair referenced by the `key_id` response field expires, Google no longer exposes the public key that can be used to verify the blob. As a result, the receiver can no longer verify the signature. (base64) |
| `keyId` | `string \| null` | No | The ID of the key used to sign the blob. The key used for signing will remain valid for at least 12 hours after the blob is signed. To verify the signature, you can retrieve the public key in several formats from the following endpoints: - RSA public key wrapped in an X.509 v3 certificate: `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT_EMAIL}` - Raw key in JSON format: `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_EMAIL}` - JSON Web Key (JWK): `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_EMAIL}` |

***

### serviceAccounts.signJwt

`iamCredentials.serviceAccounts.signJwt`

Signs a JWT using a service account's system-managed private key

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.iamCredentials.serviceAccounts.signJwt({ name: 'projects/-/serviceAccounts/deployer@demo-project.iam.gserviceaccount.com', payload: '{"sub":"deployer@demo-project.iam.gserviceaccount.com","aud":"https://example.com","exp":1764720000}' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. Format: `projects/<id>/serviceAccounts/<id>`. |
| `payload` | `string` | No | Required. The JWT payload to sign. Must be a serialized JSON object that contains a JWT Claims Set. For example: `{"sub": "user@example.com", "iat": 313435}` If the JWT Claims Set contains an expiration time (`exp`) claim, it must be an integer timestamp that is not in the past and no more than 12 hours in the future. |
| `delegates` | `string[]` | No | The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `signedJwt` | `string \| null` | No | The signed JWT. Contains the automatically generated header; the client-supplied payload; and the signature, which is generated using the key referenced by the `kid` field in the header. After the key pair referenced by the `key_id` response field expires, Google no longer exposes the public key that can be used to verify the JWT. As a result, the receiver can no longer verify the signature. |
| `keyId` | `string \| null` | No | The ID of the key used to sign the JWT. The key used for signing will remain valid for at least 12 hours after the JWT is signed. To verify the signature, you can retrieve the public key in several formats from the following endpoints: - RSA public key wrapped in an X.509 v3 certificate: `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT_EMAIL}` - Raw key in JSON format: `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_EMAIL}` - JSON Web Key (JWK): `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_EMAIL}` |

***

## Logging

### entries.copy

`logging.entries.copy`

Copies a set of log entries from a log bucket to a Cloud Storage bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.entries.copy({ name: 'projects/demo-project/locations/global/buckets/_Default', destination: 'storage.googleapis.com/demo-bucket', filter: 'severity>=ERROR' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | Required. Log bucket from which to copy log entries.For example:"projects/my-project/locations/global/buckets/my-source-bucket" |
| `destination` | `string` | No | Required. Destination to which to copy log entries. For example: "storage.googleapis.com/GCS\_BUCKET" |
| `filter` | `string` | No | Optional. A filter specifying which log entries to copy. The filter must be no more than 20k characters. An empty filter matches all log entries. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/\{unique\_id}. |
| `error` | `object \| null` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `done` | `boolean \| null` | No | If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### entries.list

`logging.entries.list`

List log entries from projects, folders or organizations (resourceNames), filtered with the Logging query language. Add a `timestamp>="<RFC 3339>"` filter and orderBy "timestamp desc" for recent entries; without them a page can come back empty with a nextPageToken, which means keep paging

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.entries.list({
	resourceNames: ['projects/demo-project'],
	filter: 'timestamp>="2026-12-02T00:00:00Z" AND severity>=ERROR AND resource.type="cloud_run_revision"',
	orderBy: 'timestamp desc',
	pageSize: 50,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. If present, then retrieve the next batch of results from the preceding call to this method. page\_token must be the value of next\_page\_token from the previous response. The values of other method parameters should be identical to those in the previous call. |
| `filter` | `string` | No | Optional. A filter that chooses which log entries to return. For more information, see Logging query language ([https://docs.cloud.google.com/logging/docs/view/logging-query-language).Only](https://docs.cloud.google.com/logging/docs/view/logging-query-language\).Only) log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource\_names. Referencing a parent resource that is not listed in resource\_names will cause the filter to return no results. |
| `orderBy` | `string` | No | Optional. How the results should be sorted. Presently, the only permitted values are "timestamp asc" (default) and "timestamp desc". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert\_id values.We recommend setting the order\_by field to "timestamp desc" when listing recently ingested log entries. |
| `projectIds` | `string[]` | No | Optional. Deprecated. Use resource\_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: "my-project-1A". |
| `pageSize` | `number` | No | Optional. The maximum number of results to return from this request. Default is 50. If the value is negative, the request is rejected.The presence of next\_page\_token in the response indicates that more results might be available. |
| `resourceNames` | `string[]` | No | Required. Names of one or more parent resources from which to retrieve log entries. Resources may either be resource containers or specific LogViews. For the case of resource containers, all logs ingested into that container will be returned regardless of which LogBuckets they are actually stored in - i.e. these queries may fan out to multiple regions. In the event of region unavailability, specify a specific set of LogViews that do not include the unavailable region. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `entries` | `object[] \| null` | No | A list of log entries. If entries is empty, nextPageToken may still be returned, indicating that more entries may exist. See nextPageToken for more information. |
| `nextPageToken` | `string \| null` | No | If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.If a value for next\_page\_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page\_token to continue the search. |

> [accordion] entries full type
>
> ```ts theme={null}
> {
>   protoPayload?: Record<string, any> | null,
>   apphubSource?: {
>     service?: {
>       id?: string | null,
>       criticalityType?: string | null,
>       environmentType?: string | null
>     } | null,
>     workload?: {
>       environmentType?: string | null,
>       id?: string | null,
>       criticalityType?: string | null
>     } | null,
>     application?: {
>       id?: string | null,
>       location?: string | null,
>       container?: string | null
>     } | null
>   } | null,
>   httpRequest?: {
>     cacheHit?: boolean | null,
>     userAgent?: string | null,
>     requestUrl?: string | null,
>     latency?: string | null,
>     cacheLookup?: boolean | null,
>     serverIp?: string | null,
>     protocol?: string | null,
>     cacheFillBytes?: string | number | null,
>     requestSize?: string | number | null,
>     requestMethod?: string | null,
>     cacheValidatedWithOriginServer?: boolean | null,
>     remoteIp?: string | null,
>     referer?: string | null,
>     status?: number | null,
>     responseSize?: string | number | null
>   } | null,
>   apphub?: {
>     service?: {
>       id?: string | null,
>       criticalityType?: string | null,
>       environmentType?: string | null
>     } | null,
>     workload?: {
>       environmentType?: string | null,
>       id?: string | null,
>       criticalityType?: string | null
>     } | null,
>     application?: {
>       id?: string | null,
>       location?: string | null,
>       container?: string | null
>     } | null
>   } | null,
>   trace?: string | null,
>   resource?: {
>     labels?: Record<string, string> | null,
>     type?: string | null
>   } | null,
>   metadata?: {
>     systemLabels?: Record<string, any> | null,
>     userLabels?: Record<string, string> | null
>   } | null,
>   receiveTimestamp?: string | null,
>   logName?: string | null,
>   apphubDestination?: {
>     service?: {
>       id?: string | null,
>       criticalityType?: string | null,
>       environmentType?: string | null
>     } | null,
>     workload?: {
>       environmentType?: string | null,
>       id?: string | null,
>       criticalityType?: string | null
>     } | null,
>     application?: {
>       id?: string | null,
>       location?: string | null,
>       container?: string | null
>     } | null
>   } | null,
>   labels?: Record<string, string> | null,
>   errorGroups?: {
>     id?: string | null
>   }[] | null,
>   severity?: string | null,
>   otel?: Record<string, any> | null,
>   split?: {
>     totalSplits?: number | null,
>     uid?: string | null,
>     index?: number | null
>   } | null,
>   spanId?: string | null,
>   insertId?: string | null,
>   operation?: {
>     id?: string | null,
>     first?: boolean | null,
>     last?: boolean | null,
>     producer?: string | null
>   } | null,
>   sourceLocation?: {
>     file?: string | null,
>     line?: string | number | null,
>     function?: string | null
>   } | null,
>   jsonPayload?: Record<string, any> | null,
>   timestamp?: string | null,
>   textPayload?: string | null,
>   traceSampled?: boolean | null
> }[] | null
> ```

***

### entries.write

`logging.entries.write`

Writes log entries to Logging. This API method is the only way to send log entries to Logging

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.entries.write({
	logName: 'projects/demo-project/logs/deploys',
	resource: { type: 'global' },
	entries: [{
		severity: 'INFO',
		jsonPayload: { event: 'deploy', version: 'v1' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `object` | No | An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. |
| `dryRun` | `boolean` | No | Optional. If true, the request should expect normal response, but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. |
| `logName` | `string` | No | Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log\_name: projects/\[PROJECT\_ID]/logs/\[LOG\_ID] organizations/\[ORGANIZATION\_ID]/logs/\[LOG\_ID] billingAccounts/\[BILLING\_ACCOUNT\_ID]/logs/\[LOG\_ID]… |
| `partialSuccess` | `boolean` | No | Optional. Whether a batch's valid entries should be written even if some other entry failed due to a permanent error such as INVALID\_ARGUMENT or PERMISSION\_DENIED. If any entry failed, then the response status is the response status of one of the failed entries. The response will include error details in WriteLogEntriesPartialErrors.log\_entry\_errors keyed by the entries' zero-based index in the entries. Failed requests for which no entries are written will not include per-entry errors. |
| `labels` | `Record<string, string>` | No | Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry. |
| `entries` | `object[]` | No | Required. The log entries to send to Logging. The order of log entries in this list does not matter. Values supplied in this method's log\_name, resource, and labels fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the LogEntry type.If the timestamp or insert\_id fields are missing in log entries, then this method supplies the current time or a unique identifier, respectively. |

> [accordion] resource full type
>
> ```ts theme={null}
> {
>   labels?: Record<string, string>,
>   type?: string
> }
> ```

> [accordion] entries full type
>
> ```ts theme={null}
> {
>   protoPayload?: Record<string, any>,
>   httpRequest?: {
>     cacheHit?: boolean,
>     userAgent?: string,
>     requestUrl?: string,
>     latency?: string,
>     cacheLookup?: boolean,
>     serverIp?: string,
>     protocol?: string,
>     cacheFillBytes?: string | number,
>     requestSize?: string | number,
>     requestMethod?: string,
>     cacheValidatedWithOriginServer?: boolean,
>     remoteIp?: string,
>     referer?: string,
>     status?: number,
>     responseSize?: string | number
>   },
>   trace?: string,
>   resource?: {
>     labels?: Record<string, string>,
>     type?: string
>   },
>   logName?: string,
>   labels?: Record<string, string>,
>   severity?: DEFAULT | DEBUG | INFO | NOTICE | WARNING | ERROR | CRITICAL | ALERT | EMERGENCY,
>   otel?: Record<string, any>,
>   split?: {
>     totalSplits?: number,
>     uid?: string,
>     index?: number
>   },
>   spanId?: string,
>   insertId?: string,
>   operation?: {
>     id?: string,
>     first?: boolean,
>     last?: boolean,
>     producer?: string
>   },
>   sourceLocation?: {
>     file?: string,
>     line?: string | number,
>     function?: string
>   },
>   jsonPayload?: Record<string, any>,
>   timestamp?: string,
>   textPayload?: string,
>   traceSampled?: boolean
> }[]
> ```

**Output:** *empty object*

***

### exclusions.create

`logging.exclusions.create`

Creates a new exclusion in the \_Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.exclusions.create({
	parent: 'projects/demo-project',
	name: 'no-debug',
	filter: 'severity<=DEBUG',
	description: 'Drop debug logs',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource in which to create the exclusion: "projects/\[PROJECT\_ID]" "organizations/\[ORGANIZATION\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]" "folders/\[FOLDER\_ID]" For examples:"projects/my-logging-project" "organizations/123456789" Format: `<id>/<id>`. |
| `description` | `string` | No | Optional. A description of this exclusion. |
| `filter` | `string` | No | Required. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)) that matches the log entries to be excluded. By using the sample function ([https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample](https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample)), you can exclude less than 100% of the matching log entries.For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets:resource.type=gcs\_bucket severity\<ERROR sample(insertId, 0.99) |
| `disabled` | `boolean` | No | Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field. |
| `name` | `string` | No | Optional. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the exclusion.This field may not be present for older exclusions. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the exclusion.This field may not be present for older exclusions. |
| `description` | `string \| null` | No | Optional. A description of this exclusion. |
| `filter` | `string \| null` | No | Required. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)) that matches the log entries to be excluded. By using the sample function ([https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample](https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample)), you can exclude less than 100% of the matching log entries.For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets:resource.type=gcs\_bucket severity\<ERROR sample(insertId, 0.99) |
| `disabled` | `boolean \| null` | No | Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field. |
| `name` | `string \| null` | No | Optional. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric. |

***

### exclusions.delete

`logging.exclusions.delete`

Deletes an exclusion in the \_Default sink

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.logging.exclusions.delete({ name: 'projects/demo-project/exclusions/no-debug' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of an existing exclusion to delete: "projects/\[PROJECT\_ID]/exclusions/\[EXCLUSION\_ID]" "organizations/\[ORGANIZATION\_ID]/exclusions/\[EXCLUSION\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/exclusions/\[EXCLUSION\_ID]" "folders/\[FOLDER\_ID]/exclusions/\[EXCLUSION\_ID]" For example:"projects/my-project/exclusions/my-exclusion" Format: `<id>/<id>/exclusions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### exclusions.get

`logging.exclusions.get`

Gets the description of an exclusion in the \_Default sink

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.exclusions.get({ name: 'projects/demo-project/exclusions/no-debug' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of an existing exclusion: "projects/\[PROJECT\_ID]/exclusions/\[EXCLUSION\_ID]" "organizations/\[ORGANIZATION\_ID]/exclusions/\[EXCLUSION\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/exclusions/\[EXCLUSION\_ID]" "folders/\[FOLDER\_ID]/exclusions/\[EXCLUSION\_ID]" For example:"projects/my-project/exclusions/my-exclusion" Format: `<id>/<id>/exclusions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the exclusion.This field may not be present for older exclusions. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the exclusion.This field may not be present for older exclusions. |
| `description` | `string \| null` | No | Optional. A description of this exclusion. |
| `filter` | `string \| null` | No | Required. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)) that matches the log entries to be excluded. By using the sample function ([https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample](https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample)), you can exclude less than 100% of the matching log entries.For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets:resource.type=gcs\_bucket severity\<ERROR sample(insertId, 0.99) |
| `disabled` | `boolean \| null` | No | Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field. |
| `name` | `string \| null` | No | Optional. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric. |

***

### exclusions.list

`logging.exclusions.list`

Lists all the exclusions on the \_Default sink in a parent resource (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.exclusions.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. |
| `parent` | `string` | Yes | Required. The parent resource whose exclusions are to be listed. "projects/\[PROJECT\_ID]" "organizations/\[ORGANIZATION\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]" "folders/\[FOLDER\_ID]" Format: `<id>/<id>`. |
| `pageSize` | `number` | No | Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `exclusions` | `object[] \| null` | No | A list of exclusions. |
| `nextPageToken` | `string \| null` | No | If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. |

> [accordion] exclusions full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   createTime?: string | null,
>   description?: string | null,
>   filter?: string | null,
>   disabled?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### exclusions.patch

`logging.exclusions.patch`

Changes one or more properties of an existing exclusion in the \_Default sink

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.exclusions.patch({ name: 'projects/demo-project/exclusions/no-debug', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the exclusion to update: "projects/\[PROJECT\_ID]/exclusions/\[EXCLUSION\_ID]" "organizations/\[ORGANIZATION\_ID]/exclusions/\[EXCLUSION\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/exclusions/\[EXCLUSION\_ID]" "folders/\[FOLDER\_ID]/exclusions/\[EXCLUSION\_ID]" For example:"projects/my-project/exclusions/my-exclusion" Format: `<id>/<id>/exclusions/<id>`. |
| `updateMask` | `string` | No | Required. A non-empty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update\_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update\_mask of "filter,description". |
| `description` | `string` | No | Optional. A description of this exclusion. |
| `filter` | `string` | No | Required. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)) that matches the log entries to be excluded. By using the sample function ([https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample](https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample)), you can exclude less than 100% of the matching log entries.For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets:resource.type=gcs\_bucket severity\<ERROR sample(insertId, 0.99) |
| `disabled` | `boolean` | No | Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field. |
| `body_name` | `string` | No | Optional. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the exclusion.This field may not be present for older exclusions. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the exclusion.This field may not be present for older exclusions. |
| `description` | `string \| null` | No | Optional. A description of this exclusion. |
| `filter` | `string \| null` | No | Required. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)) that matches the log entries to be excluded. By using the sample function ([https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample](https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample)), you can exclude less than 100% of the matching log entries.For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets:resource.type=gcs\_bucket severity\<ERROR sample(insertId, 0.99) |
| `disabled` | `boolean \| null` | No | Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field. |
| `name` | `string \| null` | No | Optional. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric. |

***

### getCmekSettings

`logging.getCmekSettings`

Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for...

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.getCmekSettings({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource for which to retrieve CMEK settings. "projects/\[PROJECT\_ID]/cmekSettings" "organizations/\[ORGANIZATION\_ID]/cmekSettings" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/cmekSettings" "folders/\[FOLDER\_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. Format: `<id>/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kmsKeyVersionName` | `string \| null` | No | Output only. The CryptoKeyVersion resource name for the configured Cloud KMS key.KMS key name format… |
| `name` | `string \| null` | No | Output only. The resource name of the CMEK settings. |
| `serviceAccountId` | `string \| null` | No | Output only. The service account that will be used by the Log Router to access your Cloud KMS key.Before enabling CMEK for Log Router, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account that the Log Router will use to access your Cloud KMS key. Use GetCmekSettings to obtain the service account ID.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |
| `kmsKeyName` | `string \| null` | No | Optional. The resource name for the configured Cloud KMS key.KMS key name format… |

***

### getSettings

`logging.getSettings`

Gets the settings for the given resource.Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts.See View default resource settings for Logging ([https://docs.cloud.google.com/logging/docs/default-settings#view-org-settings](https://docs.cloud.google.com/logging/docs/default-settings#view-org-settings)) for more information

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.getSettings({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource for which to retrieve settings. "projects/\[PROJECT\_ID]/settings" "organizations/\[ORGANIZATION\_ID]/settings" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/settings" "folders/\[FOLDER\_ID]/settings" For example:"organizations/12345/settings"Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts. Format: `<id>/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `loggingServiceAccountId` | `string \| null` | No | Output only. The service account for the given resource container, such as project or folder. Log sinks use this service account as their writer\_identity if no custom service account is provided in the request when calling the create sink method. |
| `name` | `string \| null` | No | Output only. The resource name of the settings. |
| `defaultSinkConfig` | `object \| null` | No | Describes the custom \_Default sink configuration that is used to override the built-in \_Default sink configuration in newly created resource containers, such as projects or folders. |
| `storageLocation` | `string \| null` | No | Optional. The storage location for the \_Default and \_Required log buckets of newly created projects and folders, unless the storage location is explicitly provided.Example value: europe-west1.Note: this setting does not affect the location of resources where a location is explicitly provided when created, such as custom log buckets. |
| `kmsServiceAccountId` | `string \| null` | No | Output only. The service account that will be used by the Log Router to access your Cloud KMS key.Before enabling CMEK, you must first assign the role roles/cloudkms.cryptoKeyEncrypterDecrypter to the service account that will be used to access your Cloud KMS key. Use GetSettings to obtain the service account ID.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |
| `disableDefaultSink` | `boolean \| null` | No | Optional. If set to true, the \_Default sink in newly created projects and folders will created in a disabled state. This can be used to automatically disable log storage if there is already an aggregated sink configured in the hierarchy. The \_Default sink can be re-enabled manually if needed. |
| `kmsKeyName` | `string \| null` | No | Optional. The resource name for the configured Cloud KMS key.KMS key name format… |

> [accordion] defaultSinkConfig full type
>
> ```ts theme={null}
> {
>   exclusions?: {
>     updateTime?: string | null,
>     createTime?: string | null,
>     description?: string | null,
>     filter?: string | null,
>     disabled?: boolean | null,
>     name?: string | null
>   }[] | null,
>   mode?: string | null,
>   filter?: string | null
> } | null
> ```

***

### locations.buckets.create

`logging.locations.buckets.create`

Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.create({
	parent: 'projects/demo-project/locations/us-central1',
	bucketId: 'audit',
	retentionDays: 365,
	description: 'Audit logs',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucketId` | `string` | No | Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. |
| `parent` | `string` | Yes | Required. The resource in which to create the log bucket: "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]" For example:"projects/my-project/locations/global" Format: `<id>/<id>/locations/<id>`. |
| `description` | `string` | No | Optional. Describes this bucket. |
| `indexConfigs` | `object[]` | No | Optional. A list of indexed fields and related configuration data. |
| `locked` | `boolean` | No | Optional. Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty. |
| `restrictedFields` | `string[]` | No | Optional. Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz) |
| `retentionDays` | `number` | No | Optional. Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. |
| `analyticsEnabled` | `boolean` | No | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
| `cmekSettings` | `object` | No | Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |

> [accordion] indexConfigs full type
>
> ```ts theme={null}
> {
>   fieldPath?: string,
>   type?: INDEX_TYPE_UNSPECIFIED | INDEX_TYPE_STRING | INDEX_TYPE_INTEGER
> }[]
> ```

> [accordion] cmekSettings full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | Optional. Describes this bucket. |
| `indexConfigs` | `object[] \| null` | No | Optional. A list of indexed fields and related configuration data. |
| `locked` | `boolean \| null` | No | Optional. Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty. |
| `restrictedFields` | `string[] \| null` | No | Optional. Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz) |
| `name` | `string \| null` | No | Output only. The resource name of the bucket.For example:projects/my-project/locations/global/buckets/my-bucketFor a list of supported locations, see Supported Regions ([https://docs.cloud.google.com/logging/docs/region-support)For](https://docs.cloud.google.com/logging/docs/region-support\)For) the location of global it is unspecified where log entries are actually stored.After a bucket has been created, the location cannot be changed. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the bucket. |
| `retentionDays` | `number \| null` | No | Optional. Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
| `analyticsEnabled` | `boolean \| null` | No | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
| `lifecycleState` | `string \| null` | No | Output only. The bucket lifecycle state. |
| `cmekSettings` | `object \| null` | No | Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |

> [accordion] indexConfigs full type
>
> ```ts theme={null}
> {
>   fieldPath?: string | null,
>   type?: string | null,
>   createTime?: string | null
> }[] | null
> ```

> [accordion] cmekSettings full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null,
>   name?: string | null,
>   serviceAccountId?: string | null,
>   kmsKeyName?: string | null
> } | null
> ```

***

### locations.buckets.createAsync

`logging.locations.buckets.createAsync`

Creates a log bucket asynchronously that can be used to store log entries.After a bucket has been created, the bucket's location cannot be changed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.createAsync({
	parent: 'projects/demo-project/locations/us-central1',
	bucketId: 'audit',
	retentionDays: 365,
	description: 'Audit logs',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucketId` | `string` | No | Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. |
| `parent` | `string` | Yes | Required. The resource in which to create the log bucket: "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]" For example:"projects/my-project/locations/global" Format: `<id>/<id>/locations/<id>`. |
| `description` | `string` | No | Optional. Describes this bucket. |
| `indexConfigs` | `object[]` | No | Optional. A list of indexed fields and related configuration data. |
| `locked` | `boolean` | No | Optional. Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty. |
| `restrictedFields` | `string[]` | No | Optional. Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz) |
| `retentionDays` | `number` | No | Optional. Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. |
| `analyticsEnabled` | `boolean` | No | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
| `cmekSettings` | `object` | No | Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |

> [accordion] indexConfigs full type
>
> ```ts theme={null}
> {
>   fieldPath?: string,
>   type?: INDEX_TYPE_UNSPECIFIED | INDEX_TYPE_STRING | INDEX_TYPE_INTEGER
> }[]
> ```

> [accordion] cmekSettings full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/\{unique\_id}. |
| `error` | `object \| null` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `done` | `boolean \| null` | No | If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.buckets.delete

`logging.locations.buckets.delete`

Deletes a log bucket.Changes the bucket's lifecycle\_state to the DELETE\_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.delete({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full resource name of the bucket to delete. "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" Format: `<id>/<id>/locations/<id>/buckets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.buckets.get

`logging.locations.buckets.get`

Gets a log bucket

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.get({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the bucket: "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" Format: `<id>/<id>/locations/<id>/buckets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | Optional. Describes this bucket. |
| `indexConfigs` | `object[] \| null` | No | Optional. A list of indexed fields and related configuration data. |
| `locked` | `boolean \| null` | No | Optional. Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty. |
| `restrictedFields` | `string[] \| null` | No | Optional. Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz) |
| `name` | `string \| null` | No | Output only. The resource name of the bucket.For example:projects/my-project/locations/global/buckets/my-bucketFor a list of supported locations, see Supported Regions ([https://docs.cloud.google.com/logging/docs/region-support)For](https://docs.cloud.google.com/logging/docs/region-support\)For) the location of global it is unspecified where log entries are actually stored.After a bucket has been created, the location cannot be changed. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the bucket. |
| `retentionDays` | `number \| null` | No | Optional. Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
| `analyticsEnabled` | `boolean \| null` | No | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
| `lifecycleState` | `string \| null` | No | Output only. The bucket lifecycle state. |
| `cmekSettings` | `object \| null` | No | Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |

> [accordion] indexConfigs full type
>
> ```ts theme={null}
> {
>   fieldPath?: string | null,
>   type?: string | null,
>   createTime?: string | null
> }[] | null
> ```

> [accordion] cmekSettings full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null,
>   name?: string | null,
>   serviceAccountId?: string | null,
>   kmsKeyName?: string | null
> } | null
> ```

***

### locations.buckets.links.create

`logging.locations.buckets.links.create`

Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.links.create({ parent: 'projects/demo-project/locations/us-central1/buckets/app-logs', linkId: 'analytics', description: 'BigQuery link' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `linkId` | `string` | No | Required. The ID to use for the link. The link\_id can have up to 100 characters. A valid link\_id must only have alphanumeric characters and underscores within it. |
| `parent` | `string` | Yes | Required. The full resource name of the bucket to create a link for. "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" Format: `<id>/<id>/locations/<id>/buckets/<id>`. |
| `description` | `string` | No | Optional. Describes this link.The maximum length of the description is 8000 characters. |
| `bigqueryDataset` | `object` | No | Describes a BigQuery dataset that was created by a link. |

> [accordion] bigqueryDataset full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/\{unique\_id}. |
| `error` | `object \| null` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `done` | `boolean \| null` | No | If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.buckets.links.delete

`logging.locations.buckets.links.delete`

Deletes a link. This will also delete the corresponding BigQuery linked dataset

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.links.delete({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs/links/analytics' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full resource name of the link to delete. "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" "folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" Format: `<id>/<id>/locations/<id>/buckets/<id>/links/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/\{unique\_id}. |
| `error` | `object \| null` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `done` | `boolean \| null` | No | If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.buckets.links.get

`logging.locations.buckets.links.get`

Gets a link

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.links.get({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs/links/analytics' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the link: "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" "folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" Format: `<id>/<id>/locations/<id>/buckets/<id>/links/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | Optional. Describes this link.The maximum length of the description is 8000 characters. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the link. |
| `name` | `string \| null` | No | Output only. The resource name of the link. The name can have up to 100 characters. A valid link id (at the end of the link name) must only have alphanumeric characters and underscores within it. "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/links/\[LINK\_ID]"… |
| `lifecycleState` | `string \| null` | No | Output only. The resource lifecycle state. |
| `bigqueryDataset` | `object \| null` | No | Describes a BigQuery dataset that was created by a link. |

> [accordion] bigqueryDataset full type
>
> ```ts theme={null}
> {
>   datasetId?: string | null
> } | null
> ```

***

### locations.buckets.links.list

`logging.locations.buckets.links.list`

Lists links (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.links.list({ parent: 'projects/demo-project/locations/us-central1/buckets/app-logs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource whose links are to be listed: "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" Format: `<id>/<id>/locations/<id>/buckets/<id>`. |
| `pageToken` | `string` | No | Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. |
| `pageSize` | `number` | No | Optional. The maximum number of results to return from this request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `links` | `object[] \| null` | No | A list of links. |
| `nextPageToken` | `string \| null` | No | If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   createTime?: string | null,
>   name?: string | null,
>   lifecycleState?: string | null,
>   bigqueryDataset?: {
>     datasetId?: string | null
>   } | null
> }[] | null
> ```

***

### locations.buckets.list

`logging.locations.buckets.list`

Lists log buckets (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource whose buckets are to be listed: "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]" "folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION\_ID will return all buckets. Format: `<id>/<id>/locations/<id>`. |
| `pageToken` | `string` | No | Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. |
| `pageSize` | `number` | No | Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. |
| `buckets` | `object[] \| null` | No | A list of buckets. |

> [accordion] buckets full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   indexConfigs?: {
>     fieldPath?: string | null,
>     type?: string | null,
>     createTime?: string | null
>   }[] | null,
>   locked?: boolean | null,
>   restrictedFields?: string[] | null,
>   name?: string | null,
>   updateTime?: string | null,
>   retentionDays?: number | null,
>   createTime?: string | null,
>   analyticsEnabled?: boolean | null,
>   lifecycleState?: string | null,
>   cmekSettings?: {
>     kmsKeyVersionName?: string | null,
>     name?: string | null,
>     serviceAccountId?: string | null,
>     kmsKeyName?: string | null
>   } | null
> }[] | null
> ```

***

### locations.buckets.patch

`logging.locations.buckets.patch`

Updates a log bucket.If the bucket has a lifecycle\_state of DELETE\_REQUESTED, then FAILED\_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.patch({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor) example: updateMask=retention\_days |
| `name` | `string` | Yes | Required. The full resource name of the bucket to update. "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" Format: `<id>/<id>/locations/<id>/buckets/<id>`. |
| `description` | `string` | No | Optional. Describes this bucket. |
| `indexConfigs` | `object[]` | No | Optional. A list of indexed fields and related configuration data. |
| `locked` | `boolean` | No | Optional. Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty. |
| `restrictedFields` | `string[]` | No | Optional. Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz) |
| `retentionDays` | `number` | No | Optional. Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. |
| `analyticsEnabled` | `boolean` | No | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
| `cmekSettings` | `object` | No | Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |

> [accordion] indexConfigs full type
>
> ```ts theme={null}
> {
>   fieldPath?: string,
>   type?: INDEX_TYPE_UNSPECIFIED | INDEX_TYPE_STRING | INDEX_TYPE_INTEGER
> }[]
> ```

> [accordion] cmekSettings full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | Optional. Describes this bucket. |
| `indexConfigs` | `object[] \| null` | No | Optional. A list of indexed fields and related configuration data. |
| `locked` | `boolean \| null` | No | Optional. Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty. |
| `restrictedFields` | `string[] \| null` | No | Optional. Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz) |
| `name` | `string \| null` | No | Output only. The resource name of the bucket.For example:projects/my-project/locations/global/buckets/my-bucketFor a list of supported locations, see Supported Regions ([https://docs.cloud.google.com/logging/docs/region-support)For](https://docs.cloud.google.com/logging/docs/region-support\)For) the location of global it is unspecified where log entries are actually stored.After a bucket has been created, the location cannot be changed. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the bucket. |
| `retentionDays` | `number \| null` | No | Optional. Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
| `analyticsEnabled` | `boolean \| null` | No | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
| `lifecycleState` | `string \| null` | No | Output only. The bucket lifecycle state. |
| `cmekSettings` | `object \| null` | No | Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |

> [accordion] indexConfigs full type
>
> ```ts theme={null}
> {
>   fieldPath?: string | null,
>   type?: string | null,
>   createTime?: string | null
> }[] | null
> ```

> [accordion] cmekSettings full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null,
>   name?: string | null,
>   serviceAccountId?: string | null,
>   kmsKeyName?: string | null
> } | null
> ```

***

### locations.buckets.undelete

`logging.locations.buckets.undelete`

Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.undelete({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full resource name of the bucket to undelete. "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" Format: `<id>/<id>/locations/<id>/buckets/<id>`. |
| `body` | `object` | No | The parameters to UndeleteBucket. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.buckets.updateAsync

`logging.locations.buckets.updateAsync`

Updates a log bucket asynchronously.If the bucket has a lifecycle\_state of DELETE\_REQUESTED, then FAILED\_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.updateAsync({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full resource name of the bucket to update. "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" "folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" Format: `<id>/<id>/locations/<id>/buckets/<id>`. |
| `updateMask` | `string` | No | Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor) example: updateMask=retention\_days |
| `description` | `string` | No | Optional. Describes this bucket. |
| `indexConfigs` | `object[]` | No | Optional. A list of indexed fields and related configuration data. |
| `locked` | `boolean` | No | Optional. Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty. |
| `restrictedFields` | `string[]` | No | Optional. Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz) |
| `retentionDays` | `number` | No | Optional. Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. |
| `analyticsEnabled` | `boolean` | No | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
| `cmekSettings` | `object` | No | Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |

> [accordion] indexConfigs full type
>
> ```ts theme={null}
> {
>   fieldPath?: string,
>   type?: INDEX_TYPE_UNSPECIFIED | INDEX_TYPE_STRING | INDEX_TYPE_INTEGER
> }[]
> ```

> [accordion] cmekSettings full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/\{unique\_id}. |
| `error` | `object \| null` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `done` | `boolean \| null` | No | If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.buckets.views.create

`logging.locations.buckets.views.create`

Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.views.create({
	parent: 'projects/demo-project/locations/us-central1/buckets/app-logs',
	viewId: 'api-logs',
	filter: 'resource.type = "cloud_run_revision"',
	description: 'Cloud Run logs only',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The bucket in which to create the view `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example:"projects/my-project/locations/global/buckets/my-bucket" Format: `<id>/<id>/locations/<id>/buckets/<id>`. |
| `viewId` | `string` | No | Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, and hyphens. |
| `filter` | `string` | No | Optional. Filter that restricts which log entries in a bucket are visible in this view\.Filters must be logical conjunctions that use the AND operator, and they can use any of the following qualifiers: SOURCE(), which specifies a project, folder, organization, or billing account of origin. resource.type, which specifies the resource type. LOG\_ID(), which identifies the log.They can also use the negations of these qualifiers with the NOT operator.For example:SOURCE("projects/myproject") AND resource.type = "gce\_instance" AND NOT LOG\_ID("stdout") |
| `description` | `string` | No | Optional. Describes this view. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string \| null` | No | Optional. Filter that restricts which log entries in a bucket are visible in this view\.Filters must be logical conjunctions that use the AND operator, and they can use any of the following qualifiers: SOURCE(), which specifies a project, folder, organization, or billing account of origin. resource.type, which specifies the resource type. LOG\_ID(), which identifies the log.They can also use the negations of these qualifiers with the NOT operator.For example:SOURCE("projects/myproject") AND resource.type = "gce\_instance" AND NOT LOG\_ID("stdout") |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the view. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the view. |
| `description` | `string \| null` | No | Optional. Describes this view. |
| `name` | `string \| null` | No | Output only. The resource name of the view\.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view |

***

### locations.buckets.views.delete

`logging.locations.buckets.views.delete`

Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.views.delete({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs/views/api-logs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full resource name of the view to delete: "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/views/\[VIEW\_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" Format: `<id>/<id>/locations/<id>/buckets/<id>/views/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.buckets.views.get

`logging.locations.buckets.views.get`

Gets a view on a log bucket

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.views.get({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs/views/api-logs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the policy: "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/views/\[VIEW\_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" Format: `<id>/<id>/locations/<id>/buckets/<id>/views/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string \| null` | No | Optional. Filter that restricts which log entries in a bucket are visible in this view\.Filters must be logical conjunctions that use the AND operator, and they can use any of the following qualifiers: SOURCE(), which specifies a project, folder, organization, or billing account of origin. resource.type, which specifies the resource type. LOG\_ID(), which identifies the log.They can also use the negations of these qualifiers with the NOT operator.For example:SOURCE("projects/myproject") AND resource.type = "gce\_instance" AND NOT LOG\_ID("stdout") |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the view. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the view. |
| `description` | `string \| null` | No | Optional. Describes this view. |
| `name` | `string \| null` | No | Output only. The resource name of the view\.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view |

***

### locations.buckets.views.getIamPolicy

`logging.locations.buckets.views.getIamPolicy`

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.views.getIamPolicy({ resource: 'projects/demo-project/locations/us-central1/buckets/app-logs/views/api-logs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See Resource names ([https://cloud.google.com/apis/design/resource\_names](https://cloud.google.com/apis/design/resource_names)) for the appropriate value for this field. Format: `<id>/<id>/locations/<id>/buckets/<id>/views/<id>`. |
| `options` | `object` | No | Encapsulates settings provided to GetIamPolicy. |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   requestedPolicyVersion?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of members, or principals, with a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one principal.The bindings in a Policy can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the bindings grant 50 different roles to user:[alice@example.com](mailto:alice@example.com), and not to any other principal, then you can add another 1,450 principals to the bindings in the Policy. |
| `etag` | `string \| null` | No | etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations: Getting a policy that includes a conditional role binding Adding a conditional role binding to a policy Changing a conditional role binding in a policy Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null,
>   role?: string | null
> }[] | null
> ```

***

### locations.buckets.views.list

`logging.locations.buckets.views.list`

Lists views on a log bucket (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.views.list({ parent: 'projects/demo-project/locations/us-central1/buckets/app-logs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. |
| `pageSize` | `number` | No | Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. |
| `parent` | `string` | Yes | Required. The bucket whose views are to be listed: "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]" Format: `<id>/<id>/locations/<id>/buckets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. |
| `views` | `object[] \| null` | No | A list of views. |

> [accordion] views full type
>
> ```ts theme={null}
> {
>   filter?: string | null,
>   createTime?: string | null,
>   updateTime?: string | null,
>   description?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### locations.buckets.views.patch

`logging.locations.buckets.views.patch`

Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.views.patch({ name: 'projects/demo-project/locations/us-central1/buckets/app-logs/views/api-logs', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor) example: updateMask=filter |
| `name` | `string` | Yes | Required. The full resource name of the view to update "projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/views/\[VIEW\_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" Format: `<id>/<id>/locations/<id>/buckets/<id>/views/<id>`. |
| `filter` | `string` | No | Optional. Filter that restricts which log entries in a bucket are visible in this view\.Filters must be logical conjunctions that use the AND operator, and they can use any of the following qualifiers: SOURCE(), which specifies a project, folder, organization, or billing account of origin. resource.type, which specifies the resource type. LOG\_ID(), which identifies the log.They can also use the negations of these qualifiers with the NOT operator.For example:SOURCE("projects/myproject") AND resource.type = "gce\_instance" AND NOT LOG\_ID("stdout") |
| `description` | `string` | No | Optional. Describes this view. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string \| null` | No | Optional. Filter that restricts which log entries in a bucket are visible in this view\.Filters must be logical conjunctions that use the AND operator, and they can use any of the following qualifiers: SOURCE(), which specifies a project, folder, organization, or billing account of origin. resource.type, which specifies the resource type. LOG\_ID(), which identifies the log.They can also use the negations of these qualifiers with the NOT operator.For example:SOURCE("projects/myproject") AND resource.type = "gce\_instance" AND NOT LOG\_ID("stdout") |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the view. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the view. |
| `description` | `string \| null` | No | Optional. Describes this view. |
| `name` | `string \| null` | No | Output only. The resource name of the view\.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view |

***

### locations.buckets.views.setIamPolicy

`logging.locations.buckets.views.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT\_FOUND, INVALID\_ARGUMENT, and PERMISSION\_DENIED errors

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.views.setIamPolicy({
	resource: 'projects/demo-project/locations/us-central1/buckets/app-logs/views/api-logs',
	policy: {
		bindings: [{
			role: 'roles/logging.viewAccessor',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See Resource names ([https://cloud.google.com/apis/design/resource\_names](https://cloud.google.com/apis/design/resource_names)) for the appropriate value for this field. Format: `<id>/<id>/locations/<id>/buckets/<id>/views/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:paths: "bindings, etag" |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   bindings?: {
>     members?: string[],
>     condition?: {
>       title?: string,
>       description?: string,
>       expression?: string,
>       location?: string
>     },
>     role?: string
>   }[],
>   etag?: string,
>   version?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of members, or principals, with a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one principal.The bindings in a Policy can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the bindings grant 50 different roles to user:[alice@example.com](mailto:alice@example.com), and not to any other principal, then you can add another 1,450 principals to the bindings in the Policy. |
| `etag` | `string \| null` | No | etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations: Getting a policy that includes a conditional role binding Adding a conditional role binding to a policy Changing a conditional role binding in a policy Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null
>   } | null,
>   role?: string | null
> }[] | null
> ```

***

### locations.buckets.views.testIamPermissions

`logging.locations.buckets.views.testIamPermissions`

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT\_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.buckets.views.testIamPermissions({
	resource: 'projects/demo-project/locations/us-central1/buckets/app-logs/views/api-logs',
	permissions: ['logging.views.access'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See Resource names ([https://cloud.google.com/apis/design/resource\_names](https://cloud.google.com/apis/design/resource_names)) for the appropriate value for this field. Format: `<id>/<id>/locations/<id>/buckets/<id>/views/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the resource. Permissions with wildcards (such as \* or storage.\*) are not allowed. For more information see IAM Overview ([https://cloud.google.com/iam/docs/overview#permissions](https://cloud.google.com/iam/docs/overview#permissions)). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of TestPermissionsRequest.permissions that the caller is allowed. |

***

### locations.get

`logging.locations.get`

Gets information about a location

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.get({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Resource name for the location. Format: `<id>/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The friendly name for this location, typically a nearby city name. For example, "Tokyo". |
| `name` | `string \| null` | No | Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" |
| `locationId` | `string \| null` | No | The canonical id for this location. For example: "us-east1". |
| `labels` | `Record<string, string> \| null` | No | Cross-service attributes for the location. For example \{"cloud.googleapis.com/region": "us-east1"} |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata. For example the available capacity at the given location. |

***

### locations.list

`logging.locations.list`

Lists information about the supported locations for this service.This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: Global locations: If name is empty, the method lists the public locations available to all projects. Project-specific locations: If name follows the format projects/\{project}, the method lists locations visible to that... (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource that owns the locations collection, if applicable. Format: `<id>/<id>`. |
| `pageToken` | `string` | No | A page token received from the next\_page\_token field in the response. Send that page token to receive the subsequent page. |
| `filter` | `string` | No | A filter to narrow down results to a preferred subset. The filtering language accepts strings like "displayName=tokyo", and is documented in more detail in AIP-160 ([https://google.aip.dev/160](https://google.aip.dev/160)). |
| `extraLocationTypes` | `string[]` | No | Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage. |
| `pageSize` | `number` | No | The maximum number of results to return. If not set, the service selects a default. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `locations` | `object[] \| null` | No | A list of locations that matches the specified filter in the request. |

> [accordion] locations full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   name?: string | null,
>   locationId?: string | null,
>   labels?: Record<string, string> | null,
>   metadata?: Record<string, any> | null
> }[] | null
> ```

***

### locations.operations.cancel

`logging.locations.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.operations.cancel({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be cancelled. Format: `<id>/<id>/locations/<id>/operations/<id>`. |
| `body` | `object` | No | The request message for Operations.CancelOperation. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.operations.get

`logging.locations.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.operations.get({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `<id>/<id>/locations/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/\{unique\_id}. |
| `error` | `object \| null` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `done` | `boolean \| null` | No | If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.operations.list

`logging.locations.operations.list`

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.locations.operations.list({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `returnPartialSuccess` | `boolean` | No | When set to true, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field.This can only be true when reading across collections. For example, when parent is set to "projects/example/locations/-".This field is not supported by default and will result in an UNIMPLEMENTED error if set unless explicitly documented otherwise in service or product specific documentation. |
| `pageSize` | `number` | No | The standard list page size. |
| `name` | `string` | Yes | The name of the operation's parent resource. Format: `<id>/<id>/locations/<id>`. |
| `filter` | `string` | No | The standard list filter. |
| `pageToken` | `string` | No | The standard list page token. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |
| `unreachable` | `string[] \| null` | No | Unordered list. Unreachable resources. Populated when the request sets ListOperationsRequest.return\_partial\_success and reads across collections. For example, when attempting to list all resources across all supported locations. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   done?: boolean | null,
>   metadata?: Record<string, any> | null,
>   response?: Record<string, any> | null
> }[] | null
> ```

***

### logs.delete

`logging.logs.delete`

Deletes all the log entries in a log for the global \_Default Log Bucket. The log reappears if it receives new entries

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.logging.logs.delete({ logName: 'projects/demo-project/logs/run.googleapis.com%2Frequests' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `logName` | `string` | Yes | Required. The resource name of the log to delete: projects/\[PROJECT\_ID]/logs/\[LOG\_ID] organizations/\[ORGANIZATION\_ID]/logs/\[LOG\_ID] billingAccounts/\[BILLING\_ACCOUNT\_ID]/logs/\[LOG\_ID] folders/\[FOLDER\_ID]/logs/\[LOG\_ID]\[LOG\_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more information about log names, see LogEntry. Format: `<id>/<id>/logs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### logs.list

`logging.logs.list`

Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.logs.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. |
| `pageSize` | `number` | No | Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. |
| `parent` | `string` | Yes | Required. The resource name to list logs for: projects/\[PROJECT\_ID] organizations/\[ORGANIZATION\_ID] billingAccounts/\[BILLING\_ACCOUNT\_ID] folders/\[FOLDER\_ID] Format: `<id>/<id>`. |
| `resourceNames` | `string[]` | No | Optional. List of resource names to list logs for: projects/\[PROJECT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/views/\[VIEW\_ID] organizations/\[ORGANIZATION\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/views/\[VIEW\_ID] billingAccounts/\[BILLING\_ACCOUNT\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/views/\[VIEW\_ID] folders/\[FOLDER\_ID]/locations/\[LOCATION\_ID]/buckets/\[BUCKET\_ID]/views/\[VIEW\_ID]To support legacy queries, it could also be: projects/\[PROJECT\_ID] organizations/\[ORGANIZATION\_ID] billingAccounts/\[BILLING\_ACCOUNT\_ID]… |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. |
| `logNames` | `string[] \| null` | No | A list of log names. For example, "projects/my-project/logs/syslog" or "organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity". |

***

### metrics.create

`logging.metrics.create`

Creates a logs-based metric

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.metrics.create({
	parent: 'projects/demo-project',
	name: 'errors',
	filter: 'severity>=ERROR',
	description: 'Error count',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the project in which to create the metric: "projects/\[PROJECT\_ID]" The new metric must be provided in the request. Format: `projects/<id>`. |
| `metricDescriptor` | `object` | No | Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. |
| `labelExtractors` | `Record<string, string>` | No | Optional. A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the value\_extractor field.The extracted value is converted to the type defined in the label descriptor. If either the extraction or the type conversion fails, the label will have a default value. |
| `valueExtractor` | `string` | No | Optional. A value\_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP\_EXTRACT(field, regex). The arguments are: field: The name of the log entry field from which the value is to be extracted. regex: A regular expression using the Google RE2 syntax ([https://github.com/google/re2/wiki/Syntax](https://github.com/google/re2/wiki/Syntax)) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. |
| `description` | `string` | No | Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. |
| `bucketOptions` | `object` | No | BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. |
| `bucketName` | `string` | No | Optional. The resource name of the Log Bucket that owns the Log Metric. Only Log Buckets in projects are supported. The bucket has to be in the same project as the metric.For example:projects/my-project/locations/global/buckets/my-bucketIf empty, then the Log Metric is considered a non-Bucket Log Metric. |
| `disabled` | `boolean` | No | Optional. If set to True, then this metric is disabled and it does not generate any points. |
| `filter` | `string` | No | Required. An advanced logs filter ([https://cloud.google.com/logging/docs/view/advanced\_filters](https://cloud.google.com/logging/docs/view/advanced_filters)) which is used to match log entries. Example: "resource.type=gae\_app AND severity>=ERROR" The maximum length of the filter is 20000 characters. |
| `version` | `V2 \| V1` | No | Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed. |
| `name` | `string` | No | Required. The client-assigned metric identifier. Examples: "error\_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters \_-.,+!\*',()%/. |

> [accordion] metricDescriptor full type
>
> ```ts theme={null}
> {
>   metricKind?: METRIC_KIND_UNSPECIFIED | GAUGE | DELTA | CUMULATIVE,
>   launchStage?: LAUNCH_STAGE_UNSPECIFIED | UNIMPLEMENTED | PRELAUNCH | EARLY_ACCESS | ALPHA | BETA | GA | DEPRECATED,
>   unit?: string,
>   metadata?: {
>     launchStage?: LAUNCH_STAGE_UNSPECIFIED | UNIMPLEMENTED | PRELAUNCH | EARLY_ACCESS | ALPHA | BETA | GA | DEPRECATED,
>     timeSeriesResourceHierarchyLevel?: (TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED | PROJECT | ORGANIZATION | FOLDER)[],
>     samplePeriod?: string,
>     ingestDelay?: string
>   },
>   labels?: {
>     valueType?: STRING | BOOL | INT64,
>     description?: string,
>     key?: string
>   }[],
>   description?: string,
>   valueType?: VALUE_TYPE_UNSPECIFIED | BOOL | INT64 | DOUBLE | STRING | DISTRIBUTION | MONEY,
>   name?: string,
>   monitoredResourceTypes?: string[],
>   displayName?: string,
>   type?: string
> }
> ```

> [accordion] bucketOptions full type
>
> ```ts theme={null}
> {
>   exponentialBuckets?: {
>     scale?: number,
>     numFiniteBuckets?: number,
>     growthFactor?: number
>   },
>   explicitBuckets?: {
>     bounds?: number[]
>   },
>   linearBuckets?: {
>     numFiniteBuckets?: number,
>     width?: number,
>     offset?: number
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metricDescriptor` | `object \| null` | No | Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. |
| `labelExtractors` | `Record<string, string> \| null` | No | Optional. A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the value\_extractor field.The extracted value is converted to the type defined in the label descriptor. If either the extraction or the type conversion fails, the label will have a default value. |
| `valueExtractor` | `string \| null` | No | Optional. A value\_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP\_EXTRACT(field, regex). The arguments are: field: The name of the log entry field from which the value is to be extracted. regex: A regular expression using the Google RE2 syntax ([https://github.com/google/re2/wiki/Syntax](https://github.com/google/re2/wiki/Syntax)) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. |
| `description` | `string \| null` | No | Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. |
| `bucketOptions` | `object \| null` | No | BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. |
| `bucketName` | `string \| null` | No | Optional. The resource name of the Log Bucket that owns the Log Metric. Only Log Buckets in projects are supported. The bucket has to be in the same project as the metric.For example:projects/my-project/locations/global/buckets/my-bucketIf empty, then the Log Metric is considered a non-Bucket Log Metric. |
| `resourceName` | `string \| null` | No | Output only. The resource name of the metric: "projects/\[PROJECT\_ID]/metrics/\[METRIC\_ID]" |
| `disabled` | `boolean \| null` | No | Optional. If set to True, then this metric is disabled and it does not generate any points. |
| `filter` | `string \| null` | No | Required. An advanced logs filter ([https://cloud.google.com/logging/docs/view/advanced\_filters](https://cloud.google.com/logging/docs/view/advanced_filters)) which is used to match log entries. Example: "resource.type=gae\_app AND severity>=ERROR" The maximum length of the filter is 20000 characters. |
| `version` | `string \| null` | No | Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the metric.This field may not be present for older metrics. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the metric.This field may not be present for older metrics. |
| `name` | `string \| null` | No | Required. The client-assigned metric identifier. Examples: "error\_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters \_-.,+!\*',()%/. |

> [accordion] metricDescriptor full type
>
> ```ts theme={null}
> {
>   metricKind?: string | null,
>   launchStage?: string | null,
>   unit?: string | null,
>   metadata?: {
>     launchStage?: string | null,
>     timeSeriesResourceHierarchyLevel?: string[] | null,
>     samplePeriod?: string | null,
>     ingestDelay?: string | null
>   } | null,
>   labels?: {
>     valueType?: string | null,
>     description?: string | null,
>     key?: string | null
>   }[] | null,
>   description?: string | null,
>   valueType?: string | null,
>   name?: string | null,
>   monitoredResourceTypes?: string[] | null,
>   displayName?: string | null,
>   type?: string | null
> } | null
> ```

> [accordion] bucketOptions full type
>
> ```ts theme={null}
> {
>   exponentialBuckets?: {
>     scale?: number | null,
>     numFiniteBuckets?: number | null,
>     growthFactor?: number | null
>   } | null,
>   explicitBuckets?: {
>     bounds?: number[] | null
>   } | null,
>   linearBuckets?: {
>     numFiniteBuckets?: number | null,
>     width?: number | null,
>     offset?: number | null
>   } | null
> } | null
> ```

***

### metrics.delete

`logging.metrics.delete`

Deletes a logs-based metric

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.logging.metrics.delete({ metricName: 'projects/demo-project/metrics/errors' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `metricName` | `string` | Yes | Required. The resource name of the metric to delete: "projects/\[PROJECT\_ID]/metrics/\[METRIC\_ID]" Format: `projects/<id>/metrics/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### metrics.get

`logging.metrics.get`

Gets a logs-based metric

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.metrics.get({ metricName: 'projects/demo-project/metrics/errors' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `metricName` | `string` | Yes | Required. The resource name of the desired metric: "projects/\[PROJECT\_ID]/metrics/\[METRIC\_ID]" Format: `projects/<id>/metrics/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metricDescriptor` | `object \| null` | No | Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. |
| `labelExtractors` | `Record<string, string> \| null` | No | Optional. A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the value\_extractor field.The extracted value is converted to the type defined in the label descriptor. If either the extraction or the type conversion fails, the label will have a default value. |
| `valueExtractor` | `string \| null` | No | Optional. A value\_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP\_EXTRACT(field, regex). The arguments are: field: The name of the log entry field from which the value is to be extracted. regex: A regular expression using the Google RE2 syntax ([https://github.com/google/re2/wiki/Syntax](https://github.com/google/re2/wiki/Syntax)) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. |
| `description` | `string \| null` | No | Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. |
| `bucketOptions` | `object \| null` | No | BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. |
| `bucketName` | `string \| null` | No | Optional. The resource name of the Log Bucket that owns the Log Metric. Only Log Buckets in projects are supported. The bucket has to be in the same project as the metric.For example:projects/my-project/locations/global/buckets/my-bucketIf empty, then the Log Metric is considered a non-Bucket Log Metric. |
| `resourceName` | `string \| null` | No | Output only. The resource name of the metric: "projects/\[PROJECT\_ID]/metrics/\[METRIC\_ID]" |
| `disabled` | `boolean \| null` | No | Optional. If set to True, then this metric is disabled and it does not generate any points. |
| `filter` | `string \| null` | No | Required. An advanced logs filter ([https://cloud.google.com/logging/docs/view/advanced\_filters](https://cloud.google.com/logging/docs/view/advanced_filters)) which is used to match log entries. Example: "resource.type=gae\_app AND severity>=ERROR" The maximum length of the filter is 20000 characters. |
| `version` | `string \| null` | No | Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the metric.This field may not be present for older metrics. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the metric.This field may not be present for older metrics. |
| `name` | `string \| null` | No | Required. The client-assigned metric identifier. Examples: "error\_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters \_-.,+!\*',()%/. |

> [accordion] metricDescriptor full type
>
> ```ts theme={null}
> {
>   metricKind?: string | null,
>   launchStage?: string | null,
>   unit?: string | null,
>   metadata?: {
>     launchStage?: string | null,
>     timeSeriesResourceHierarchyLevel?: string[] | null,
>     samplePeriod?: string | null,
>     ingestDelay?: string | null
>   } | null,
>   labels?: {
>     valueType?: string | null,
>     description?: string | null,
>     key?: string | null
>   }[] | null,
>   description?: string | null,
>   valueType?: string | null,
>   name?: string | null,
>   monitoredResourceTypes?: string[] | null,
>   displayName?: string | null,
>   type?: string | null
> } | null
> ```

> [accordion] bucketOptions full type
>
> ```ts theme={null}
> {
>   exponentialBuckets?: {
>     scale?: number | null,
>     numFiniteBuckets?: number | null,
>     growthFactor?: number | null
>   } | null,
>   explicitBuckets?: {
>     bounds?: number[] | null
>   } | null,
>   linearBuckets?: {
>     numFiniteBuckets?: number | null,
>     width?: number | null,
>     offset?: number | null
>   } | null
> } | null
> ```

***

### metrics.list

`logging.metrics.list`

Lists logs-based metrics (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.metrics.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. |
| `parent` | `string` | Yes | Required. The name of the project containing the metrics: "projects/\[PROJECT\_ID]" Format: `projects/<id>`. |
| `pageToken` | `string` | No | Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metrics` | `object[] \| null` | No | A list of logs-based metrics. |
| `nextPageToken` | `string \| null` | No | If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. |

> [accordion] metrics full type
>
> ```ts theme={null}
> {
>   metricDescriptor?: {
>     metricKind?: string | null,
>     launchStage?: string | null,
>     unit?: string | null,
>     metadata?: {
>       launchStage?: string | null,
>       timeSeriesResourceHierarchyLevel?: string[] | null,
>       samplePeriod?: string | null,
>       ingestDelay?: string | null
>     } | null,
>     labels?: {
>       valueType?: string | null,
>       description?: string | null,
>       key?: string | null
>     }[] | null,
>     description?: string | null,
>     valueType?: string | null,
>     name?: string | null,
>     monitoredResourceTypes?: string[] | null,
>     displayName?: string | null,
>     type?: string | null
>   } | null,
>   labelExtractors?: Record<string, string> | null,
>   valueExtractor?: string | null,
>   description?: string | null,
>   bucketOptions?: {
>     exponentialBuckets?: {
>       scale?: number | null,
>       numFiniteBuckets?: number | null,
>       growthFactor?: number | null
>     } | null,
>     explicitBuckets?: {
>       bounds?: number[] | null
>     } | null,
>     linearBuckets?: {
>       numFiniteBuckets?: number | null,
>       width?: number | null,
>       offset?: number | null
>     } | null
>   } | null,
>   bucketName?: string | null,
>   resourceName?: string | null,
>   disabled?: boolean | null,
>   filter?: string | null,
>   version?: string | null,
>   createTime?: string | null,
>   updateTime?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### metrics.update

`logging.metrics.update`

Creates or updates a logs-based metric

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.metrics.update({
	metricName: 'projects/demo-project/metrics/errors',
	name: 'errors',
	filter: 'severity>=ERROR',
	description: 'Error count',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `metricName` | `string` | Yes | Required. The resource name of the metric to update: "projects/\[PROJECT\_ID]/metrics/\[METRIC\_ID]" The updated metric must be provided in the request and it's name field must be the same as \[METRIC\_ID] If the metric does not exist in \[PROJECT\_ID], then a new metric is created. Format: `projects/<id>/metrics/<id>`. |
| `metricDescriptor` | `object` | No | Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. |
| `labelExtractors` | `Record<string, string>` | No | Optional. A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the value\_extractor field.The extracted value is converted to the type defined in the label descriptor. If either the extraction or the type conversion fails, the label will have a default value. |
| `valueExtractor` | `string` | No | Optional. A value\_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP\_EXTRACT(field, regex). The arguments are: field: The name of the log entry field from which the value is to be extracted. regex: A regular expression using the Google RE2 syntax ([https://github.com/google/re2/wiki/Syntax](https://github.com/google/re2/wiki/Syntax)) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. |
| `description` | `string` | No | Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. |
| `bucketOptions` | `object` | No | BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. |
| `bucketName` | `string` | No | Optional. The resource name of the Log Bucket that owns the Log Metric. Only Log Buckets in projects are supported. The bucket has to be in the same project as the metric.For example:projects/my-project/locations/global/buckets/my-bucketIf empty, then the Log Metric is considered a non-Bucket Log Metric. |
| `disabled` | `boolean` | No | Optional. If set to True, then this metric is disabled and it does not generate any points. |
| `filter` | `string` | No | Required. An advanced logs filter ([https://cloud.google.com/logging/docs/view/advanced\_filters](https://cloud.google.com/logging/docs/view/advanced_filters)) which is used to match log entries. Example: "resource.type=gae\_app AND severity>=ERROR" The maximum length of the filter is 20000 characters. |
| `version` | `V2 \| V1` | No | Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed. |
| `name` | `string` | No | Required. The client-assigned metric identifier. Examples: "error\_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters \_-.,+!\*',()%/. |

> [accordion] metricDescriptor full type
>
> ```ts theme={null}
> {
>   metricKind?: METRIC_KIND_UNSPECIFIED | GAUGE | DELTA | CUMULATIVE,
>   launchStage?: LAUNCH_STAGE_UNSPECIFIED | UNIMPLEMENTED | PRELAUNCH | EARLY_ACCESS | ALPHA | BETA | GA | DEPRECATED,
>   unit?: string,
>   metadata?: {
>     launchStage?: LAUNCH_STAGE_UNSPECIFIED | UNIMPLEMENTED | PRELAUNCH | EARLY_ACCESS | ALPHA | BETA | GA | DEPRECATED,
>     timeSeriesResourceHierarchyLevel?: (TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED | PROJECT | ORGANIZATION | FOLDER)[],
>     samplePeriod?: string,
>     ingestDelay?: string
>   },
>   labels?: {
>     valueType?: STRING | BOOL | INT64,
>     description?: string,
>     key?: string
>   }[],
>   description?: string,
>   valueType?: VALUE_TYPE_UNSPECIFIED | BOOL | INT64 | DOUBLE | STRING | DISTRIBUTION | MONEY,
>   name?: string,
>   monitoredResourceTypes?: string[],
>   displayName?: string,
>   type?: string
> }
> ```

> [accordion] bucketOptions full type
>
> ```ts theme={null}
> {
>   exponentialBuckets?: {
>     scale?: number,
>     numFiniteBuckets?: number,
>     growthFactor?: number
>   },
>   explicitBuckets?: {
>     bounds?: number[]
>   },
>   linearBuckets?: {
>     numFiniteBuckets?: number,
>     width?: number,
>     offset?: number
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metricDescriptor` | `object \| null` | No | Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. |
| `labelExtractors` | `Record<string, string> \| null` | No | Optional. A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the value\_extractor field.The extracted value is converted to the type defined in the label descriptor. If either the extraction or the type conversion fails, the label will have a default value. |
| `valueExtractor` | `string \| null` | No | Optional. A value\_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP\_EXTRACT(field, regex). The arguments are: field: The name of the log entry field from which the value is to be extracted. regex: A regular expression using the Google RE2 syntax ([https://github.com/google/re2/wiki/Syntax](https://github.com/google/re2/wiki/Syntax)) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. |
| `description` | `string \| null` | No | Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. |
| `bucketOptions` | `object \| null` | No | BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. |
| `bucketName` | `string \| null` | No | Optional. The resource name of the Log Bucket that owns the Log Metric. Only Log Buckets in projects are supported. The bucket has to be in the same project as the metric.For example:projects/my-project/locations/global/buckets/my-bucketIf empty, then the Log Metric is considered a non-Bucket Log Metric. |
| `resourceName` | `string \| null` | No | Output only. The resource name of the metric: "projects/\[PROJECT\_ID]/metrics/\[METRIC\_ID]" |
| `disabled` | `boolean \| null` | No | Optional. If set to True, then this metric is disabled and it does not generate any points. |
| `filter` | `string \| null` | No | Required. An advanced logs filter ([https://cloud.google.com/logging/docs/view/advanced\_filters](https://cloud.google.com/logging/docs/view/advanced_filters)) which is used to match log entries. Example: "resource.type=gae\_app AND severity>=ERROR" The maximum length of the filter is 20000 characters. |
| `version` | `string \| null` | No | Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the metric.This field may not be present for older metrics. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the metric.This field may not be present for older metrics. |
| `name` | `string \| null` | No | Required. The client-assigned metric identifier. Examples: "error\_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters \_-.,+!\*',()%/. |

> [accordion] metricDescriptor full type
>
> ```ts theme={null}
> {
>   metricKind?: string | null,
>   launchStage?: string | null,
>   unit?: string | null,
>   metadata?: {
>     launchStage?: string | null,
>     timeSeriesResourceHierarchyLevel?: string[] | null,
>     samplePeriod?: string | null,
>     ingestDelay?: string | null
>   } | null,
>   labels?: {
>     valueType?: string | null,
>     description?: string | null,
>     key?: string | null
>   }[] | null,
>   description?: string | null,
>   valueType?: string | null,
>   name?: string | null,
>   monitoredResourceTypes?: string[] | null,
>   displayName?: string | null,
>   type?: string | null
> } | null
> ```

> [accordion] bucketOptions full type
>
> ```ts theme={null}
> {
>   exponentialBuckets?: {
>     scale?: number | null,
>     numFiniteBuckets?: number | null,
>     growthFactor?: number | null
>   } | null,
>   explicitBuckets?: {
>     bounds?: number[] | null
>   } | null,
>   linearBuckets?: {
>     numFiniteBuckets?: number | null,
>     width?: number | null,
>     offset?: number | null
>   } | null
> } | null
> ```

***

### monitoredResourceDescriptors.list

`logging.monitoredResourceDescriptors.list`

Lists the descriptors for monitored resource types used by Logging (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.monitoredResourceDescriptors.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. |
| `pageToken` | `string` | No | Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceDescriptors` | `object[] \| null` | No | A list of resource descriptors. |
| `nextPageToken` | `string \| null` | No | If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. |

> [accordion] resourceDescriptors full type
>
> ```ts theme={null}
> {
>   labels?: {
>     valueType?: string | null,
>     description?: string | null,
>     key?: string | null
>   }[] | null,
>   launchStage?: string | null,
>   type?: string | null,
>   name?: string | null,
>   description?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### sinks.create

`logging.sinks.create`

Creates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer\_identity is not permitted to write to the destination

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.sinks.create({
	parent: 'projects/demo-project',
	name: 'to-bucket',
	destination: 'storage.googleapis.com/demo-bucket',
	filter: 'severity>=ERROR',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `customWriterIdentity` | `string` | No | Optional. The service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some\@email. This field can only be specified when you are routing logs to a log bucket that is in a different project than the sink. When not specified, a Logging service account will automatically be generated. |
| `uniqueWriterIdentity` | `boolean` | No | Optional. Determines the kind of IAM identity returned as writer\_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer\_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. |
| `parent` | `string` | Yes | Required. The resource in which to create the sink: "projects/\[PROJECT\_ID]" "organizations/\[ORGANIZATION\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]" "folders/\[FOLDER\_ID]" For examples:"projects/my-project" "organizations/123456789" Format: `<id>/<id>`. |
| `bigqueryOptions` | `object` | No | Options that change functionality of a sink exporting data to BigQuery. |
| `destination` | `string` | No | Required. The export destination: "storage.googleapis.com/\[GCS\_BUCKET]" "bigquery.googleapis.com/projects/\[PROJECT\_ID]/datasets/\[DATASET]" "pubsub.googleapis.com/projects/\[PROJECT\_ID]/topics/\[TOPIC\_ID]" "logging.googleapis.com/projects/\[PROJECT\_ID]"… |
| `disabled` | `boolean` | No | Optional. If set to true, then this sink is disabled and it does not export any log entries. |
| `name` | `string` | No | Optional. The client-assigned sink identifier, unique within the project.For example: "my-syslog-errors-to-pubsub".Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. |
| `includeChildren` | `boolean` | No | Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then log entries from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. |
| `exclusions` | `object[]` | No | Optional. Log entries that match any of these exclusion filters will not be exported.If a log entry is matched by both filter and one of exclusions it will not be exported. |
| `outputVersionFormat` | `VERSION_FORMAT_UNSPECIFIED \| V2 \| V1` | No | Deprecated. This field is unused. |
| `interceptChildren` | `boolean` | No | Optional. This field applies only to sinks owned by organizations and folders.When the value of 'intercept\_children' is true, the following restrictions apply: The sink must have the include\_children flag set to true. The sink destination must be a Cloud project.Also, the following behaviors apply: Any logs matched by the sink won't be included by non-\_Required sinks owned by child resources. The sink appears in the results of a ListSinks call from a child resource if the value of the filter field in its request is either 'in\_scope("ALL")' or 'in\_scope("ANCESTOR")'. |
| `filter` | `string` | No | Optional. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)). The only exported log entries are those that are in the resource owning the sink and that match the filter.For example:logName="projects/\[PROJECT\_ID]/logs/\[LOG\_ID]" AND severity>=ERROR |
| `description` | `string` | No | Optional. A description of this sink.The maximum length of the description is 8000 characters. |

> [accordion] bigqueryOptions full type
>
> ```ts theme={null}
> {
>   usePartitionedTables?: boolean
> }
> ```

> [accordion] exclusions full type
>
> ```ts theme={null}
> {
>   description?: string,
>   filter?: string,
>   disabled?: boolean,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bigqueryOptions` | `object \| null` | No | Options that change functionality of a sink exporting data to BigQuery. |
| `destination` | `string \| null` | No | Required. The export destination: "storage.googleapis.com/\[GCS\_BUCKET]" "bigquery.googleapis.com/projects/\[PROJECT\_ID]/datasets/\[DATASET]" "pubsub.googleapis.com/projects/\[PROJECT\_ID]/topics/\[TOPIC\_ID]" "logging.googleapis.com/projects/\[PROJECT\_ID]"… |
| `writerIdentity` | `string \| null` | No | Output only. An IAM identity—a service account or group—under which Cloud Logging writes the exported log entries to the sink's destination. This field is either set by specifying custom\_writer\_identity or set automatically by sinks.create and sinks.update based on the value of unique\_writer\_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. |
| `disabled` | `boolean \| null` | No | Optional. If set to true, then this sink is disabled and it does not export any log entries. |
| `name` | `string \| null` | No | Optional. The client-assigned sink identifier, unique within the project.For example: "my-syslog-errors-to-pubsub".Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. |
| `resourceName` | `string \| null` | No | Output only. The resource name of the sink. "projects/\[PROJECT\_ID]/sinks/\[SINK\_NAME] "organizations/\[ORGANIZATION\_ID]/sinks/\[SINK\_NAME] "billingAccounts/\[BILLING\_ACCOUNT\_ID]/sinks/\[SINK\_NAME] "folders/\[FOLDER\_ID]/sinks/\[SINK\_NAME] For example: projects/my\_project/sinks/SINK\_NAME |
| `includeChildren` | `boolean \| null` | No | Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then log entries from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. |
| `exclusions` | `object[] \| null` | No | Optional. Log entries that match any of these exclusion filters will not be exported.If a log entry is matched by both filter and one of exclusions it will not be exported. |
| `outputVersionFormat` | `string \| null` | No | Deprecated. This field is unused. |
| `interceptChildren` | `boolean \| null` | No | Optional. This field applies only to sinks owned by organizations and folders.When the value of 'intercept\_children' is true, the following restrictions apply: The sink must have the include\_children flag set to true. The sink destination must be a Cloud project.Also, the following behaviors apply: Any logs matched by the sink won't be included by non-\_Required sinks owned by child resources. The sink appears in the results of a ListSinks call from a child resource if the value of the filter field in its request is either 'in\_scope("ALL")' or 'in\_scope("ANCESTOR")'. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the sink.This field may not be present for older sinks. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the sink.This field may not be present for older sinks. |
| `filter` | `string \| null` | No | Optional. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)). The only exported log entries are those that are in the resource owning the sink and that match the filter.For example:logName="projects/\[PROJECT\_ID]/logs/\[LOG\_ID]" AND severity>=ERROR |
| `description` | `string \| null` | No | Optional. A description of this sink.The maximum length of the description is 8000 characters. |

> [accordion] bigqueryOptions full type
>
> ```ts theme={null}
> {
>   usesTimestampColumnPartitioning?: boolean | null,
>   usePartitionedTables?: boolean | null
> } | null
> ```

> [accordion] exclusions full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   createTime?: string | null,
>   description?: string | null,
>   filter?: string | null,
>   disabled?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### sinks.delete

`logging.sinks.delete`

Deletes a sink. If the sink has a unique writer\_identity, then that service account is also deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.logging.sinks.delete({ sinkName: 'projects/demo-project/sinks/to-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sinkName` | `string` | Yes | Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/\[PROJECT\_ID]/sinks/\[SINK\_ID]" "organizations/\[ORGANIZATION\_ID]/sinks/\[SINK\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/sinks/\[SINK\_ID]" "folders/\[FOLDER\_ID]/sinks/\[SINK\_ID]" For example:"projects/my-project/sinks/my-sink" Format: `<id>/<id>/sinks/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### sinks.get

`logging.sinks.get`

Gets a sink

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.sinks.get({ sinkName: 'projects/demo-project/sinks/to-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sinkName` | `string` | Yes | Required. The resource name of the sink: "projects/\[PROJECT\_ID]/sinks/\[SINK\_ID]" "organizations/\[ORGANIZATION\_ID]/sinks/\[SINK\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/sinks/\[SINK\_ID]" "folders/\[FOLDER\_ID]/sinks/\[SINK\_ID]" For example:"projects/my-project/sinks/my-sink" Format: `<id>/<id>/sinks/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bigqueryOptions` | `object \| null` | No | Options that change functionality of a sink exporting data to BigQuery. |
| `destination` | `string \| null` | No | Required. The export destination: "storage.googleapis.com/\[GCS\_BUCKET]" "bigquery.googleapis.com/projects/\[PROJECT\_ID]/datasets/\[DATASET]" "pubsub.googleapis.com/projects/\[PROJECT\_ID]/topics/\[TOPIC\_ID]" "logging.googleapis.com/projects/\[PROJECT\_ID]"… |
| `writerIdentity` | `string \| null` | No | Output only. An IAM identity—a service account or group—under which Cloud Logging writes the exported log entries to the sink's destination. This field is either set by specifying custom\_writer\_identity or set automatically by sinks.create and sinks.update based on the value of unique\_writer\_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. |
| `disabled` | `boolean \| null` | No | Optional. If set to true, then this sink is disabled and it does not export any log entries. |
| `name` | `string \| null` | No | Optional. The client-assigned sink identifier, unique within the project.For example: "my-syslog-errors-to-pubsub".Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. |
| `resourceName` | `string \| null` | No | Output only. The resource name of the sink. "projects/\[PROJECT\_ID]/sinks/\[SINK\_NAME] "organizations/\[ORGANIZATION\_ID]/sinks/\[SINK\_NAME] "billingAccounts/\[BILLING\_ACCOUNT\_ID]/sinks/\[SINK\_NAME] "folders/\[FOLDER\_ID]/sinks/\[SINK\_NAME] For example: projects/my\_project/sinks/SINK\_NAME |
| `includeChildren` | `boolean \| null` | No | Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then log entries from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. |
| `exclusions` | `object[] \| null` | No | Optional. Log entries that match any of these exclusion filters will not be exported.If a log entry is matched by both filter and one of exclusions it will not be exported. |
| `outputVersionFormat` | `string \| null` | No | Deprecated. This field is unused. |
| `interceptChildren` | `boolean \| null` | No | Optional. This field applies only to sinks owned by organizations and folders.When the value of 'intercept\_children' is true, the following restrictions apply: The sink must have the include\_children flag set to true. The sink destination must be a Cloud project.Also, the following behaviors apply: Any logs matched by the sink won't be included by non-\_Required sinks owned by child resources. The sink appears in the results of a ListSinks call from a child resource if the value of the filter field in its request is either 'in\_scope("ALL")' or 'in\_scope("ANCESTOR")'. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the sink.This field may not be present for older sinks. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the sink.This field may not be present for older sinks. |
| `filter` | `string \| null` | No | Optional. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)). The only exported log entries are those that are in the resource owning the sink and that match the filter.For example:logName="projects/\[PROJECT\_ID]/logs/\[LOG\_ID]" AND severity>=ERROR |
| `description` | `string \| null` | No | Optional. A description of this sink.The maximum length of the description is 8000 characters. |

> [accordion] bigqueryOptions full type
>
> ```ts theme={null}
> {
>   usesTimestampColumnPartitioning?: boolean | null,
>   usePartitionedTables?: boolean | null
> } | null
> ```

> [accordion] exclusions full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   createTime?: string | null,
>   description?: string | null,
>   filter?: string | null,
>   disabled?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### sinks.list

`logging.sinks.list`

Lists sinks (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.logging.sinks.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | Optional. A filter expression to constrain the sinks returned. Today, this only supports the following strings: '' 'in\_scope("ALL")', 'in\_scope("ANCESTOR")', 'in\_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the sinks which can be returned in any other scope. ANCESTOR: Includes intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks owned by parent.When the empty string is provided, then the filter 'in\_scope("DEFAULT")' is applied. |
| `pageToken` | `string` | No | Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. |
| `pageSize` | `number` | No | Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. |
| `parent` | `string` | Yes | Required. The parent resource whose sinks are to be listed: "projects/\[PROJECT\_ID]" "organizations/\[ORGANIZATION\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]" "folders/\[FOLDER\_ID]" Format: `<id>/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. |
| `sinks` | `object[] \| null` | No | A list of sinks. |

> [accordion] sinks full type
>
> ```ts theme={null}
> {
>   bigqueryOptions?: {
>     usesTimestampColumnPartitioning?: boolean | null,
>     usePartitionedTables?: boolean | null
>   } | null,
>   destination?: string | null,
>   writerIdentity?: string | null,
>   disabled?: boolean | null,
>   name?: string | null,
>   resourceName?: string | null,
>   includeChildren?: boolean | null,
>   exclusions?: {
>     updateTime?: string | null,
>     createTime?: string | null,
>     description?: string | null,
>     filter?: string | null,
>     disabled?: boolean | null,
>     name?: string | null
>   }[] | null,
>   outputVersionFormat?: string | null,
>   interceptChildren?: boolean | null,
>   updateTime?: string | null,
>   createTime?: string | null,
>   filter?: string | null,
>   description?: string | null
> }[] | null
> ```

***

### sinks.update

`logging.sinks.update`

Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer\_identity; see the unique\_writer\_identity field

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.sinks.update({
	sinkName: 'projects/demo-project/sinks/to-bucket',
	updateMask: 'filter',
	name: 'to-bucket',
	destination: 'storage.googleapis.com/demo-bucket',
	filter: 'severity>=WARNING',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor…](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor…) |
| `customWriterIdentity` | `string` | No | Optional. The service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some\@email. This field can only be specified when you are routing logs to a log bucket that is in a different project than the sink. When not specified, a Logging service account will automatically be generated. |
| `uniqueWriterIdentity` | `boolean` | No | Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer\_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer\_identity. If the old value is false and the new value is true, then writer\_identity is changed to a service agent ([https://docs.cloud.google.com/iam/docs/service-account-types#service-agents](https://docs.cloud.google.com/iam/docs/service-account-types#service-agents)) owned by Cloud Logging. |
| `sinkName` | `string` | Yes | Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/\[PROJECT\_ID]/sinks/\[SINK\_ID]" "organizations/\[ORGANIZATION\_ID]/sinks/\[SINK\_ID]" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/sinks/\[SINK\_ID]" "folders/\[FOLDER\_ID]/sinks/\[SINK\_ID]" For example:"projects/my-project/sinks/my-sink" Format: `<id>/<id>/sinks/<id>`. |
| `bigqueryOptions` | `object` | No | Options that change functionality of a sink exporting data to BigQuery. |
| `destination` | `string` | No | Required. The export destination: "storage.googleapis.com/\[GCS\_BUCKET]" "bigquery.googleapis.com/projects/\[PROJECT\_ID]/datasets/\[DATASET]" "pubsub.googleapis.com/projects/\[PROJECT\_ID]/topics/\[TOPIC\_ID]" "logging.googleapis.com/projects/\[PROJECT\_ID]"… |
| `disabled` | `boolean` | No | Optional. If set to true, then this sink is disabled and it does not export any log entries. |
| `name` | `string` | No | Optional. The client-assigned sink identifier, unique within the project.For example: "my-syslog-errors-to-pubsub".Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. |
| `includeChildren` | `boolean` | No | Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then log entries from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. |
| `exclusions` | `object[]` | No | Optional. Log entries that match any of these exclusion filters will not be exported.If a log entry is matched by both filter and one of exclusions it will not be exported. |
| `outputVersionFormat` | `VERSION_FORMAT_UNSPECIFIED \| V2 \| V1` | No | Deprecated. This field is unused. |
| `interceptChildren` | `boolean` | No | Optional. This field applies only to sinks owned by organizations and folders.When the value of 'intercept\_children' is true, the following restrictions apply: The sink must have the include\_children flag set to true. The sink destination must be a Cloud project.Also, the following behaviors apply: Any logs matched by the sink won't be included by non-\_Required sinks owned by child resources. The sink appears in the results of a ListSinks call from a child resource if the value of the filter field in its request is either 'in\_scope("ALL")' or 'in\_scope("ANCESTOR")'. |
| `filter` | `string` | No | Optional. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)). The only exported log entries are those that are in the resource owning the sink and that match the filter.For example:logName="projects/\[PROJECT\_ID]/logs/\[LOG\_ID]" AND severity>=ERROR |
| `description` | `string` | No | Optional. A description of this sink.The maximum length of the description is 8000 characters. |

> [accordion] bigqueryOptions full type
>
> ```ts theme={null}
> {
>   usePartitionedTables?: boolean
> }
> ```

> [accordion] exclusions full type
>
> ```ts theme={null}
> {
>   description?: string,
>   filter?: string,
>   disabled?: boolean,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bigqueryOptions` | `object \| null` | No | Options that change functionality of a sink exporting data to BigQuery. |
| `destination` | `string \| null` | No | Required. The export destination: "storage.googleapis.com/\[GCS\_BUCKET]" "bigquery.googleapis.com/projects/\[PROJECT\_ID]/datasets/\[DATASET]" "pubsub.googleapis.com/projects/\[PROJECT\_ID]/topics/\[TOPIC\_ID]" "logging.googleapis.com/projects/\[PROJECT\_ID]"… |
| `writerIdentity` | `string \| null` | No | Output only. An IAM identity—a service account or group—under which Cloud Logging writes the exported log entries to the sink's destination. This field is either set by specifying custom\_writer\_identity or set automatically by sinks.create and sinks.update based on the value of unique\_writer\_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. |
| `disabled` | `boolean \| null` | No | Optional. If set to true, then this sink is disabled and it does not export any log entries. |
| `name` | `string \| null` | No | Optional. The client-assigned sink identifier, unique within the project.For example: "my-syslog-errors-to-pubsub".Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. |
| `resourceName` | `string \| null` | No | Output only. The resource name of the sink. "projects/\[PROJECT\_ID]/sinks/\[SINK\_NAME] "organizations/\[ORGANIZATION\_ID]/sinks/\[SINK\_NAME] "billingAccounts/\[BILLING\_ACCOUNT\_ID]/sinks/\[SINK\_NAME] "folders/\[FOLDER\_ID]/sinks/\[SINK\_NAME] For example: projects/my\_project/sinks/SINK\_NAME |
| `includeChildren` | `boolean \| null` | No | Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then log entries from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. |
| `exclusions` | `object[] \| null` | No | Optional. Log entries that match any of these exclusion filters will not be exported.If a log entry is matched by both filter and one of exclusions it will not be exported. |
| `outputVersionFormat` | `string \| null` | No | Deprecated. This field is unused. |
| `interceptChildren` | `boolean \| null` | No | Optional. This field applies only to sinks owned by organizations and folders.When the value of 'intercept\_children' is true, the following restrictions apply: The sink must have the include\_children flag set to true. The sink destination must be a Cloud project.Also, the following behaviors apply: Any logs matched by the sink won't be included by non-\_Required sinks owned by child resources. The sink appears in the results of a ListSinks call from a child resource if the value of the filter field in its request is either 'in\_scope("ALL")' or 'in\_scope("ANCESTOR")'. |
| `updateTime` | `string \| null` | No | Output only. The last update timestamp of the sink.This field may not be present for older sinks. |
| `createTime` | `string \| null` | No | Output only. The creation timestamp of the sink.This field may not be present for older sinks. |
| `filter` | `string \| null` | No | Optional. An advanced logs filter ([https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression](https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression)). The only exported log entries are those that are in the resource owning the sink and that match the filter.For example:logName="projects/\[PROJECT\_ID]/logs/\[LOG\_ID]" AND severity>=ERROR |
| `description` | `string \| null` | No | Optional. A description of this sink.The maximum length of the description is 8000 characters. |

> [accordion] bigqueryOptions full type
>
> ```ts theme={null}
> {
>   usesTimestampColumnPartitioning?: boolean | null,
>   usePartitionedTables?: boolean | null
> } | null
> ```

> [accordion] exclusions full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   createTime?: string | null,
>   description?: string | null,
>   filter?: string | null,
>   disabled?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### updateCmekSettings

`logging.updateCmekSettings`

Updates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.UpdateCmekSettings fails when any of the following are true: The value of kms\_key\_name is invalid

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.updateCmekSettings({ name: 'organizations/123456789012', updateMask: 'kmsKeyName', kmsKeyName: 'projects/demo-project/locations/us-central1/keyRings/app/cryptoKeys/data' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. Field mask identifying which fields from cmek\_settings should be updated. A field will be overwritten if and only if it is in the update mask. Output only fields cannot be updated.See FieldMask for more information.For example: "updateMask=kmsKeyName" |
| `name` | `string` | Yes | Required. The resource name for the CMEK settings to update. "projects/\[PROJECT\_ID]/cmekSettings" "organizations/\[ORGANIZATION\_ID]/cmekSettings" "billingAccounts/\[BILLING\_ACCOUNT\_ID]/cmekSettings" "folders/\[FOLDER\_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. Format: `<id>/<id>`. |
| `kmsKeyName` | `string` | No | Optional. The resource name for the configured Cloud KMS key.KMS key name format… |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kmsKeyVersionName` | `string \| null` | No | Output only. The CryptoKeyVersion resource name for the configured Cloud KMS key.KMS key name format… |
| `name` | `string \| null` | No | Output only. The resource name of the CMEK settings. |
| `serviceAccountId` | `string \| null` | No | Output only. The service account that will be used by the Log Router to access your Cloud KMS key.Before enabling CMEK for Log Router, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account that the Log Router will use to access your Cloud KMS key. Use GetCmekSettings to obtain the service account ID.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |
| `kmsKeyName` | `string \| null` | No | Optional. The resource name for the configured Cloud KMS key.KMS key name format… |

***

### updateSettings

`logging.updateSettings`

Updates the settings for the given resource. This method applies to all feature configurations for organization and folders.UpdateSettings fails when any of the following are true: The value of storage\_location either isn't supported by Logging or violates the location OrgPolicy

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.logging.updateSettings({ name: 'organizations/123456789012', updateMask: 'storageLocation', storageLocation: 'us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name for the settings to update. "organizations/\[ORGANIZATION\_ID]/settings" "folders/\[FOLDER\_ID]/settings" For example:"organizations/12345/settings" Format: `<id>/<id>`. |
| `updateMask` | `string` | No | Optional. Field mask identifying which fields from settings should be updated. A field will be overwritten if and only if it is in the update mask. Output only fields cannot be updated.See FieldMask for more information.For example: "updateMask=kmsKeyName" |
| `defaultSinkConfig` | `object` | No | Describes the custom \_Default sink configuration that is used to override the built-in \_Default sink configuration in newly created resource containers, such as projects or folders. |
| `storageLocation` | `string` | No | Optional. The storage location for the \_Default and \_Required log buckets of newly created projects and folders, unless the storage location is explicitly provided.Example value: europe-west1.Note: this setting does not affect the location of resources where a location is explicitly provided when created, such as custom log buckets. |
| `disableDefaultSink` | `boolean` | No | Optional. If set to true, the \_Default sink in newly created projects and folders will created in a disabled state. This can be used to automatically disable log storage if there is already an aggregated sink configured in the hierarchy. The \_Default sink can be re-enabled manually if needed. |
| `kmsKeyName` | `string` | No | Optional. The resource name for the configured Cloud KMS key.KMS key name format… |

> [accordion] defaultSinkConfig full type
>
> ```ts theme={null}
> {
>   exclusions?: {
>     description?: string,
>     filter?: string,
>     disabled?: boolean,
>     name?: string
>   }[],
>   mode?: FILTER_WRITE_MODE_UNSPECIFIED | APPEND | OVERWRITE,
>   filter?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `loggingServiceAccountId` | `string \| null` | No | Output only. The service account for the given resource container, such as project or folder. Log sinks use this service account as their writer\_identity if no custom service account is provided in the request when calling the create sink method. |
| `name` | `string \| null` | No | Output only. The resource name of the settings. |
| `defaultSinkConfig` | `object \| null` | No | Describes the custom \_Default sink configuration that is used to override the built-in \_Default sink configuration in newly created resource containers, such as projects or folders. |
| `storageLocation` | `string \| null` | No | Optional. The storage location for the \_Default and \_Required log buckets of newly created projects and folders, unless the storage location is explicitly provided.Example value: europe-west1.Note: this setting does not affect the location of resources where a location is explicitly provided when created, such as custom log buckets. |
| `kmsServiceAccountId` | `string \| null` | No | Output only. The service account that will be used by the Log Router to access your Cloud KMS key.Before enabling CMEK, you must first assign the role roles/cloudkms.cryptoKeyEncrypterDecrypter to the service account that will be used to access your Cloud KMS key. Use GetSettings to obtain the service account ID.See Configure CMEK for Cloud Logging ([https://docs.cloud.google.com/logging/docs/routing/managed-encryption](https://docs.cloud.google.com/logging/docs/routing/managed-encryption)) for more information. |
| `disableDefaultSink` | `boolean \| null` | No | Optional. If set to true, the \_Default sink in newly created projects and folders will created in a disabled state. This can be used to automatically disable log storage if there is already an aggregated sink configured in the hierarchy. The \_Default sink can be re-enabled manually if needed. |
| `kmsKeyName` | `string \| null` | No | Optional. The resource name for the configured Cloud KMS key.KMS key name format… |

> [accordion] defaultSinkConfig full type
>
> ```ts theme={null}
> {
>   exclusions?: {
>     updateTime?: string | null,
>     createTime?: string | null,
>     description?: string | null,
>     filter?: string | null,
>     disabled?: boolean | null,
>     name?: string | null
>   }[] | null,
>   mode?: string | null,
>   filter?: string | null
> } | null
> ```

***

## Monitoring

### alertPolicies.create

`monitoring.alertPolicies.create`

Creates a new alerting policy.Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.alertPolicies.create({
	name: 'projects/demo-project',
	displayName: 'High CPU',
	combiner: 'OR',
	conditions: [{
		displayName: 'CPU over 80%',
		conditionThreshold: {
			filter: 'metric.type="compute.googleapis.com/instance/cpu/utilization" AND resource.type="gce_instance"',
			comparison: 'COMPARISON_GT',
			thresholdValue: 0.8,
			duration: '300s',
			aggregations: [{ alignmentPeriod: '60s', perSeriesAligner: 'ALIGN_MEAN' }],
		},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) in which to create the alerting policy. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. \|name\| must be a host project of a Metrics Scope, otherwise INVALID\_ARGUMENT error will return. Format: `projects/<id>`. |
| `mutationRecord` | `object` | No | Describes a change made to a configuration. |
| `notificationChannels` | `string[]` | No | Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the ListNotificationChannels method. The format of the entries in this field is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] |
| `validity` | `object` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `enabled` | `boolean` | No | Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out. |
| `userLabels` | `Record<string, string>` | No | User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus \{alert name} is a valid Prometheus label names ([https://prometheus.io/docs/concepts/data\_model/#metric-names-and-labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)), whereas Prometheus \{rule group} is an unrestricted UTF-8 string. |
| `severity` | `SEVERITY_UNSPECIFIED \| CRITICAL \| ERROR \| WARNING` | No | Optional. The severity of an alerting policy indicates how important incidents generated by that policy are. The severity level will be displayed on the Incident detail page and in notifications. |
| `creationRecord` | `object` | No | Describes a change made to a configuration. |
| `displayName` | `string` | No | A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.The convention for the display\_name of a PrometheusQueryLanguageCondition is "\{rule group name}/\{alert name}", where the \{rule group name} and \{alert name} should be taken from the corresponding Prometheus configuration file. This convention is not enforced. In any case the display\_name is not a unique key of the AlertPolicy. |
| `combiner` | `COMBINE_UNSPECIFIED \| AND \| OR \| AND_WITH_MATCHING_RESOURCE` | No | How to combine the results of multiple conditions to determine if an incident should be opened. If condition\_time\_series\_query\_language is present, this must be COMBINE\_UNSPECIFIED. |
| `body_name` | `string` | No | Identifier. Required if the policy exists. The resource name for this policy. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alertPolicies/\[ALERT\_POLICY\_ID] \[ALERT\_POLICY\_ID] is assigned by Cloud Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request. |
| `alertStrategy` | `object` | No | Control over how the notification channels in notification\_channels are notified when this alert fires. |
| `documentation` | `object` | No | Documentation that is included in the notifications and incidents pertaining to this policy. |
| `conditions` | `object[]` | No | A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition\_time\_series\_query\_language is present, it must be the only condition. If condition\_monitoring\_query\_language is present, it must be the only condition. |

> [accordion] mutationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string,
>   mutateTime?: string
> }
> ```

> [accordion] validity full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[],
>   code?: number,
>   message?: string
> }
> ```

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string,
>   mutateTime?: string
> }
> ```

> [accordion] alertStrategy full type
>
> ```ts theme={null}
> {
>   notificationRateLimit?: {
>     period?: string
>   },
>   notificationChannelStrategy?: {
>     renotifyInterval?: string,
>     notificationChannelNames?: string[]
>   }[],
>   notificationPrompts?: (NOTIFICATION_PROMPT_UNSPECIFIED | OPENED | CLOSED)[],
>   autoClose?: string
> }
> ```

> [accordion] documentation full type
>
> ```ts theme={null}
> {
>   links?: {
>     url?: string,
>     displayName?: string
>   }[],
>   content?: string,
>   mimeType?: string,
>   subject?: string
> }
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   conditionMatchedLog?: {
>     filter?: string,
>     labelExtractors?: Record<string, string>
>   },
>   conditionPrometheusQueryLanguage?: {
>     disableMetricValidation?: boolean,
>     duration?: string,
>     ruleGroup?: string,
>     evaluationInterval?: string,
>     alertRule?: string,
>     labels?: Record<string, string>,
>     query?: string
>   },
>   conditionSql?: {
>     booleanTest?: {
>       column?: string
>     },
>     hourly?: {
>       minuteOffset?: number,
>       periodicity?: number
>     },
>     minutes?: {
>       periodicity?: number
>     },
>     query?: string,
>     daily?: {
>       executionTime?: {
>         nanos?: number,
>         hours?: number,
>         minutes?: number,
>         seconds?: number
>       },
>       periodicity?: number
>     },
>     rowCountTest?: {
>       threshold?: string | number,
>       comparison?: COMPARISON_UNSPECIFIED | COMPARISON_GT | COMPARISON_GE | COMPARISON_LT | COMPARISON_LE | COMPARISON_EQ | COMPARISON_NE
>     }
>   },
>   conditionThreshold?: {
>     denominatorAggregations?: {
>       perSeriesAligner?: ALIGN_NONE | ALIGN_DELTA | ALIGN_RATE | ALIGN_INTERPOLATE | ALIGN_NEXT_OLDER | ALIGN_MIN | ALIGN_MAX | ALIGN_MEAN | ALIGN_COUNT | ALIGN_SUM | ALIGN_STDDEV | ALIGN_COUNT_TRUE | ALIGN_COUNT_FALSE | ALIGN_FRACTION_TRUE | ALIGN_PERCENTILE_99 | ALIGN_PERCENTILE_95 | ALIGN_PERCENTILE_50 | ALIGN_PERCENTILE_05 | ALIGN_PERCENT_CHANGE,
>       alignmentPeriod?: string,
>       crossSeriesReducer?: REDUCE_NONE | REDUCE_MEAN | REDUCE_MIN | REDUCE_MAX | REDUCE_SUM | REDUCE_STDDEV | REDUCE_COUNT | REDUCE_COUNT_TRUE | REDUCE_COUNT_FALSE | REDUCE_FRACTION_TRUE | REDUCE_PERCENTILE_99 | REDUCE_PERCENTILE_95 | REDUCE_PERCENTILE_50 | REDUCE_PERCENTILE_05,
>       groupByFields?: string[]
>     }[],
>     thresholdValue?: number,
>     trigger?: {
>       percent?: number,
>       count?: number
>     },
>     denominatorFilter?: string,
>     comparison?: COMPARISON_UNSPECIFIED | COMPARISON_GT | COMPARISON_GE | COMPARISON_LT | COMPARISON_LE | COMPARISON_EQ | COMPARISON_NE,
>     duration?: string,
>     filter?: string,
>     evaluationMissingData?: EVALUATION_MISSING_DATA_UNSPECIFIED | EVALUATION_MISSING_DATA_INACTIVE | EVALUATION_MISSING_DATA_ACTIVE | EVALUATION_MISSING_DATA_NO_OP,
>     aggregations?: {
>       perSeriesAligner?: ALIGN_NONE | ALIGN_DELTA | ALIGN_RATE | ALIGN_INTERPOLATE | ALIGN_NEXT_OLDER | ALIGN_MIN | ALIGN_MAX | ALIGN_MEAN | ALIGN_COUNT | ALIGN_SUM | ALIGN_STDDEV | ALIGN_COUNT_TRUE | ALIGN_COUNT_FALSE | ALIGN_FRACTION_TRUE | ALIGN_PERCENTILE_99 | ALIGN_PERCENTILE_95 | ALIGN_PERCENTILE_50 | ALIGN_PERCENTILE_05 | ALIGN_PERCENT_CHANGE,
>       alignmentPeriod?: string,
>       crossSeriesReducer?: REDUCE_NONE | REDUCE_MEAN | REDUCE_MIN | REDUCE_MAX | REDUCE_SUM | REDUCE_STDDEV | REDUCE_COUNT | REDUCE_COUNT_TRUE | REDUCE_COUNT_FALSE | REDUCE_FRACTION_TRUE | REDUCE_PERCENTILE_99 | REDUCE_PERCENTILE_95 | REDUCE_PERCENTILE_50 | REDUCE_PERCENTILE_05,
>       groupByFields?: string[]
>     }[],
>     forecastOptions?: {
>       forecastHorizon?: string
>     }
>   },
>   conditionAbsent?: {
>     duration?: string,
>     trigger?: {
>       percent?: number,
>       count?: number
>     },
>     filter?: string,
>     aggregations?: {
>       perSeriesAligner?: ALIGN_NONE | ALIGN_DELTA | ALIGN_RATE | ALIGN_INTERPOLATE | ALIGN_NEXT_OLDER | ALIGN_MIN | ALIGN_MAX | ALIGN_MEAN | ALIGN_COUNT | ALIGN_SUM | ALIGN_STDDEV | ALIGN_COUNT_TRUE | ALIGN_COUNT_FALSE | ALIGN_FRACTION_TRUE | ALIGN_PERCENTILE_99 | ALIGN_PERCENTILE_95 | ALIGN_PERCENTILE_50 | ALIGN_PERCENTILE_05 | ALIGN_PERCENT_CHANGE,
>       alignmentPeriod?: string,
>       crossSeriesReducer?: REDUCE_NONE | REDUCE_MEAN | REDUCE_MIN | REDUCE_MAX | REDUCE_SUM | REDUCE_STDDEV | REDUCE_COUNT | REDUCE_COUNT_TRUE | REDUCE_COUNT_FALSE | REDUCE_FRACTION_TRUE | REDUCE_PERCENTILE_99 | REDUCE_PERCENTILE_95 | REDUCE_PERCENTILE_50 | REDUCE_PERCENTILE_05,
>       groupByFields?: string[]
>     }[]
>   },
>   conditionMonitoringQueryLanguage?: {
>     duration?: string,
>     query?: string,
>     evaluationMissingData?: EVALUATION_MISSING_DATA_UNSPECIFIED | EVALUATION_MISSING_DATA_INACTIVE | EVALUATION_MISSING_DATA_ACTIVE | EVALUATION_MISSING_DATA_NO_OP,
>     trigger?: {
>       percent?: number,
>       count?: number
>     }
>   },
>   displayName?: string,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `mutationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `notificationChannels` | `string[] \| null` | No | Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the ListNotificationChannels method. The format of the entries in this field is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] |
| `validity` | `object \| null` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `enabled` | `boolean \| null` | No | Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus \{alert name} is a valid Prometheus label names ([https://prometheus.io/docs/concepts/data\_model/#metric-names-and-labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)), whereas Prometheus \{rule group} is an unrestricted UTF-8 string. |
| `severity` | `string \| null` | No | Optional. The severity of an alerting policy indicates how important incidents generated by that policy are. The severity level will be displayed on the Incident detail page and in notifications. |
| `creationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `displayName` | `string \| null` | No | A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.The convention for the display\_name of a PrometheusQueryLanguageCondition is "\{rule group name}/\{alert name}", where the \{rule group name} and \{alert name} should be taken from the corresponding Prometheus configuration file. This convention is not enforced. In any case the display\_name is not a unique key of the AlertPolicy. |
| `combiner` | `string \| null` | No | How to combine the results of multiple conditions to determine if an incident should be opened. If condition\_time\_series\_query\_language is present, this must be COMBINE\_UNSPECIFIED. |
| `name` | `string \| null` | No | Identifier. Required if the policy exists. The resource name for this policy. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alertPolicies/\[ALERT\_POLICY\_ID] \[ALERT\_POLICY\_ID] is assigned by Cloud Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request. |
| `alertStrategy` | `object \| null` | No | Control over how the notification channels in notification\_channels are notified when this alert fires. |
| `documentation` | `object \| null` | No | Documentation that is included in the notifications and incidents pertaining to this policy. |
| `conditions` | `object[] \| null` | No | A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition\_time\_series\_query\_language is present, it must be the only condition. If condition\_monitoring\_query\_language is present, it must be the only condition. |

> [accordion] mutationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] validity full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] alertStrategy full type
>
> ```ts theme={null}
> {
>   notificationRateLimit?: {
>     period?: string | null
>   } | null,
>   notificationChannelStrategy?: {
>     renotifyInterval?: string | null,
>     notificationChannelNames?: string[] | null
>   }[] | null,
>   notificationPrompts?: string[] | null,
>   autoClose?: string | null
> } | null
> ```

> [accordion] documentation full type
>
> ```ts theme={null}
> {
>   links?: {
>     url?: string | null,
>     displayName?: string | null
>   }[] | null,
>   content?: string | null,
>   mimeType?: string | null,
>   subject?: string | null
> } | null
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   conditionMatchedLog?: {
>     filter?: string | null,
>     labelExtractors?: Record<string, string> | null
>   } | null,
>   conditionPrometheusQueryLanguage?: {
>     disableMetricValidation?: boolean | null,
>     duration?: string | null,
>     ruleGroup?: string | null,
>     evaluationInterval?: string | null,
>     alertRule?: string | null,
>     labels?: Record<string, string> | null,
>     query?: string | null
>   } | null,
>   conditionSql?: {
>     booleanTest?: {
>       column?: string | null
>     } | null,
>     hourly?: {
>       minuteOffset?: number | null,
>       periodicity?: number | null
>     } | null,
>     minutes?: {
>       periodicity?: number | null
>     } | null,
>     query?: string | null,
>     daily?: {
>       executionTime?: {
>         nanos?: number | null,
>         hours?: number | null,
>         minutes?: number | null,
>         seconds?: number | null
>       } | null,
>       periodicity?: number | null
>     } | null,
>     rowCountTest?: {
>       threshold?: string | number | null,
>       comparison?: string | null
>     } | null
>   } | null,
>   conditionThreshold?: {
>     denominatorAggregations?: {
>       perSeriesAligner?: string | null,
>       alignmentPeriod?: string | null,
>       crossSeriesReducer?: string | null,
>       groupByFields?: string[] | null
>     }[] | null,
>     thresholdValue?: number | null,
>     trigger?: {
>       percent?: number | null,
>       count?: number | null
>     } | null,
>     denominatorFilter?: string | null,
>     comparison?: string | null,
>     duration?: string | null,
>     filter?: string | null,
>     evaluationMissingData?: string | null,
>     aggregations?: {
>       perSeriesAligner?: string | null,
>       alignmentPeriod?: string | null,
>       crossSeriesReducer?: string | null,
>       groupByFields?: string[] | null
>     }[] | null,
>     forecastOptions?: {
>       forecastHorizon?: string | null
>     } | null
>   } | null,
>   conditionAbsent?: {
>     duration?: string | null,
>     trigger?: {
>       percent?: number | null,
>       count?: number | null
>     } | null,
>     filter?: string | null,
>     aggregations?: {
>       perSeriesAligner?: string | null,
>       alignmentPeriod?: string | null,
>       crossSeriesReducer?: string | null,
>       groupByFields?: string[] | null
>     }[] | null
>   } | null,
>   conditionMonitoringQueryLanguage?: {
>     duration?: string | null,
>     query?: string | null,
>     evaluationMissingData?: string | null,
>     trigger?: {
>       percent?: number | null,
>       count?: number | null
>     } | null
>   } | null,
>   displayName?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### alertPolicies.delete

`monitoring.alertPolicies.delete`

Deletes an alerting policy.Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.monitoring.alertPolicies.delete({ name: 'projects/demo-project/alertPolicies/cpu-high' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The alerting policy to delete. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alertPolicies/\[ALERT\_POLICY\_ID] For more information, see AlertPolicy. Format: `projects/<id>/alertPolicies/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### alertPolicies.get

`monitoring.alertPolicies.get`

Gets a single alerting policy

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.alertPolicies.get({ name: 'projects/demo-project/alertPolicies/cpu-high' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The alerting policy to retrieve. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alertPolicies/\[ALERT\_POLICY\_ID] Format: `projects/<id>/alertPolicies/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `mutationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `notificationChannels` | `string[] \| null` | No | Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the ListNotificationChannels method. The format of the entries in this field is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] |
| `validity` | `object \| null` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `enabled` | `boolean \| null` | No | Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus \{alert name} is a valid Prometheus label names ([https://prometheus.io/docs/concepts/data\_model/#metric-names-and-labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)), whereas Prometheus \{rule group} is an unrestricted UTF-8 string. |
| `severity` | `string \| null` | No | Optional. The severity of an alerting policy indicates how important incidents generated by that policy are. The severity level will be displayed on the Incident detail page and in notifications. |
| `creationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `displayName` | `string \| null` | No | A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.The convention for the display\_name of a PrometheusQueryLanguageCondition is "\{rule group name}/\{alert name}", where the \{rule group name} and \{alert name} should be taken from the corresponding Prometheus configuration file. This convention is not enforced. In any case the display\_name is not a unique key of the AlertPolicy. |
| `combiner` | `string \| null` | No | How to combine the results of multiple conditions to determine if an incident should be opened. If condition\_time\_series\_query\_language is present, this must be COMBINE\_UNSPECIFIED. |
| `name` | `string \| null` | No | Identifier. Required if the policy exists. The resource name for this policy. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alertPolicies/\[ALERT\_POLICY\_ID] \[ALERT\_POLICY\_ID] is assigned by Cloud Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request. |
| `alertStrategy` | `object \| null` | No | Control over how the notification channels in notification\_channels are notified when this alert fires. |
| `documentation` | `object \| null` | No | Documentation that is included in the notifications and incidents pertaining to this policy. |
| `conditions` | `object[] \| null` | No | A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition\_time\_series\_query\_language is present, it must be the only condition. If condition\_monitoring\_query\_language is present, it must be the only condition. |

> [accordion] mutationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] validity full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] alertStrategy full type
>
> ```ts theme={null}
> {
>   notificationRateLimit?: {
>     period?: string | null
>   } | null,
>   notificationChannelStrategy?: {
>     renotifyInterval?: string | null,
>     notificationChannelNames?: string[] | null
>   }[] | null,
>   notificationPrompts?: string[] | null,
>   autoClose?: string | null
> } | null
> ```

> [accordion] documentation full type
>
> ```ts theme={null}
> {
>   links?: {
>     url?: string | null,
>     displayName?: string | null
>   }[] | null,
>   content?: string | null,
>   mimeType?: string | null,
>   subject?: string | null
> } | null
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   conditionMatchedLog?: {
>     filter?: string | null,
>     labelExtractors?: Record<string, string> | null
>   } | null,
>   conditionPrometheusQueryLanguage?: {
>     disableMetricValidation?: boolean | null,
>     duration?: string | null,
>     ruleGroup?: string | null,
>     evaluationInterval?: string | null,
>     alertRule?: string | null,
>     labels?: Record<string, string> | null,
>     query?: string | null
>   } | null,
>   conditionSql?: {
>     booleanTest?: {
>       column?: string | null
>     } | null,
>     hourly?: {
>       minuteOffset?: number | null,
>       periodicity?: number | null
>     } | null,
>     minutes?: {
>       periodicity?: number | null
>     } | null,
>     query?: string | null,
>     daily?: {
>       executionTime?: {
>         nanos?: number | null,
>         hours?: number | null,
>         minutes?: number | null,
>         seconds?: number | null
>       } | null,
>       periodicity?: number | null
>     } | null,
>     rowCountTest?: {
>       threshold?: string | number | null,
>       comparison?: string | null
>     } | null
>   } | null,
>   conditionThreshold?: {
>     denominatorAggregations?: {
>       perSeriesAligner?: string | null,
>       alignmentPeriod?: string | null,
>       crossSeriesReducer?: string | null,
>       groupByFields?: string[] | null
>     }[] | null,
>     thresholdValue?: number | null,
>     trigger?: {
>       percent?: number | null,
>       count?: number | null
>     } | null,
>     denominatorFilter?: string | null,
>     comparison?: string | null,
>     duration?: string | null,
>     filter?: string | null,
>     evaluationMissingData?: string | null,
>     aggregations?: {
>       perSeriesAligner?: string | null,
>       alignmentPeriod?: string | null,
>       crossSeriesReducer?: string | null,
>       groupByFields?: string[] | null
>     }[] | null,
>     forecastOptions?: {
>       forecastHorizon?: string | null
>     } | null
>   } | null,
>   conditionAbsent?: {
>     duration?: string | null,
>     trigger?: {
>       percent?: number | null,
>       count?: number | null
>     } | null,
>     filter?: string | null,
>     aggregations?: {
>       perSeriesAligner?: string | null,
>       alignmentPeriod?: string | null,
>       crossSeriesReducer?: string | null,
>       groupByFields?: string[] | null
>     }[] | null
>   } | null,
>   conditionMonitoringQueryLanguage?: {
>     duration?: string | null,
>     query?: string | null,
>     evaluationMissingData?: string | null,
>     trigger?: {
>       percent?: number | null,
>       count?: number | null
>     } | null
>   } | null,
>   displayName?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### alertPolicies.list

`monitoring.alertPolicies.list`

Lists the existing alerting policies for the workspace (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.alertPolicies.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | Optional. If provided, this field specifies the criteria that must be met by alert policies to be included in the response.For more details, see sorting and filtering ([https://cloud.google.com/monitoring/api/v3/sorting-and-filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering)). |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) whose alert policies are to be listed. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Note that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy by name, use the GetAlertPolicy operation, instead. Format: `projects/<id>`. |
| `orderBy` | `string` | No | Optional. A comma-separated list of fields by which to sort the result. Supports the same set of field references as the filter field. Entries can be prefixed with a minus sign to sort by the field in descending order.For more details, see sorting and filtering ([https://cloud.google.com/monitoring/api/v3/sorting-and-filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering)). |
| `pageToken` | `string` | No | Optional. If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call. |
| `pageSize` | `number` | No | Optional. The maximum number of results to return in a single response. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `totalSize` | `number \| null` | No | The total number of alert policies in all pages. This number is only an estimate, and may change in subsequent pages. [https://aip.dev/158](https://aip.dev/158) |
| `alertPolicies` | `object[] \| null` | No | The returned alert policies. |
| `nextPageToken` | `string \| null` | No | If there might be more results than were returned, then this field is set to a non-empty value. To see the additional results, use that value as page\_token in the next call to this method. |

> [accordion] alertPolicies full type
>
> ```ts theme={null}
> {
>   mutationRecord?: {
>     mutatedBy?: string | null,
>     mutateTime?: string | null
>   } | null,
>   notificationChannels?: string[] | null,
>   validity?: {
>     details?: Record<string, any>[] | null,
>     code?: number | null,
>     message?: string | null
>   } | null,
>   enabled?: boolean | null,
>   userLabels?: Record<string, string> | null,
>   severity?: string | null,
>   creationRecord?: {
>     mutatedBy?: string | null,
>     mutateTime?: string | null
>   } | null,
>   displayName?: string | null,
>   combiner?: string | null,
>   name?: string | null,
>   alertStrategy?: {
>     notificationRateLimit?: {
>       period?: string | null
>     } | null,
>     notificationChannelStrategy?: {
>       renotifyInterval?: string | null,
>       notificationChannelNames?: string[] | null
>     }[] | null,
>     notificationPrompts?: string[] | null,
>     autoClose?: string | null
>   } | null,
>   documentation?: {
>     links?: {
>       url?: string | null,
>       displayName?: string | null
>     }[] | null,
>     content?: string | null,
>     mimeType?: string | null,
>     subject?: string | null
>   } | null,
>   conditions?: {
>     conditionMatchedLog?: {
>       filter?: string | null,
>       labelExtractors?: Record<string, string> | null
>     } | null,
>     conditionPrometheusQueryLanguage?: {
>       disableMetricValidation?: boolean | null,
>       duration?: string | null,
>       ruleGroup?: string | null,
>       evaluationInterval?: string | null,
>       alertRule?: string | null,
>       labels?: Record<string, string> | null,
>       query?: string | null
>     } | null,
>     conditionSql?: {
>       booleanTest?: {
>         column?: string | null
>       } | null,
>       hourly?: {
>         minuteOffset?: number | null,
>         periodicity?: number | null
>       } | null,
>       minutes?: {
>         periodicity?: number | null
>       } | null,
>       query?: string | null,
>       daily?: {
>         executionTime?: {
>           nanos?: number | null,
>           hours?: number | null,
>           minutes?: number | null,
>           seconds?: number | null
>         } | null,
>         periodicity?: number | null
>       } | null,
>       rowCountTest?: {
>         threshold?: string | number | null,
>         comparison?: string | null
>       } | null
>     } | null,
>     conditionThreshold?: {
>       denominatorAggregations?: {
>         perSeriesAligner?: string | null,
>         alignmentPeriod?: string | null,
>         crossSeriesReducer?: string | null,
>         groupByFields?: string[] | null
>       }[] | null,
>       thresholdValue?: number | null,
>       trigger?: {
>         percent?: number | null,
>         count?: number | null
>       } | null,
>       denominatorFilter?: string | null,
>       comparison?: string | null,
>       duration?: string | null,
>       filter?: string | null,
>       evaluationMissingData?: string | null,
>       aggregations?: {
>         perSeriesAligner?: string | null,
>         alignmentPeriod?: string | null,
>         crossSeriesReducer?: string | null,
>         groupByFields?: string[] | null
>       }[] | null,
>       forecastOptions?: {
>         forecastHorizon?: string | null
>       } | null
>     } | null,
>     conditionAbsent?: {
>       duration?: string | null,
>       trigger?: {
>         percent?: number | null,
>         count?: number | null
>       } | null,
>       filter?: string | null,
>       aggregations?: {
>         perSeriesAligner?: string | null,
>         alignmentPeriod?: string | null,
>         crossSeriesReducer?: string | null,
>         groupByFields?: string[] | null
>       }[] | null
>     } | null,
>     conditionMonitoringQueryLanguage?: {
>       duration?: string | null,
>       query?: string | null,
>       evaluationMissingData?: string | null,
>       trigger?: {
>         percent?: number | null,
>         count?: number | null
>       } | null
>     } | null,
>     displayName?: string | null,
>     name?: string | null
>   }[] | null
> }[] | null
> ```

***

### alertPolicies.patch

`monitoring.alertPolicies.patch`

Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.alertPolicies.patch({ name: 'projects/demo-project/alertPolicies/cpu-high', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert\_policy), or to the field's default value if the field is not in the supplied alerting policy. |
| `name` | `string` | Yes | Identifier. Required if the policy exists. The resource name for this policy. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alertPolicies/\[ALERT\_POLICY\_ID] \[ALERT\_POLICY\_ID] is assigned by Cloud Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request. Format: `projects/<id>/alertPolicies/<id>`. |
| `mutationRecord` | `object` | No | Describes a change made to a configuration. |
| `notificationChannels` | `string[]` | No | Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the ListNotificationChannels method. The format of the entries in this field is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] |
| `validity` | `object` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `enabled` | `boolean` | No | Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out. |
| `userLabels` | `Record<string, string>` | No | User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus \{alert name} is a valid Prometheus label names ([https://prometheus.io/docs/concepts/data\_model/#metric-names-and-labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)), whereas Prometheus \{rule group} is an unrestricted UTF-8 string. |
| `severity` | `SEVERITY_UNSPECIFIED \| CRITICAL \| ERROR \| WARNING` | No | Optional. The severity of an alerting policy indicates how important incidents generated by that policy are. The severity level will be displayed on the Incident detail page and in notifications. |
| `creationRecord` | `object` | No | Describes a change made to a configuration. |
| `displayName` | `string` | No | A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.The convention for the display\_name of a PrometheusQueryLanguageCondition is "\{rule group name}/\{alert name}", where the \{rule group name} and \{alert name} should be taken from the corresponding Prometheus configuration file. This convention is not enforced. In any case the display\_name is not a unique key of the AlertPolicy. |
| `combiner` | `COMBINE_UNSPECIFIED \| AND \| OR \| AND_WITH_MATCHING_RESOURCE` | No | How to combine the results of multiple conditions to determine if an incident should be opened. If condition\_time\_series\_query\_language is present, this must be COMBINE\_UNSPECIFIED. |
| `body_name` | `string` | No | Identifier. Required if the policy exists. The resource name for this policy. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alertPolicies/\[ALERT\_POLICY\_ID] \[ALERT\_POLICY\_ID] is assigned by Cloud Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request. |
| `alertStrategy` | `object` | No | Control over how the notification channels in notification\_channels are notified when this alert fires. |
| `documentation` | `object` | No | Documentation that is included in the notifications and incidents pertaining to this policy. |
| `conditions` | `object[]` | No | A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition\_time\_series\_query\_language is present, it must be the only condition. If condition\_monitoring\_query\_language is present, it must be the only condition. |

> [accordion] mutationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string,
>   mutateTime?: string
> }
> ```

> [accordion] validity full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[],
>   code?: number,
>   message?: string
> }
> ```

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string,
>   mutateTime?: string
> }
> ```

> [accordion] alertStrategy full type
>
> ```ts theme={null}
> {
>   notificationRateLimit?: {
>     period?: string
>   },
>   notificationChannelStrategy?: {
>     renotifyInterval?: string,
>     notificationChannelNames?: string[]
>   }[],
>   notificationPrompts?: (NOTIFICATION_PROMPT_UNSPECIFIED | OPENED | CLOSED)[],
>   autoClose?: string
> }
> ```

> [accordion] documentation full type
>
> ```ts theme={null}
> {
>   links?: {
>     url?: string,
>     displayName?: string
>   }[],
>   content?: string,
>   mimeType?: string,
>   subject?: string
> }
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   conditionMatchedLog?: {
>     filter?: string,
>     labelExtractors?: Record<string, string>
>   },
>   conditionPrometheusQueryLanguage?: {
>     disableMetricValidation?: boolean,
>     duration?: string,
>     ruleGroup?: string,
>     evaluationInterval?: string,
>     alertRule?: string,
>     labels?: Record<string, string>,
>     query?: string
>   },
>   conditionSql?: {
>     booleanTest?: {
>       column?: string
>     },
>     hourly?: {
>       minuteOffset?: number,
>       periodicity?: number
>     },
>     minutes?: {
>       periodicity?: number
>     },
>     query?: string,
>     daily?: {
>       executionTime?: {
>         nanos?: number,
>         hours?: number,
>         minutes?: number,
>         seconds?: number
>       },
>       periodicity?: number
>     },
>     rowCountTest?: {
>       threshold?: string | number,
>       comparison?: COMPARISON_UNSPECIFIED | COMPARISON_GT | COMPARISON_GE | COMPARISON_LT | COMPARISON_LE | COMPARISON_EQ | COMPARISON_NE
>     }
>   },
>   conditionThreshold?: {
>     denominatorAggregations?: {
>       perSeriesAligner?: ALIGN_NONE | ALIGN_DELTA | ALIGN_RATE | ALIGN_INTERPOLATE | ALIGN_NEXT_OLDER | ALIGN_MIN | ALIGN_MAX | ALIGN_MEAN | ALIGN_COUNT | ALIGN_SUM | ALIGN_STDDEV | ALIGN_COUNT_TRUE | ALIGN_COUNT_FALSE | ALIGN_FRACTION_TRUE | ALIGN_PERCENTILE_99 | ALIGN_PERCENTILE_95 | ALIGN_PERCENTILE_50 | ALIGN_PERCENTILE_05 | ALIGN_PERCENT_CHANGE,
>       alignmentPeriod?: string,
>       crossSeriesReducer?: REDUCE_NONE | REDUCE_MEAN | REDUCE_MIN | REDUCE_MAX | REDUCE_SUM | REDUCE_STDDEV | REDUCE_COUNT | REDUCE_COUNT_TRUE | REDUCE_COUNT_FALSE | REDUCE_FRACTION_TRUE | REDUCE_PERCENTILE_99 | REDUCE_PERCENTILE_95 | REDUCE_PERCENTILE_50 | REDUCE_PERCENTILE_05,
>       groupByFields?: string[]
>     }[],
>     thresholdValue?: number,
>     trigger?: {
>       percent?: number,
>       count?: number
>     },
>     denominatorFilter?: string,
>     comparison?: COMPARISON_UNSPECIFIED | COMPARISON_GT | COMPARISON_GE | COMPARISON_LT | COMPARISON_LE | COMPARISON_EQ | COMPARISON_NE,
>     duration?: string,
>     filter?: string,
>     evaluationMissingData?: EVALUATION_MISSING_DATA_UNSPECIFIED | EVALUATION_MISSING_DATA_INACTIVE | EVALUATION_MISSING_DATA_ACTIVE | EVALUATION_MISSING_DATA_NO_OP,
>     aggregations?: {
>       perSeriesAligner?: ALIGN_NONE | ALIGN_DELTA | ALIGN_RATE | ALIGN_INTERPOLATE | ALIGN_NEXT_OLDER | ALIGN_MIN | ALIGN_MAX | ALIGN_MEAN | ALIGN_COUNT | ALIGN_SUM | ALIGN_STDDEV | ALIGN_COUNT_TRUE | ALIGN_COUNT_FALSE | ALIGN_FRACTION_TRUE | ALIGN_PERCENTILE_99 | ALIGN_PERCENTILE_95 | ALIGN_PERCENTILE_50 | ALIGN_PERCENTILE_05 | ALIGN_PERCENT_CHANGE,
>       alignmentPeriod?: string,
>       crossSeriesReducer?: REDUCE_NONE | REDUCE_MEAN | REDUCE_MIN | REDUCE_MAX | REDUCE_SUM | REDUCE_STDDEV | REDUCE_COUNT | REDUCE_COUNT_TRUE | REDUCE_COUNT_FALSE | REDUCE_FRACTION_TRUE | REDUCE_PERCENTILE_99 | REDUCE_PERCENTILE_95 | REDUCE_PERCENTILE_50 | REDUCE_PERCENTILE_05,
>       groupByFields?: string[]
>     }[],
>     forecastOptions?: {
>       forecastHorizon?: string
>     }
>   },
>   conditionAbsent?: {
>     duration?: string,
>     trigger?: {
>       percent?: number,
>       count?: number
>     },
>     filter?: string,
>     aggregations?: {
>       perSeriesAligner?: ALIGN_NONE | ALIGN_DELTA | ALIGN_RATE | ALIGN_INTERPOLATE | ALIGN_NEXT_OLDER | ALIGN_MIN | ALIGN_MAX | ALIGN_MEAN | ALIGN_COUNT | ALIGN_SUM | ALIGN_STDDEV | ALIGN_COUNT_TRUE | ALIGN_COUNT_FALSE | ALIGN_FRACTION_TRUE | ALIGN_PERCENTILE_99 | ALIGN_PERCENTILE_95 | ALIGN_PERCENTILE_50 | ALIGN_PERCENTILE_05 | ALIGN_PERCENT_CHANGE,
>       alignmentPeriod?: string,
>       crossSeriesReducer?: REDUCE_NONE | REDUCE_MEAN | REDUCE_MIN | REDUCE_MAX | REDUCE_SUM | REDUCE_STDDEV | REDUCE_COUNT | REDUCE_COUNT_TRUE | REDUCE_COUNT_FALSE | REDUCE_FRACTION_TRUE | REDUCE_PERCENTILE_99 | REDUCE_PERCENTILE_95 | REDUCE_PERCENTILE_50 | REDUCE_PERCENTILE_05,
>       groupByFields?: string[]
>     }[]
>   },
>   conditionMonitoringQueryLanguage?: {
>     duration?: string,
>     query?: string,
>     evaluationMissingData?: EVALUATION_MISSING_DATA_UNSPECIFIED | EVALUATION_MISSING_DATA_INACTIVE | EVALUATION_MISSING_DATA_ACTIVE | EVALUATION_MISSING_DATA_NO_OP,
>     trigger?: {
>       percent?: number,
>       count?: number
>     }
>   },
>   displayName?: string,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `mutationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `notificationChannels` | `string[] \| null` | No | Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the ListNotificationChannels method. The format of the entries in this field is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] |
| `validity` | `object \| null` | No | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC ([https://github.com/grpc](https://github.com/grpc)). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide ([https://cloud.google.com/apis/design/errors](https://cloud.google.com/apis/design/errors)). |
| `enabled` | `boolean \| null` | No | Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus \{alert name} is a valid Prometheus label names ([https://prometheus.io/docs/concepts/data\_model/#metric-names-and-labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)), whereas Prometheus \{rule group} is an unrestricted UTF-8 string. |
| `severity` | `string \| null` | No | Optional. The severity of an alerting policy indicates how important incidents generated by that policy are. The severity level will be displayed on the Incident detail page and in notifications. |
| `creationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `displayName` | `string \| null` | No | A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.The convention for the display\_name of a PrometheusQueryLanguageCondition is "\{rule group name}/\{alert name}", where the \{rule group name} and \{alert name} should be taken from the corresponding Prometheus configuration file. This convention is not enforced. In any case the display\_name is not a unique key of the AlertPolicy. |
| `combiner` | `string \| null` | No | How to combine the results of multiple conditions to determine if an incident should be opened. If condition\_time\_series\_query\_language is present, this must be COMBINE\_UNSPECIFIED. |
| `name` | `string \| null` | No | Identifier. Required if the policy exists. The resource name for this policy. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alertPolicies/\[ALERT\_POLICY\_ID] \[ALERT\_POLICY\_ID] is assigned by Cloud Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request. |
| `alertStrategy` | `object \| null` | No | Control over how the notification channels in notification\_channels are notified when this alert fires. |
| `documentation` | `object \| null` | No | Documentation that is included in the notifications and incidents pertaining to this policy. |
| `conditions` | `object[] \| null` | No | A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition\_time\_series\_query\_language is present, it must be the only condition. If condition\_monitoring\_query\_language is present, it must be the only condition. |

> [accordion] mutationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] validity full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] alertStrategy full type
>
> ```ts theme={null}
> {
>   notificationRateLimit?: {
>     period?: string | null
>   } | null,
>   notificationChannelStrategy?: {
>     renotifyInterval?: string | null,
>     notificationChannelNames?: string[] | null
>   }[] | null,
>   notificationPrompts?: string[] | null,
>   autoClose?: string | null
> } | null
> ```

> [accordion] documentation full type
>
> ```ts theme={null}
> {
>   links?: {
>     url?: string | null,
>     displayName?: string | null
>   }[] | null,
>   content?: string | null,
>   mimeType?: string | null,
>   subject?: string | null
> } | null
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   conditionMatchedLog?: {
>     filter?: string | null,
>     labelExtractors?: Record<string, string> | null
>   } | null,
>   conditionPrometheusQueryLanguage?: {
>     disableMetricValidation?: boolean | null,
>     duration?: string | null,
>     ruleGroup?: string | null,
>     evaluationInterval?: string | null,
>     alertRule?: string | null,
>     labels?: Record<string, string> | null,
>     query?: string | null
>   } | null,
>   conditionSql?: {
>     booleanTest?: {
>       column?: string | null
>     } | null,
>     hourly?: {
>       minuteOffset?: number | null,
>       periodicity?: number | null
>     } | null,
>     minutes?: {
>       periodicity?: number | null
>     } | null,
>     query?: string | null,
>     daily?: {
>       executionTime?: {
>         nanos?: number | null,
>         hours?: number | null,
>         minutes?: number | null,
>         seconds?: number | null
>       } | null,
>       periodicity?: number | null
>     } | null,
>     rowCountTest?: {
>       threshold?: string | number | null,
>       comparison?: string | null
>     } | null
>   } | null,
>   conditionThreshold?: {
>     denominatorAggregations?: {
>       perSeriesAligner?: string | null,
>       alignmentPeriod?: string | null,
>       crossSeriesReducer?: string | null,
>       groupByFields?: string[] | null
>     }[] | null,
>     thresholdValue?: number | null,
>     trigger?: {
>       percent?: number | null,
>       count?: number | null
>     } | null,
>     denominatorFilter?: string | null,
>     comparison?: string | null,
>     duration?: string | null,
>     filter?: string | null,
>     evaluationMissingData?: string | null,
>     aggregations?: {
>       perSeriesAligner?: string | null,
>       alignmentPeriod?: string | null,
>       crossSeriesReducer?: string | null,
>       groupByFields?: string[] | null
>     }[] | null,
>     forecastOptions?: {
>       forecastHorizon?: string | null
>     } | null
>   } | null,
>   conditionAbsent?: {
>     duration?: string | null,
>     trigger?: {
>       percent?: number | null,
>       count?: number | null
>     } | null,
>     filter?: string | null,
>     aggregations?: {
>       perSeriesAligner?: string | null,
>       alignmentPeriod?: string | null,
>       crossSeriesReducer?: string | null,
>       groupByFields?: string[] | null
>     }[] | null
>   } | null,
>   conditionMonitoringQueryLanguage?: {
>     duration?: string | null,
>     query?: string | null,
>     evaluationMissingData?: string | null,
>     trigger?: {
>       percent?: number | null,
>       count?: number | null
>     } | null
>   } | null,
>   displayName?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### alerts.get

`monitoring.alerts.get`

Gets a single alert

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.alerts.get({ name: 'projects/demo-project/alerts/alert-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the alert.The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alerts/\[ALERT\_ID] The \[ALERT\_ID] is a system-assigned unique identifier for the alert. Format: `projects/<id>/alerts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `object \| null` | No | An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. |
| `state` | `string \| null` | No | Output only. The current state of the alert. |
| `name` | `string \| null` | No | Identifier. The name of the alert.The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/alerts/\[ALERT\_ID] The \[ALERT\_ID] is a system-assigned unique identifier for the alert. |
| `metadata` | `object \| null` | No | Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message. |
| `metric` | `object \| null` | No | A specific metric, identified by specifying values for all of the labels of a MetricDescriptor. |
| `policy` | `object \| null` | No | The state of the policy at the time the alert was generated. |
| `log` | `object \| null` | No | Information about the log for log-based alerts. |
| `closeTime` | `string \| null` | No | The time when the alert was closed. |
| `openTime` | `string \| null` | No | The time when the alert was opened. |

> [accordion] resource full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   labels?: Record<string, string> | null
> } | null
> ```

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   systemLabels?: Record<string, any> | null,
>   userLabels?: Record<string, string> | null
> } | null
> ```

> [accordion] metric full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   labels?: Record<string, string> | null
> } | null
> ```

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   name?: string | null,
>   severity?: string | null,
>   userLabels?: Record<string, string> | null
> } | null
> ```

> [accordion] log full type
>
> ```ts theme={null}
> {
>   extractedLabels?: Record<string, string> | null
> } | null
> ```

***

### alerts.list

`monitoring.alerts.list`

Lists the existing alerts for the metrics scope of the project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.alerts.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of results to return in a single response. If not set to a positive number, at most 50 alerts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `filter` | `string` | No | Optional. An alert is returned if there is a match on any fields belonging to the alert or its subfields. |
| `pageToken` | `string` | No | Optional. If non-empty, page\_token must contain a value returned as the next\_page\_token in a previous response to request the next set of results. |
| `parent` | `string` | Yes | Required. The name of the project to list alerts for. Format: `projects/<id>`. |
| `orderBy` | `string` | No | Optional. A comma-separated list of fields in Alert to use for sorting. The default sort direction is ascending. To specify descending order for a field, add a desc modifier. The following fields are supported: open\_time close\_timeFor example, close\_time desc, open\_time will return the alerts closed most recently, with ties broken in the order of older alerts listed first.If the field is not set, the results are sorted by open\_time desc. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `totalSize` | `number \| null` | No | The estimated total number of matching results for this query. |
| `nextPageToken` | `string \| null` | No | If not empty, indicates that there may be more results that match the request. Use the value in the page\_token field in a subsequent request to fetch the next set of results. The token is encrypted and only guaranteed to return correct results for 72 hours after it is created. If empty, all results have been returned. |
| `alerts` | `object[] \| null` | No | The list of alerts. |

> [accordion] alerts full type
>
> ```ts theme={null}
> {
>   resource?: {
>     type?: string | null,
>     labels?: Record<string, string> | null
>   } | null,
>   state?: string | null,
>   name?: string | null,
>   metadata?: {
>     systemLabels?: Record<string, any> | null,
>     userLabels?: Record<string, string> | null
>   } | null,
>   metric?: {
>     type?: string | null,
>     labels?: Record<string, string> | null
>   } | null,
>   policy?: {
>     displayName?: string | null,
>     name?: string | null,
>     severity?: string | null,
>     userLabels?: Record<string, string> | null
>   } | null,
>   log?: {
>     extractedLabels?: Record<string, string> | null
>   } | null,
>   closeTime?: string | null,
>   openTime?: string | null
> }[] | null
> ```

***

### groups.create

`monitoring.groups.create`

Creates a new group

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.groups.create({ name: 'projects/demo-project', displayName: 'Web', filter: 'resource.metadata.name=starts_with("web")' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) in which to create the group. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `validateOnly` | `boolean` | No | If true, validate this request but do not create the group. |
| `parentName` | `string` | No | The name of the group's parent, if it has one. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] For groups with no parent, parent\_name is the empty string, "". |
| `filter` | `string` | No | The filter used to determine which monitored resources belong to this group. |
| `isCluster` | `boolean` | No | If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters. |
| `displayName` | `string` | No | A user-assigned name for this group, used only for display purposes. |
| `body_name` | `string` | No | Output only. The name of this group. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique \[GROUP\_ID] that is generated automatically. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentName` | `string \| null` | No | The name of the group's parent, if it has one. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] For groups with no parent, parent\_name is the empty string, "". |
| `filter` | `string \| null` | No | The filter used to determine which monitored resources belong to this group. |
| `isCluster` | `boolean \| null` | No | If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters. |
| `displayName` | `string \| null` | No | A user-assigned name for this group, used only for display purposes. |
| `name` | `string \| null` | No | Output only. The name of this group. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique \[GROUP\_ID] that is generated automatically. |

***

### groups.delete

`monitoring.groups.delete`

Deletes an existing group

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.monitoring.groups.delete({ name: 'projects/demo-project/groups/web' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recursive` | `boolean` | No | If this field is true, then the request means to delete a group with all its descendants. Otherwise, the request means to delete a group only when it has no descendants. The default value is false. |
| `name` | `string` | Yes | Required. The group to delete. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] Format: `projects/<id>/groups/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### groups.get

`monitoring.groups.get`

Gets a single group

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.groups.get({ name: 'projects/demo-project/groups/web' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The group to retrieve. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] Format: `projects/<id>/groups/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentName` | `string \| null` | No | The name of the group's parent, if it has one. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] For groups with no parent, parent\_name is the empty string, "". |
| `filter` | `string \| null` | No | The filter used to determine which monitored resources belong to this group. |
| `isCluster` | `boolean \| null` | No | If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters. |
| `displayName` | `string \| null` | No | A user-assigned name for this group, used only for display purposes. |
| `name` | `string \| null` | No | Output only. The name of this group. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique \[GROUP\_ID] that is generated automatically. |

***

### groups.list

`monitoring.groups.list`

Lists the existing groups (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.groups.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ancestorsOfGroup` | `string` | No | A group name. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty. |
| `descendantsOfGroup` | `string` | No | A group name. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] Returns the descendants of the specified group. This is a superset of the results returned by the children\_of\_group filter, and includes children-of-children, and so forth. |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) whose groups are to be listed. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `pageSize` | `number` | No | A positive number that is the maximum number of results to return. |
| `childrenOfGroup` | `string` | No | A group name. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] Returns groups whose parent\_name field contains the group name. If no groups have this parent, the results are empty. |
| `pageToken` | `string` | No | If this field is not empty then it must contain the next\_page\_token value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `object[] \| null` | No | The groups that match the specified filters. |
| `nextPageToken` | `string \| null` | No | If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page\_token in the next call to this method. |

> [accordion] group full type
>
> ```ts theme={null}
> {
>   parentName?: string | null,
>   filter?: string | null,
>   isCluster?: boolean | null,
>   displayName?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### groups.members.list

`monitoring.groups.members.list`

Lists the monitored resources that are members of a group (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.groups.members.list({ name: 'projects/demo-project/groups/web', 'interval.startTime': '2026-12-02T09:00:00Z', 'interval.endTime': '2026-12-02T10:00:00Z' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The group whose members are listed. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] Format: `projects/<id>/groups/<id>`. |
| `pageSize` | `number` | No | A positive number that is the maximum number of results to return. |
| `pageToken` | `string` | No | If this field is not empty then it must contain the next\_page\_token value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. |
| `interval.endTime` | `string` | No | Required. The end of the time interval. |
| `interval.startTime` | `string` | No | Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time. |
| `filter` | `string` | No | An optional list filter ([https://cloud.google.com/monitoring/api/learn\_more#filtering](https://cloud.google.com/monitoring/api/learn_more#filtering)) describing the members to be returned. The filter may reference the type, labels, and metadata of monitored resources that comprise the group. For example, to return only resources representing Compute Engine VM instances, use this filter: `resource.type = "gce_instance"` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members` | `object[] \| null` | No | A set of monitored resources in the group. |
| `nextPageToken` | `string \| null` | No | If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page\_token in the next call to this method. |
| `totalSize` | `number \| null` | No | The total number of elements matching this request. |

> [accordion] members full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   labels?: Record<string, string> | null
> }[] | null
> ```

***

### groups.update

`monitoring.groups.update`

Updates an existing group. You can change any group attributes except name

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.groups.update({ name: 'projects/demo-project/groups/web', displayName: 'Web', filter: 'resource.metadata.name=starts_with("web")' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Output only. The name of this group. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique \[GROUP\_ID] that is generated automatically. Format: `projects/<id>/groups/<id>`. |
| `validateOnly` | `boolean` | No | If true, validate this request but do not update the existing group. |
| `parentName` | `string` | No | The name of the group's parent, if it has one. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] For groups with no parent, parent\_name is the empty string, "". |
| `filter` | `string` | No | The filter used to determine which monitored resources belong to this group. |
| `isCluster` | `boolean` | No | If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters. |
| `displayName` | `string` | No | A user-assigned name for this group, used only for display purposes. |
| `body_name` | `string` | No | Output only. The name of this group. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique \[GROUP\_ID] that is generated automatically. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentName` | `string \| null` | No | The name of the group's parent, if it has one. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] For groups with no parent, parent\_name is the empty string, "". |
| `filter` | `string \| null` | No | The filter used to determine which monitored resources belong to this group. |
| `isCluster` | `boolean \| null` | No | If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters. |
| `displayName` | `string \| null` | No | A user-assigned name for this group, used only for display purposes. |
| `name` | `string \| null` | No | Output only. The name of this group. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/groups/\[GROUP\_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique \[GROUP\_ID] that is generated automatically. |

***

### metricDescriptors.create

`monitoring.metricDescriptors.create`

Creates a new metric descriptor. The creation is executed asynchronously

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.metricDescriptors.create({
	name: 'projects/demo-project',
	type: 'custom.googleapis.com/orders',
	metricKind: 'GAUGE',
	valueType: 'INT64',
	description: 'Open orders',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) on which to execute the request. The format is: 4 projects/PROJECT\_ID\_OR\_NUMBER Format: `projects/<id>`. |
| `metadata` | `object` | No | Additional annotations that can be used to guide the usage of a metric. |
| `unit` | `string` | No | The units in which the metric value is reported. It is only applicable if the value\_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.Different systems might scale the values to be more easily displayed (so a value of 0.02kBy might be displayed as 20By, and a value of 3523kBy might be displayed as 3.5MBy). |
| `valueType` | `VALUE_TYPE_UNSPECIFIED \| BOOL \| INT64 \| DOUBLE \| STRING \| DISTRIBUTION \| MONEY` | No | Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric\_kind and value\_type might not be supported. |
| `displayName` | `string` | No | A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example "Request count". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota. |
| `launchStage` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | Optional. The launch stage of the metric definition. |
| `description` | `string` | No | A detailed description of the metric, which can be used in documentation. |
| `type` | `string` | No | The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name custom.googleapis.com or external.googleapis.com. Metric types should use a natural hierarchical grouping. For example: "custom.googleapis.com/invoice/paid/amount" "external.googleapis.com/prometheus/up" "appengine.googleapis.com/http/server/response\_latencies" |
| `labels` | `object[]` | No | The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response\_latencies metric type has a label for the HTTP response code, response\_code, so you can look at latencies for successful responses or just for responses that failed. |
| `body_name` | `string` | No | The resource name of the metric descriptor. |
| `metricKind` | `METRIC_KIND_UNSPECIFIED \| GAUGE \| DELTA \| CUMULATIVE` | No | Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric\_kind and value\_type might not be supported. |
| `monitoredResourceTypes` | `string[]` | No | Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here. |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   ingestDelay?: string,
>   samplePeriod?: string,
>   timeSeriesResourceHierarchyLevel?: (TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED | PROJECT | ORGANIZATION | FOLDER)[],
>   launchStage?: LAUNCH_STAGE_UNSPECIFIED | UNIMPLEMENTED | PRELAUNCH | EARLY_ACCESS | ALPHA | BETA | GA | DEPRECATED
> }
> ```

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   valueType?: STRING | BOOL | INT64,
>   key?: string,
>   description?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `object \| null` | No | Additional annotations that can be used to guide the usage of a metric. |
| `unit` | `string \| null` | No | The units in which the metric value is reported. It is only applicable if the value\_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.Different systems might scale the values to be more easily displayed (so a value of 0.02kBy might be displayed as 20By, and a value of 3523kBy might be displayed as 3.5MBy). |
| `valueType` | `string \| null` | No | Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric\_kind and value\_type might not be supported. |
| `displayName` | `string \| null` | No | A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example "Request count". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota. |
| `launchStage` | `string \| null` | No | Optional. The launch stage of the metric definition. |
| `description` | `string \| null` | No | A detailed description of the metric, which can be used in documentation. |
| `type` | `string \| null` | No | The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name custom.googleapis.com or external.googleapis.com. Metric types should use a natural hierarchical grouping. For example: "custom.googleapis.com/invoice/paid/amount" "external.googleapis.com/prometheus/up" "appengine.googleapis.com/http/server/response\_latencies" |
| `labels` | `object[] \| null` | No | The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response\_latencies metric type has a label for the HTTP response code, response\_code, so you can look at latencies for successful responses or just for responses that failed. |
| `name` | `string \| null` | No | The resource name of the metric descriptor. |
| `metricKind` | `string \| null` | No | Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric\_kind and value\_type might not be supported. |
| `monitoredResourceTypes` | `string[] \| null` | No | Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here. |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   ingestDelay?: string | null,
>   samplePeriod?: string | null,
>   timeSeriesResourceHierarchyLevel?: string[] | null,
>   launchStage?: string | null
> } | null
> ```

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   valueType?: string | null,
>   key?: string | null,
>   description?: string | null
> }[] | null
> ```

***

### metricDescriptors.delete

`monitoring.metricDescriptors.delete`

Deletes a metric descriptor. Only user-created custom metrics ([https://cloud.google.com/monitoring/custom-metrics](https://cloud.google.com/monitoring/custom-metrics)) can be deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.monitoring.metricDescriptors.delete({ name: 'projects/demo-project/metricDescriptors/custom.googleapis.com/orders' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The metric descriptor on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/metricDescriptors/\[METRIC\_ID] An example of \[METRIC\_ID] is: "custom.googleapis.com/my\_test\_metric". Format: `projects/<id>/metricDescriptors/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### metricDescriptors.get

`monitoring.metricDescriptors.get`

Gets a single metric descriptor

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.metricDescriptors.get({ name: 'projects/demo-project/metricDescriptors/custom.googleapis.com/orders' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The metric descriptor on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/metricDescriptors/\[METRIC\_ID] An example value of \[METRIC\_ID] is "compute.googleapis.com/instance/disk/read\_bytes\_count". Format: `projects/<id>/metricDescriptors/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `object \| null` | No | Additional annotations that can be used to guide the usage of a metric. |
| `unit` | `string \| null` | No | The units in which the metric value is reported. It is only applicable if the value\_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.Different systems might scale the values to be more easily displayed (so a value of 0.02kBy might be displayed as 20By, and a value of 3523kBy might be displayed as 3.5MBy). |
| `valueType` | `string \| null` | No | Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric\_kind and value\_type might not be supported. |
| `displayName` | `string \| null` | No | A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example "Request count". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota. |
| `launchStage` | `string \| null` | No | Optional. The launch stage of the metric definition. |
| `description` | `string \| null` | No | A detailed description of the metric, which can be used in documentation. |
| `type` | `string \| null` | No | The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name custom.googleapis.com or external.googleapis.com. Metric types should use a natural hierarchical grouping. For example: "custom.googleapis.com/invoice/paid/amount" "external.googleapis.com/prometheus/up" "appengine.googleapis.com/http/server/response\_latencies" |
| `labels` | `object[] \| null` | No | The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response\_latencies metric type has a label for the HTTP response code, response\_code, so you can look at latencies for successful responses or just for responses that failed. |
| `name` | `string \| null` | No | The resource name of the metric descriptor. |
| `metricKind` | `string \| null` | No | Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric\_kind and value\_type might not be supported. |
| `monitoredResourceTypes` | `string[] \| null` | No | Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here. |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   ingestDelay?: string | null,
>   samplePeriod?: string | null,
>   timeSeriesResourceHierarchyLevel?: string[] | null,
>   launchStage?: string | null
> } | null
> ```

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   valueType?: string | null,
>   key?: string | null,
>   description?: string | null
> }[] | null
> ```

***

### metricDescriptors.list

`monitoring.metricDescriptors.list`

Lists metric descriptors that match a filter (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.metricDescriptors.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. |
| `activeOnly` | `boolean` | No | Optional. If true, only metrics and monitored resource types that have recent data (within roughly 25 hours) will be included in the response. - If a metric descriptor enumerates monitored resource types, only the monitored resource types for which the metric type has recent data will be included in the returned metric descriptor, and if none of them have recent data, the metric descriptor will not be returned. - If a metric descriptor does not enumerate the compatible monitored resource types, it will be returned only if the metric type has recent data for some monitored resource type. |
| `filter` | `string` | No | Optional. If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the filter ([https://cloud.google.com/monitoring/api/v3/filters](https://cloud.google.com/monitoring/api/v3/filters)) specifies which metric descriptors are to be returned. For example, the following filter matches all custom metrics ([https://cloud.google.com/monitoring/custom-metrics](https://cloud.google.com/monitoring/custom-metrics)): metric.type = starts\_with("custom.googleapis.com/") |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `pageSize` | `number` | No | Optional. A positive number that is the maximum number of results to return. The default and maximum value is 10,000. If a page\_size \<= 0 or > 10,000 is submitted, will instead return a maximum of 10,000 results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page\_token in the next call to this method. |
| `metricDescriptors` | `object[] \| null` | No | The metric descriptors that are available to the project and that match the value of filter, if present. |

> [accordion] metricDescriptors full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     ingestDelay?: string | null,
>     samplePeriod?: string | null,
>     timeSeriesResourceHierarchyLevel?: string[] | null,
>     launchStage?: string | null
>   } | null,
>   unit?: string | null,
>   valueType?: string | null,
>   displayName?: string | null,
>   launchStage?: string | null,
>   description?: string | null,
>   type?: string | null,
>   labels?: {
>     valueType?: string | null,
>     key?: string | null,
>     description?: string | null
>   }[] | null,
>   name?: string | null,
>   metricKind?: string | null,
>   monitoredResourceTypes?: string[] | null
> }[] | null
> ```

***

### monitoredResourceDescriptors.get

`monitoring.monitoredResourceDescriptors.get`

Gets a single monitored resource descriptor

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.monitoredResourceDescriptors.get({ name: 'projects/demo-project/monitoredResourceDescriptors/gce_instance' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The monitored resource descriptor to get. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/monitoredResourceDescriptors/\[RESOURCE\_TYPE] The \[RESOURCE\_TYPE] is a predefined type, such as cloudsql\_database. Format: `projects/<id>/monitoredResourceDescriptors/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, "Google Cloud SQL Database". |
| `launchStage` | `string \| null` | No | Optional. The launch stage of the monitored resource definition. |
| `type` | `string \| null` | No | Required. The monitored resource type. For example, the type "cloudsql\_database" represents databases in Google Cloud SQL. For a list of types, see Monitored resource types ([https://cloud.google.com/monitoring/api/resources](https://cloud.google.com/monitoring/api/resources)) and Logging resource types ([https://cloud.google.com/logging/docs/api/v2/resource-list](https://cloud.google.com/logging/docs/api/v2/resource-list)). |
| `description` | `string \| null` | No | Optional. A detailed description of the monitored resource type that might be used in documentation. |
| `name` | `string \| null` | No | Optional. The resource name of the monitored resource descriptor: "projects/\{project\_id}/monitoredResourceDescriptors/\{type}" where \{type} is the value of the type field in this object and \{project\_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format "monitoredResourceDescriptors/\{type}". |
| `labels` | `object[] \| null` | No | Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels "database\_id" and "zone". |

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   valueType?: string | null,
>   key?: string | null,
>   description?: string | null
> }[] | null
> ```

***

### monitoredResourceDescriptors.list

`monitoring.monitoredResourceDescriptors.list`

Lists monitored resource descriptors that match a filter (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.monitoredResourceDescriptors.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | A positive number that is the maximum number of results to return. |
| `filter` | `string` | No | An optional filter ([https://cloud.google.com/monitoring/api/v3/filters](https://cloud.google.com/monitoring/api/v3/filters)) describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label: resource.type = starts\_with("gce\_") AND resource.label:id |
| `pageToken` | `string` | No | If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page\_token in the next call to this method. |
| `resourceDescriptors` | `object[] \| null` | No | The monitored resource descriptors that are available to this project and that match filter, if present. |

> [accordion] resourceDescriptors full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   launchStage?: string | null,
>   type?: string | null,
>   description?: string | null,
>   name?: string | null,
>   labels?: {
>     valueType?: string | null,
>     key?: string | null,
>     description?: string | null
>   }[] | null
> }[] | null
> ```

***

### notificationChannelDescriptors.get

`monitoring.notificationChannelDescriptors.get`

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannelDescriptors.get({ name: 'projects/demo-project/notificationChannelDescriptors/email' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The channel type for which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannelDescriptors/\[CHANNEL\_TYPE] Format: `projects/<id>/notificationChannelDescriptors/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The full REST resource name for this descriptor. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannelDescriptors/\[TYPE] In the above, \[TYPE] is the value of the type field. |
| `displayName` | `string \| null` | No | A human-readable name for the notification channel type. This form of the name is suitable for a user interface. |
| `launchStage` | `string \| null` | No | The product launch stage for channels of this type. |
| `type` | `string \| null` | No | The type of notification channel, such as "email" and "sms". To view the full list of channels, see Channel descriptors ([https://cloud.google.com/monitoring/alerts/using-channels-api#ncd](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd)). Notification channel types are globally unique. |
| `labels` | `object[] \| null` | No | The set of labels that must be defined to identify a particular channel of the corresponding type. Each label includes a description for how that field should be populated. |
| `supportedTiers` | `string[] \| null` | No | The tiers that support this notification channel; the project service tier must be one of the supported\_tiers. |
| `description` | `string \| null` | No | A human-readable description of the notification channel type. The description may include a description of the properties of the channel and pointers to external documentation. |

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   valueType?: string | null,
>   key?: string | null,
>   description?: string | null
> }[] | null
> ```

***

### notificationChannelDescriptors.list

`monitoring.notificationChannelDescriptors.list`

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannelDescriptors.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is: projects/\[PROJECT\_ID\_OR\_NUMBER] Note that this names ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead. Format: `projects/<id>`. |
| `pageToken` | `string` | No | If non-empty, page\_token must contain a value returned as the next\_page\_token in a previous response to request the next set of results. |
| `pageSize` | `number` | No | The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If not empty, indicates that there may be more results that match the request. Use the value in the page\_token field in a subsequent request to fetch the next set of results. If empty, all results have been returned. |
| `channelDescriptors` | `object[] \| null` | No | The monitored resource descriptors supported for the specified project, optionally filtered. |

> [accordion] channelDescriptors full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   displayName?: string | null,
>   launchStage?: string | null,
>   type?: string | null,
>   labels?: {
>     valueType?: string | null,
>     key?: string | null,
>     description?: string | null
>   }[] | null,
>   supportedTiers?: string[] | null,
>   description?: string | null
> }[] | null
> ```

***

### notificationChannels.create

`monitoring.notificationChannels.create`

Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service.Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannels.create({
	name: 'projects/demo-project',
	type: 'email',
	displayName: 'Ops email',
	labels: { email_address: 'ops@example.com' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] This names the container into which the channel will be written, this does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add /notificationChannels/\[CHANNEL\_ID] to identify the channel. Format: `projects/<id>`. |
| `creationRecord` | `object` | No | Describes a change made to a configuration. |
| `type` | `string` | No | The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. |
| `displayName` | `string` | No | An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters. |
| `userLabels` | `Record<string, string>` | No | User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |
| `description` | `string` | No | An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters. |
| `verificationStatus` | `VERIFICATION_STATUS_UNSPECIFIED \| UNVERIFIED \| VERIFIED` | No | Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being… |
| `enabled` | `boolean` | No | Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future. |
| `mutationRecords` | `object[]` | No | Records of the modification of this channel. |
| `body_name` | `string` | No | Identifier. The full REST resource name for this channel. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] The \[CHANNEL\_ID] is automatically assigned by the server on creation. |
| `labels` | `Record<string, string>` | No | Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field. |

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string,
>   mutateTime?: string
> }
> ```

> [accordion] mutationRecords full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string,
>   mutateTime?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `creationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `type` | `string \| null` | No | The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. |
| `displayName` | `string \| null` | No | An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |
| `description` | `string \| null` | No | An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters. |
| `verificationStatus` | `string \| null` | No | Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being… |
| `enabled` | `boolean \| null` | No | Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future. |
| `mutationRecords` | `object[] \| null` | No | Records of the modification of this channel. |
| `name` | `string \| null` | No | Identifier. The full REST resource name for this channel. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] The \[CHANNEL\_ID] is automatically assigned by the server on creation. |
| `labels` | `Record<string, string> \| null` | No | Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field. |

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] mutationRecords full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> }[] | null
> ```

***

### notificationChannels.delete

`monitoring.notificationChannels.delete`

Deletes a notification channel.Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannels.delete({ name: 'projects/demo-project/notificationChannels/ops-email' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `force` | `boolean` | No | If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, this operation will fail if the notification channel is referenced by existing alerting policies. |
| `name` | `string` | Yes | Required. The channel for which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] Format: `projects/<id>/notificationChannels/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### notificationChannels.get

`monitoring.notificationChannels.get`

Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannels.get({ name: 'projects/demo-project/notificationChannels/ops-email' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The channel for which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] Format: `projects/<id>/notificationChannels/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `creationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `type` | `string \| null` | No | The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. |
| `displayName` | `string \| null` | No | An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |
| `description` | `string \| null` | No | An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters. |
| `verificationStatus` | `string \| null` | No | Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being… |
| `enabled` | `boolean \| null` | No | Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future. |
| `mutationRecords` | `object[] \| null` | No | Records of the modification of this channel. |
| `name` | `string \| null` | No | Identifier. The full REST resource name for this channel. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] The \[CHANNEL\_ID] is automatically assigned by the server on creation. |
| `labels` | `Record<string, string> \| null` | No | Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field. |

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] mutationRecords full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> }[] | null
> ```

***

### notificationChannels.getVerificationCode

`monitoring.notificationChannels.getVerificationCode`

Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannels.getVerificationCode({ name: 'projects/demo-project/notificationChannels/ops-email', expireTime: '2026-12-03T00:00:00Z' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The notification channel for which a verification code is to be generated and retrieved. This must name a channel that is already verified; if the specified channel is not verified, the request will fail. Format: `projects/<id>/notificationChannels/<id>`. |
| `expireTime` | `string` | No | The desired expiration time. If specified, the API will guarantee that the returned code will not be valid after the specified timestamp; however, the API cannot guarantee that the returned code will be valid for at least as long as the requested time (the API puts an upper bound on the amount of time for which a code may be valid). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | The verification code, which may be used to verify other channels that have an equivalent identity (i.e. other channels of the same type with the same fingerprint such as other email channels with the same email address or other sms channels with the same number). |
| `expireTime` | `string \| null` | No | The expiration time associated with the code that was returned. If an expiration was provided in the request, this is the minimum of the requested expiration in the request and the max permitted expiration. |

***

### notificationChannels.list

`monitoring.notificationChannels.list`

Lists the notification channels that have been created for the project. To list the types of notification channels that are supported, use the ListNotificationChannelDescriptors method (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannels.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | Optional. A comma-separated list of fields by which to sort the result. Supports the same set of fields as in filter. Entries can be prefixed with a minus sign to sort in descending rather than ascending order.For more details, see sorting and filtering ([https://cloud.google.com/monitoring/api/v3/sorting-and-filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering)). |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] This names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the GetNotificationChannel operation. Format: `projects/<id>`. |
| `pageToken` | `string` | No | Optional. If non-empty, page\_token must contain a value returned as the next\_page\_token in a previous response to request the next set of results. |
| `pageSize` | `number` | No | Optional. The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service. |
| `filter` | `string` | No | Optional. If provided, this field specifies the criteria that must be met by notification channels to be included in the response.For more details, see sorting and filtering ([https://cloud.google.com/monitoring/api/v3/sorting-and-filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering)). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `notificationChannels` | `object[] \| null` | No | The notification channels defined for the specified project. |
| `nextPageToken` | `string \| null` | No | If not empty, indicates that there may be more results that match the request. Use the value in the page\_token field in a subsequent request to fetch the next set of results. If empty, all results have been returned. |
| `totalSize` | `number \| null` | No | The total number of notification channels in all pages. This number is only an estimate, and may change in subsequent pages. [https://aip.dev/158](https://aip.dev/158) |

> [accordion] notificationChannels full type
>
> ```ts theme={null}
> {
>   creationRecord?: {
>     mutatedBy?: string | null,
>     mutateTime?: string | null
>   } | null,
>   type?: string | null,
>   displayName?: string | null,
>   userLabels?: Record<string, string> | null,
>   description?: string | null,
>   verificationStatus?: string | null,
>   enabled?: boolean | null,
>   mutationRecords?: {
>     mutatedBy?: string | null,
>     mutateTime?: string | null
>   }[] | null,
>   name?: string | null,
>   labels?: Record<string, string> | null
> }[] | null
> ```

***

### notificationChannels.patch

`monitoring.notificationChannels.patch`

Updates a notification channel. Fields not specified in the field mask remain unchanged.Design your application to single-thread API calls that modify the state of notification channels in a single project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannels.patch({ name: 'projects/demo-project/notificationChannels/ops-email', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The full REST resource name for this channel. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] The \[CHANNEL\_ID] is automatically assigned by the server on creation. Format: `projects/<id>/notificationChannels/<id>`. |
| `updateMask` | `string` | No | Optional. The fields to update. |
| `creationRecord` | `object` | No | Describes a change made to a configuration. |
| `type` | `string` | No | The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. |
| `displayName` | `string` | No | An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters. |
| `userLabels` | `Record<string, string>` | No | User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |
| `description` | `string` | No | An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters. |
| `verificationStatus` | `VERIFICATION_STATUS_UNSPECIFIED \| UNVERIFIED \| VERIFIED` | No | Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being… |
| `enabled` | `boolean` | No | Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future. |
| `mutationRecords` | `object[]` | No | Records of the modification of this channel. |
| `body_name` | `string` | No | Identifier. The full REST resource name for this channel. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] The \[CHANNEL\_ID] is automatically assigned by the server on creation. |
| `labels` | `Record<string, string>` | No | Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field. |

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string,
>   mutateTime?: string
> }
> ```

> [accordion] mutationRecords full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string,
>   mutateTime?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `creationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `type` | `string \| null` | No | The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. |
| `displayName` | `string \| null` | No | An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |
| `description` | `string \| null` | No | An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters. |
| `verificationStatus` | `string \| null` | No | Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being… |
| `enabled` | `boolean \| null` | No | Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future. |
| `mutationRecords` | `object[] \| null` | No | Records of the modification of this channel. |
| `name` | `string \| null` | No | Identifier. The full REST resource name for this channel. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] The \[CHANNEL\_ID] is automatically assigned by the server on creation. |
| `labels` | `Record<string, string> \| null` | No | Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field. |

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] mutationRecords full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> }[] | null
> ```

***

### notificationChannels.sendVerificationCode

`monitoring.notificationChannels.sendVerificationCode`

Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannels.sendVerificationCode({ name: 'projects/demo-project/notificationChannels/ops-email' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The notification channel to which to send a verification code. Format: `projects/<id>/notificationChannels/<id>`. |
| `body` | `object` | No | The SendNotificationChannelVerificationCode request. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### notificationChannels.verify

`monitoring.notificationChannels.verify`

Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.notificationChannels.verify({ name: 'projects/demo-project/notificationChannels/ops-email', code: 'G-123456' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The notification channel to verify. Format: `projects/<id>/notificationChannels/<id>`. |
| `code` | `string` | No | Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `creationRecord` | `object \| null` | No | Describes a change made to a configuration. |
| `type` | `string \| null` | No | The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. |
| `displayName` | `string \| null` | No | An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |
| `description` | `string \| null` | No | An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters. |
| `verificationStatus` | `string \| null` | No | Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being… |
| `enabled` | `boolean \| null` | No | Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future. |
| `mutationRecords` | `object[] \| null` | No | Records of the modification of this channel. |
| `name` | `string \| null` | No | Identifier. The full REST resource name for this channel. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/notificationChannels/\[CHANNEL\_ID] The \[CHANNEL\_ID] is automatically assigned by the server on creation. |
| `labels` | `Record<string, string> \| null` | No | Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field. |

> [accordion] creationRecord full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> } | null
> ```

> [accordion] mutationRecords full type
>
> ```ts theme={null}
> {
>   mutatedBy?: string | null,
>   mutateTime?: string | null
> }[] | null
> ```

***

### services.create

`monitoring.services.create`

Create a Service

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.create({
	parent: 'projects/demo-project',
	serviceId: 'checkout',
	displayName: 'Checkout',
	custom: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. Resource name ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) of the parent Metrics Scope. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `<id>/<id>`. |
| `serviceId` | `string` | No | Optional. The Service id to use for this Service. If omitted, an id will be generated instead. Must match the pattern \[a-z0-9\\-]+ |
| `appEngine` | `object` | No | App Engine service. Learn more at [https://cloud.google.com/appengine](https://cloud.google.com/appengine). |
| `custom` | `object` | No | Use a custom service to designate a service that you want to monitor when none of the other service types (like App Engine, Cloud Run, or a GKE type) matches your intended service. |
| `gkeService` | `object` | No | GKE Service. The "service" here represents a Kubernetes service object ([https://kubernetes.io/docs/concepts/services-networking/service](https://kubernetes.io/docs/concepts/services-networking/service)). The field names correspond to the resource labels on k8s\_service monitored resources ([https://cloud.google.com/monitoring/api/resources#tag\_k8s\_service](https://cloud.google.com/monitoring/api/resources#tag_k8s_service)). |
| `istioCanonicalService` | `object` | No | Canonical service scoped to an Istio mesh. Anthos clusters running ASM >= 1.6.8 will have their services ingested as this type. |
| `userLabels` | `Record<string, string>` | No | Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `meshIstio` | `object` | No | Istio service scoped to an Istio mesh. Anthos clusters running ASM \< 1.6.8 will have their services ingested as this type. |
| `telemetry` | `object` | No | Configuration for how to query telemetry on a Service. |
| `displayName` | `string` | No | Name used for UI elements listing this Service. |
| `gkeWorkload` | `object` | No | A GKE Workload (Deployment, StatefulSet, etc). The field names correspond to the metadata labels on monitored resources that fall under a workload (for example, k8s\_container or k8s\_pod). |
| `name` | `string` | No | Identifier. Resource name for this Service. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] |
| `cloudEndpoints` | `object` | No | Cloud Endpoints service. Learn more at [https://cloud.google.com/endpoints](https://cloud.google.com/endpoints). |
| `gkeNamespace` | `object` | No | GKE Namespace. The field names correspond to the resource metadata labels on monitored resources that fall under a namespace (for example, k8s\_container or k8s\_pod). |
| `basicService` | `object` | No | A well-known service type, defined by its service type and service labels. Documentation and examples here ([https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli)). |
| `cloudRun` | `object` | No | Cloud Run service. Learn more at [https://cloud.google.com/run](https://cloud.google.com/run). |
| `clusterIstio` | `object` | No | Istio service scoped to a single Kubernetes cluster. Learn more at [https://istio.io](https://istio.io). Clusters running OSS Istio will have their services ingested as this type. |

> [accordion] appEngine full type
>
> ```ts theme={null}
> {
>   moduleId?: string
> }
> ```

> [accordion] custom full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] gkeService full type
>
> ```ts theme={null}
> {
>   location?: string,
>   clusterName?: string,
>   namespaceName?: string,
>   serviceName?: string
> }
> ```

> [accordion] istioCanonicalService full type
>
> ```ts theme={null}
> {
>   canonicalServiceNamespace?: string,
>   meshUid?: string,
>   canonicalService?: string
> }
> ```

> [accordion] meshIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string,
>   meshUid?: string,
>   serviceNamespace?: string
> }
> ```

> [accordion] telemetry full type
>
> ```ts theme={null}
> {
>   resourceName?: string
> }
> ```

> [accordion] gkeWorkload full type
>
> ```ts theme={null}
> {
>   topLevelControllerName?: string,
>   location?: string,
>   topLevelControllerType?: string,
>   clusterName?: string,
>   namespaceName?: string
> }
> ```

> [accordion] cloudEndpoints full type
>
> ```ts theme={null}
> {
>   service?: string
> }
> ```

> [accordion] gkeNamespace full type
>
> ```ts theme={null}
> {
>   location?: string,
>   namespaceName?: string,
>   clusterName?: string
> }
> ```

> [accordion] basicService full type
>
> ```ts theme={null}
> {
>   serviceLabels?: Record<string, string>,
>   serviceType?: string
> }
> ```

> [accordion] cloudRun full type
>
> ```ts theme={null}
> {
>   location?: string,
>   serviceName?: string
> }
> ```

> [accordion] clusterIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string,
>   clusterName?: string,
>   serviceNamespace?: string,
>   location?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `appEngine` | `object \| null` | No | App Engine service. Learn more at [https://cloud.google.com/appengine](https://cloud.google.com/appengine). |
| `custom` | `object \| null` | No | Use a custom service to designate a service that you want to monitor when none of the other service types (like App Engine, Cloud Run, or a GKE type) matches your intended service. |
| `gkeService` | `object \| null` | No | GKE Service. The "service" here represents a Kubernetes service object ([https://kubernetes.io/docs/concepts/services-networking/service](https://kubernetes.io/docs/concepts/services-networking/service)). The field names correspond to the resource labels on k8s\_service monitored resources ([https://cloud.google.com/monitoring/api/resources#tag\_k8s\_service](https://cloud.google.com/monitoring/api/resources#tag_k8s_service)). |
| `istioCanonicalService` | `object \| null` | No | Canonical service scoped to an Istio mesh. Anthos clusters running ASM >= 1.6.8 will have their services ingested as this type. |
| `userLabels` | `Record<string, string> \| null` | No | Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `meshIstio` | `object \| null` | No | Istio service scoped to an Istio mesh. Anthos clusters running ASM \< 1.6.8 will have their services ingested as this type. |
| `telemetry` | `object \| null` | No | Configuration for how to query telemetry on a Service. |
| `displayName` | `string \| null` | No | Name used for UI elements listing this Service. |
| `gkeWorkload` | `object \| null` | No | A GKE Workload (Deployment, StatefulSet, etc). The field names correspond to the metadata labels on monitored resources that fall under a workload (for example, k8s\_container or k8s\_pod). |
| `name` | `string \| null` | No | Identifier. Resource name for this Service. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] |
| `cloudEndpoints` | `object \| null` | No | Cloud Endpoints service. Learn more at [https://cloud.google.com/endpoints](https://cloud.google.com/endpoints). |
| `gkeNamespace` | `object \| null` | No | GKE Namespace. The field names correspond to the resource metadata labels on monitored resources that fall under a namespace (for example, k8s\_container or k8s\_pod). |
| `basicService` | `object \| null` | No | A well-known service type, defined by its service type and service labels. Documentation and examples here ([https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli)). |
| `cloudRun` | `object \| null` | No | Cloud Run service. Learn more at [https://cloud.google.com/run](https://cloud.google.com/run). |
| `clusterIstio` | `object \| null` | No | Istio service scoped to a single Kubernetes cluster. Learn more at [https://istio.io](https://istio.io). Clusters running OSS Istio will have their services ingested as this type. |

> [accordion] appEngine full type
>
> ```ts theme={null}
> {
>   moduleId?: string | null
> } | null
> ```

> [accordion] custom full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] gkeService full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   clusterName?: string | null,
>   projectId?: string | null,
>   namespaceName?: string | null,
>   serviceName?: string | null
> } | null
> ```

> [accordion] istioCanonicalService full type
>
> ```ts theme={null}
> {
>   canonicalServiceNamespace?: string | null,
>   meshUid?: string | null,
>   canonicalService?: string | null
> } | null
> ```

> [accordion] meshIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string | null,
>   meshUid?: string | null,
>   serviceNamespace?: string | null
> } | null
> ```

> [accordion] telemetry full type
>
> ```ts theme={null}
> {
>   resourceName?: string | null
> } | null
> ```

> [accordion] gkeWorkload full type
>
> ```ts theme={null}
> {
>   topLevelControllerName?: string | null,
>   location?: string | null,
>   topLevelControllerType?: string | null,
>   clusterName?: string | null,
>   namespaceName?: string | null,
>   projectId?: string | null
> } | null
> ```

> [accordion] cloudEndpoints full type
>
> ```ts theme={null}
> {
>   service?: string | null
> } | null
> ```

> [accordion] gkeNamespace full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   projectId?: string | null,
>   namespaceName?: string | null,
>   clusterName?: string | null
> } | null
> ```

> [accordion] basicService full type
>
> ```ts theme={null}
> {
>   serviceLabels?: Record<string, string> | null,
>   serviceType?: string | null
> } | null
> ```

> [accordion] cloudRun full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   serviceName?: string | null
> } | null
> ```

> [accordion] clusterIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string | null,
>   clusterName?: string | null,
>   serviceNamespace?: string | null,
>   location?: string | null
> } | null
> ```

***

### services.delete

`monitoring.services.delete`

Soft delete this Service

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.delete({ name: 'projects/demo-project/services/checkout' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name of the Service to delete. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] Format: `<id>/<id>/services/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### services.get

`monitoring.services.get`

Get the named Service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.get({ name: 'projects/demo-project/services/checkout' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name of the Service. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] Format: `<id>/<id>/services/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `appEngine` | `object \| null` | No | App Engine service. Learn more at [https://cloud.google.com/appengine](https://cloud.google.com/appengine). |
| `custom` | `object \| null` | No | Use a custom service to designate a service that you want to monitor when none of the other service types (like App Engine, Cloud Run, or a GKE type) matches your intended service. |
| `gkeService` | `object \| null` | No | GKE Service. The "service" here represents a Kubernetes service object ([https://kubernetes.io/docs/concepts/services-networking/service](https://kubernetes.io/docs/concepts/services-networking/service)). The field names correspond to the resource labels on k8s\_service monitored resources ([https://cloud.google.com/monitoring/api/resources#tag\_k8s\_service](https://cloud.google.com/monitoring/api/resources#tag_k8s_service)). |
| `istioCanonicalService` | `object \| null` | No | Canonical service scoped to an Istio mesh. Anthos clusters running ASM >= 1.6.8 will have their services ingested as this type. |
| `userLabels` | `Record<string, string> \| null` | No | Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `meshIstio` | `object \| null` | No | Istio service scoped to an Istio mesh. Anthos clusters running ASM \< 1.6.8 will have their services ingested as this type. |
| `telemetry` | `object \| null` | No | Configuration for how to query telemetry on a Service. |
| `displayName` | `string \| null` | No | Name used for UI elements listing this Service. |
| `gkeWorkload` | `object \| null` | No | A GKE Workload (Deployment, StatefulSet, etc). The field names correspond to the metadata labels on monitored resources that fall under a workload (for example, k8s\_container or k8s\_pod). |
| `name` | `string \| null` | No | Identifier. Resource name for this Service. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] |
| `cloudEndpoints` | `object \| null` | No | Cloud Endpoints service. Learn more at [https://cloud.google.com/endpoints](https://cloud.google.com/endpoints). |
| `gkeNamespace` | `object \| null` | No | GKE Namespace. The field names correspond to the resource metadata labels on monitored resources that fall under a namespace (for example, k8s\_container or k8s\_pod). |
| `basicService` | `object \| null` | No | A well-known service type, defined by its service type and service labels. Documentation and examples here ([https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli)). |
| `cloudRun` | `object \| null` | No | Cloud Run service. Learn more at [https://cloud.google.com/run](https://cloud.google.com/run). |
| `clusterIstio` | `object \| null` | No | Istio service scoped to a single Kubernetes cluster. Learn more at [https://istio.io](https://istio.io). Clusters running OSS Istio will have their services ingested as this type. |

> [accordion] appEngine full type
>
> ```ts theme={null}
> {
>   moduleId?: string | null
> } | null
> ```

> [accordion] custom full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] gkeService full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   clusterName?: string | null,
>   projectId?: string | null,
>   namespaceName?: string | null,
>   serviceName?: string | null
> } | null
> ```

> [accordion] istioCanonicalService full type
>
> ```ts theme={null}
> {
>   canonicalServiceNamespace?: string | null,
>   meshUid?: string | null,
>   canonicalService?: string | null
> } | null
> ```

> [accordion] meshIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string | null,
>   meshUid?: string | null,
>   serviceNamespace?: string | null
> } | null
> ```

> [accordion] telemetry full type
>
> ```ts theme={null}
> {
>   resourceName?: string | null
> } | null
> ```

> [accordion] gkeWorkload full type
>
> ```ts theme={null}
> {
>   topLevelControllerName?: string | null,
>   location?: string | null,
>   topLevelControllerType?: string | null,
>   clusterName?: string | null,
>   namespaceName?: string | null,
>   projectId?: string | null
> } | null
> ```

> [accordion] cloudEndpoints full type
>
> ```ts theme={null}
> {
>   service?: string | null
> } | null
> ```

> [accordion] gkeNamespace full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   projectId?: string | null,
>   namespaceName?: string | null,
>   clusterName?: string | null
> } | null
> ```

> [accordion] basicService full type
>
> ```ts theme={null}
> {
>   serviceLabels?: Record<string, string> | null,
>   serviceType?: string | null
> } | null
> ```

> [accordion] cloudRun full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   serviceName?: string | null
> } | null
> ```

> [accordion] clusterIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string | null,
>   clusterName?: string | null,
>   serviceNamespace?: string | null,
>   location?: string | null
> } | null
> ```

***

### services.list

`monitoring.services.list`

List Services for this Metrics Scope (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. |
| `parent` | `string` | Yes | Required. Resource name of the parent containing the listed services, either a project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) or a Monitoring Metrics Scope. The formats are: projects/\[PROJECT\_ID\_OR\_NUMBER] workspaces/\[HOST\_PROJECT\_ID\_OR\_NUMBER] Format: `<id>/<id>`. |
| `filter` | `string` | No | A filter specifying what Services to return. The filter supports filtering on a particular service-identifier type or one of its attributes.To filter on a particular service-identifier type, the identifier\_case refers to which option in the identifier field is populated. For example, the filter identifier\_case = "CUSTOM" would match all services with a value for the custom field. |
| `pageSize` | `number` | No | A non-negative number that is the maximum number of results to return. When 0, use default page size. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page\_token in the next call to this method. |
| `services` | `object[] \| null` | No | The Services matching the specified filter. |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   appEngine?: {
>     moduleId?: string | null
>   } | null,
>   custom?: {
>   } | null,
>   gkeService?: {
>     location?: string | null,
>     clusterName?: string | null,
>     projectId?: string | null,
>     namespaceName?: string | null,
>     serviceName?: string | null
>   } | null,
>   istioCanonicalService?: {
>     canonicalServiceNamespace?: string | null,
>     meshUid?: string | null,
>     canonicalService?: string | null
>   } | null,
>   userLabels?: Record<string, string> | null,
>   meshIstio?: {
>     serviceName?: string | null,
>     meshUid?: string | null,
>     serviceNamespace?: string | null
>   } | null,
>   telemetry?: {
>     resourceName?: string | null
>   } | null,
>   displayName?: string | null,
>   gkeWorkload?: {
>     topLevelControllerName?: string | null,
>     location?: string | null,
>     topLevelControllerType?: string | null,
>     clusterName?: string | null,
>     namespaceName?: string | null,
>     projectId?: string | null
>   } | null,
>   name?: string | null,
>   cloudEndpoints?: {
>     service?: string | null
>   } | null,
>   gkeNamespace?: {
>     location?: string | null,
>     projectId?: string | null,
>     namespaceName?: string | null,
>     clusterName?: string | null
>   } | null,
>   basicService?: {
>     serviceLabels?: Record<string, string> | null,
>     serviceType?: string | null
>   } | null,
>   cloudRun?: {
>     location?: string | null,
>     serviceName?: string | null
>   } | null,
>   clusterIstio?: {
>     serviceName?: string | null,
>     clusterName?: string | null,
>     serviceNamespace?: string | null,
>     location?: string | null
>   } | null
> }[] | null
> ```

***

### services.patch

`monitoring.services.patch`

Update this Service

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.patch({ name: 'projects/demo-project/services/checkout', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | A set of field paths defining which fields to use for the update. |
| `name` | `string` | Yes | Identifier. Resource name for this Service. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] Format: `<id>/<id>/services/<id>`. |
| `appEngine` | `object` | No | App Engine service. Learn more at [https://cloud.google.com/appengine](https://cloud.google.com/appengine). |
| `custom` | `object` | No | Use a custom service to designate a service that you want to monitor when none of the other service types (like App Engine, Cloud Run, or a GKE type) matches your intended service. |
| `gkeService` | `object` | No | GKE Service. The "service" here represents a Kubernetes service object ([https://kubernetes.io/docs/concepts/services-networking/service](https://kubernetes.io/docs/concepts/services-networking/service)). The field names correspond to the resource labels on k8s\_service monitored resources ([https://cloud.google.com/monitoring/api/resources#tag\_k8s\_service](https://cloud.google.com/monitoring/api/resources#tag_k8s_service)). |
| `istioCanonicalService` | `object` | No | Canonical service scoped to an Istio mesh. Anthos clusters running ASM >= 1.6.8 will have their services ingested as this type. |
| `userLabels` | `Record<string, string>` | No | Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `meshIstio` | `object` | No | Istio service scoped to an Istio mesh. Anthos clusters running ASM \< 1.6.8 will have their services ingested as this type. |
| `telemetry` | `object` | No | Configuration for how to query telemetry on a Service. |
| `displayName` | `string` | No | Name used for UI elements listing this Service. |
| `gkeWorkload` | `object` | No | A GKE Workload (Deployment, StatefulSet, etc). The field names correspond to the metadata labels on monitored resources that fall under a workload (for example, k8s\_container or k8s\_pod). |
| `body_name` | `string` | No | Identifier. Resource name for this Service. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] |
| `cloudEndpoints` | `object` | No | Cloud Endpoints service. Learn more at [https://cloud.google.com/endpoints](https://cloud.google.com/endpoints). |
| `gkeNamespace` | `object` | No | GKE Namespace. The field names correspond to the resource metadata labels on monitored resources that fall under a namespace (for example, k8s\_container or k8s\_pod). |
| `basicService` | `object` | No | A well-known service type, defined by its service type and service labels. Documentation and examples here ([https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli)). |
| `cloudRun` | `object` | No | Cloud Run service. Learn more at [https://cloud.google.com/run](https://cloud.google.com/run). |
| `clusterIstio` | `object` | No | Istio service scoped to a single Kubernetes cluster. Learn more at [https://istio.io](https://istio.io). Clusters running OSS Istio will have their services ingested as this type. |

> [accordion] appEngine full type
>
> ```ts theme={null}
> {
>   moduleId?: string
> }
> ```

> [accordion] custom full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] gkeService full type
>
> ```ts theme={null}
> {
>   location?: string,
>   clusterName?: string,
>   namespaceName?: string,
>   serviceName?: string
> }
> ```

> [accordion] istioCanonicalService full type
>
> ```ts theme={null}
> {
>   canonicalServiceNamespace?: string,
>   meshUid?: string,
>   canonicalService?: string
> }
> ```

> [accordion] meshIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string,
>   meshUid?: string,
>   serviceNamespace?: string
> }
> ```

> [accordion] telemetry full type
>
> ```ts theme={null}
> {
>   resourceName?: string
> }
> ```

> [accordion] gkeWorkload full type
>
> ```ts theme={null}
> {
>   topLevelControllerName?: string,
>   location?: string,
>   topLevelControllerType?: string,
>   clusterName?: string,
>   namespaceName?: string
> }
> ```

> [accordion] cloudEndpoints full type
>
> ```ts theme={null}
> {
>   service?: string
> }
> ```

> [accordion] gkeNamespace full type
>
> ```ts theme={null}
> {
>   location?: string,
>   namespaceName?: string,
>   clusterName?: string
> }
> ```

> [accordion] basicService full type
>
> ```ts theme={null}
> {
>   serviceLabels?: Record<string, string>,
>   serviceType?: string
> }
> ```

> [accordion] cloudRun full type
>
> ```ts theme={null}
> {
>   location?: string,
>   serviceName?: string
> }
> ```

> [accordion] clusterIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string,
>   clusterName?: string,
>   serviceNamespace?: string,
>   location?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `appEngine` | `object \| null` | No | App Engine service. Learn more at [https://cloud.google.com/appengine](https://cloud.google.com/appengine). |
| `custom` | `object \| null` | No | Use a custom service to designate a service that you want to monitor when none of the other service types (like App Engine, Cloud Run, or a GKE type) matches your intended service. |
| `gkeService` | `object \| null` | No | GKE Service. The "service" here represents a Kubernetes service object ([https://kubernetes.io/docs/concepts/services-networking/service](https://kubernetes.io/docs/concepts/services-networking/service)). The field names correspond to the resource labels on k8s\_service monitored resources ([https://cloud.google.com/monitoring/api/resources#tag\_k8s\_service](https://cloud.google.com/monitoring/api/resources#tag_k8s_service)). |
| `istioCanonicalService` | `object \| null` | No | Canonical service scoped to an Istio mesh. Anthos clusters running ASM >= 1.6.8 will have their services ingested as this type. |
| `userLabels` | `Record<string, string> \| null` | No | Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `meshIstio` | `object \| null` | No | Istio service scoped to an Istio mesh. Anthos clusters running ASM \< 1.6.8 will have their services ingested as this type. |
| `telemetry` | `object \| null` | No | Configuration for how to query telemetry on a Service. |
| `displayName` | `string \| null` | No | Name used for UI elements listing this Service. |
| `gkeWorkload` | `object \| null` | No | A GKE Workload (Deployment, StatefulSet, etc). The field names correspond to the metadata labels on monitored resources that fall under a workload (for example, k8s\_container or k8s\_pod). |
| `name` | `string \| null` | No | Identifier. Resource name for this Service. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] |
| `cloudEndpoints` | `object \| null` | No | Cloud Endpoints service. Learn more at [https://cloud.google.com/endpoints](https://cloud.google.com/endpoints). |
| `gkeNamespace` | `object \| null` | No | GKE Namespace. The field names correspond to the resource metadata labels on monitored resources that fall under a namespace (for example, k8s\_container or k8s\_pod). |
| `basicService` | `object \| null` | No | A well-known service type, defined by its service type and service labels. Documentation and examples here ([https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli)). |
| `cloudRun` | `object \| null` | No | Cloud Run service. Learn more at [https://cloud.google.com/run](https://cloud.google.com/run). |
| `clusterIstio` | `object \| null` | No | Istio service scoped to a single Kubernetes cluster. Learn more at [https://istio.io](https://istio.io). Clusters running OSS Istio will have their services ingested as this type. |

> [accordion] appEngine full type
>
> ```ts theme={null}
> {
>   moduleId?: string | null
> } | null
> ```

> [accordion] custom full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] gkeService full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   clusterName?: string | null,
>   projectId?: string | null,
>   namespaceName?: string | null,
>   serviceName?: string | null
> } | null
> ```

> [accordion] istioCanonicalService full type
>
> ```ts theme={null}
> {
>   canonicalServiceNamespace?: string | null,
>   meshUid?: string | null,
>   canonicalService?: string | null
> } | null
> ```

> [accordion] meshIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string | null,
>   meshUid?: string | null,
>   serviceNamespace?: string | null
> } | null
> ```

> [accordion] telemetry full type
>
> ```ts theme={null}
> {
>   resourceName?: string | null
> } | null
> ```

> [accordion] gkeWorkload full type
>
> ```ts theme={null}
> {
>   topLevelControllerName?: string | null,
>   location?: string | null,
>   topLevelControllerType?: string | null,
>   clusterName?: string | null,
>   namespaceName?: string | null,
>   projectId?: string | null
> } | null
> ```

> [accordion] cloudEndpoints full type
>
> ```ts theme={null}
> {
>   service?: string | null
> } | null
> ```

> [accordion] gkeNamespace full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   projectId?: string | null,
>   namespaceName?: string | null,
>   clusterName?: string | null
> } | null
> ```

> [accordion] basicService full type
>
> ```ts theme={null}
> {
>   serviceLabels?: Record<string, string> | null,
>   serviceType?: string | null
> } | null
> ```

> [accordion] cloudRun full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   serviceName?: string | null
> } | null
> ```

> [accordion] clusterIstio full type
>
> ```ts theme={null}
> {
>   serviceName?: string | null,
>   clusterName?: string | null,
>   serviceNamespace?: string | null,
>   location?: string | null
> } | null
> ```

***

### services.serviceLevelObjectives.create

`monitoring.services.serviceLevelObjectives.create`

Create a ServiceLevelObjective for the given Service

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.serviceLevelObjectives.create({
	parent: 'projects/demo-project/services/checkout',
	displayName: '99.5% good',
	goal: 0.995,
	rollingPeriod: '2592000s',
	serviceLevelIndicator: {
		requestBased: {
			goodTotalRatio: { goodServiceFilter: 'metric.type="custom.googleapis.com/good"', totalServiceFilter: 'metric.type="custom.googleapis.com/total"' },
		},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. Resource name of the parent Service. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] Format: `<id>/<id>/services/<id>`. |
| `serviceLevelObjectiveId` | `string` | No | Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective. If omitted, an id will be generated instead. Must match the pattern ^\[a-zA-Z0-9-\_:.]+\$ |
| `rollingPeriod` | `string` | No | A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days. |
| `name` | `string` | No | Identifier. Resource name for this ServiceLevelObjective. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID]/serviceLevelObjectives/\[SLO\_NAME] |
| `serviceLevelIndicator` | `object` | No | A Service-Level Indicator (SLI) describes the "performance" of a service. For some services, the SLI is well-defined. In such cases, the SLI can be described easily by referencing the well-known SLI and providing the needed parameters. Alternatively, a "custom" SLI can be defined with a query to the underlying metric store. An SLI is defined to be good\_service / total\_service over any queried time interval. The value of performance always falls into the range 0 \<= performance \<= 1. |
| `goal` | `number` | No | The fraction of service that must be good in order for this objective to be met. 0 \< goal \<= 0.9999. |
| `userLabels` | `Record<string, string>` | No | Labels which have been used to annotate the service-level objective. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `displayName` | `string` | No | Name used for UI elements listing this SLO. |
| `calendarPeriod` | `CALENDAR_PERIOD_UNSPECIFIED \| DAY \| WEEK \| FORTNIGHT \| MONTH \| QUARTER \| HALF \| YEAR` | No | A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. |

> [accordion] serviceLevelIndicator full type
>
> ```ts theme={null}
> {
>   basicSli?: {
>     availability?: {
>     },
>     location?: string[],
>     latency?: {
>       threshold?: string
>     },
>     version?: string[],
>     method?: string[]
>   },
>   requestBased?: {
>     goodTotalRatio?: {
>       totalServiceFilter?: string,
>       badServiceFilter?: string,
>       goodServiceFilter?: string
>     },
>     distributionCut?: {
>       distributionFilter?: string,
>       range?: {
>         max?: number,
>         min?: number
>       }
>     }
>   },
>   windowsBased?: {
>     windowPeriod?: string,
>     metricMeanInRange?: {
>       range?: {
>         max?: number,
>         min?: number
>       },
>       timeSeries?: string
>     },
>     goodTotalRatioThreshold?: {
>       threshold?: number,
>       performance?: {
>         goodTotalRatio?: {
>           totalServiceFilter?: string,
>           badServiceFilter?: string,
>           goodServiceFilter?: string
>         },
>         distributionCut?: {
>           distributionFilter?: string,
>           range?: {
>             max?: number,
>             min?: number
>           }
>         }
>       },
>       basicSliPerformance?: {
>         availability?: {
>         },
>         location?: string[],
>         latency?: {
>           threshold?: string
>         },
>         version?: string[],
>         method?: string[]
>       }
>     },
>     metricSumInRange?: {
>       range?: {
>         max?: number,
>         min?: number
>       },
>       timeSeries?: string
>     },
>     goodBadMetricFilter?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rollingPeriod` | `string \| null` | No | A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days. |
| `name` | `string \| null` | No | Identifier. Resource name for this ServiceLevelObjective. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID]/serviceLevelObjectives/\[SLO\_NAME] |
| `serviceLevelIndicator` | `object \| null` | No | A Service-Level Indicator (SLI) describes the "performance" of a service. For some services, the SLI is well-defined. In such cases, the SLI can be described easily by referencing the well-known SLI and providing the needed parameters. Alternatively, a "custom" SLI can be defined with a query to the underlying metric store. An SLI is defined to be good\_service / total\_service over any queried time interval. The value of performance always falls into the range 0 \<= performance \<= 1. |
| `goal` | `number \| null` | No | The fraction of service that must be good in order for this objective to be met. 0 \< goal \<= 0.9999. |
| `userLabels` | `Record<string, string> \| null` | No | Labels which have been used to annotate the service-level objective. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `displayName` | `string \| null` | No | Name used for UI elements listing this SLO. |
| `calendarPeriod` | `string \| null` | No | A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. |

> [accordion] serviceLevelIndicator full type
>
> ```ts theme={null}
> {
>   basicSli?: {
>     availability?: {
>     } | null,
>     location?: string[] | null,
>     latency?: {
>       threshold?: string | null
>     } | null,
>     version?: string[] | null,
>     method?: string[] | null
>   } | null,
>   requestBased?: {
>     goodTotalRatio?: {
>       totalServiceFilter?: string | null,
>       badServiceFilter?: string | null,
>       goodServiceFilter?: string | null
>     } | null,
>     distributionCut?: {
>       distributionFilter?: string | null,
>       range?: {
>         max?: number | null,
>         min?: number | null
>       } | null
>     } | null
>   } | null,
>   windowsBased?: {
>     windowPeriod?: string | null,
>     metricMeanInRange?: {
>       range?: {
>         max?: number | null,
>         min?: number | null
>       } | null,
>       timeSeries?: string | null
>     } | null,
>     goodTotalRatioThreshold?: {
>       threshold?: number | null,
>       performance?: {
>         goodTotalRatio?: {
>           totalServiceFilter?: string | null,
>           badServiceFilter?: string | null,
>           goodServiceFilter?: string | null
>         } | null,
>         distributionCut?: {
>           distributionFilter?: string | null,
>           range?: {
>             max?: number | null,
>             min?: number | null
>           } | null
>         } | null
>       } | null,
>       basicSliPerformance?: {
>         availability?: {
>         } | null,
>         location?: string[] | null,
>         latency?: {
>           threshold?: string | null
>         } | null,
>         version?: string[] | null,
>         method?: string[] | null
>       } | null
>     } | null,
>     metricSumInRange?: {
>       range?: {
>         max?: number | null,
>         min?: number | null
>       } | null,
>       timeSeries?: string | null
>     } | null,
>     goodBadMetricFilter?: string | null
>   } | null
> } | null
> ```

***

### services.serviceLevelObjectives.delete

`monitoring.services.serviceLevelObjectives.delete`

Delete the given ServiceLevelObjective

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.serviceLevelObjectives.delete({ name: 'projects/demo-project/services/checkout/serviceLevelObjectives/availability' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name of the ServiceLevelObjective to delete. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID]/serviceLevelObjectives/\[SLO\_NAME] Format: `<id>/<id>/services/<id>/serviceLevelObjectives/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### services.serviceLevelObjectives.get

`monitoring.services.serviceLevelObjectives.get`

Get a ServiceLevelObjective by name

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.serviceLevelObjectives.get({ name: 'projects/demo-project/services/checkout/serviceLevelObjectives/availability' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `view` | `VIEW_UNSPECIFIED \| FULL \| EXPLICIT` | No | View of the ServiceLevelObjective to return. If DEFAULT, return the ServiceLevelObjective as originally defined. If EXPLICIT and the ServiceLevelObjective is defined in terms of a BasicSli, replace the BasicSli with a RequestBasedSli spelling out how the SLI is computed. |
| `name` | `string` | Yes | Required. Resource name of the ServiceLevelObjective to get. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID]/serviceLevelObjectives/\[SLO\_NAME] Format: `<id>/<id>/services/<id>/serviceLevelObjectives/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rollingPeriod` | `string \| null` | No | A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days. |
| `name` | `string \| null` | No | Identifier. Resource name for this ServiceLevelObjective. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID]/serviceLevelObjectives/\[SLO\_NAME] |
| `serviceLevelIndicator` | `object \| null` | No | A Service-Level Indicator (SLI) describes the "performance" of a service. For some services, the SLI is well-defined. In such cases, the SLI can be described easily by referencing the well-known SLI and providing the needed parameters. Alternatively, a "custom" SLI can be defined with a query to the underlying metric store. An SLI is defined to be good\_service / total\_service over any queried time interval. The value of performance always falls into the range 0 \<= performance \<= 1. |
| `goal` | `number \| null` | No | The fraction of service that must be good in order for this objective to be met. 0 \< goal \<= 0.9999. |
| `userLabels` | `Record<string, string> \| null` | No | Labels which have been used to annotate the service-level objective. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `displayName` | `string \| null` | No | Name used for UI elements listing this SLO. |
| `calendarPeriod` | `string \| null` | No | A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. |

> [accordion] serviceLevelIndicator full type
>
> ```ts theme={null}
> {
>   basicSli?: {
>     availability?: {
>     } | null,
>     location?: string[] | null,
>     latency?: {
>       threshold?: string | null
>     } | null,
>     version?: string[] | null,
>     method?: string[] | null
>   } | null,
>   requestBased?: {
>     goodTotalRatio?: {
>       totalServiceFilter?: string | null,
>       badServiceFilter?: string | null,
>       goodServiceFilter?: string | null
>     } | null,
>     distributionCut?: {
>       distributionFilter?: string | null,
>       range?: {
>         max?: number | null,
>         min?: number | null
>       } | null
>     } | null
>   } | null,
>   windowsBased?: {
>     windowPeriod?: string | null,
>     metricMeanInRange?: {
>       range?: {
>         max?: number | null,
>         min?: number | null
>       } | null,
>       timeSeries?: string | null
>     } | null,
>     goodTotalRatioThreshold?: {
>       threshold?: number | null,
>       performance?: {
>         goodTotalRatio?: {
>           totalServiceFilter?: string | null,
>           badServiceFilter?: string | null,
>           goodServiceFilter?: string | null
>         } | null,
>         distributionCut?: {
>           distributionFilter?: string | null,
>           range?: {
>             max?: number | null,
>             min?: number | null
>           } | null
>         } | null
>       } | null,
>       basicSliPerformance?: {
>         availability?: {
>         } | null,
>         location?: string[] | null,
>         latency?: {
>           threshold?: string | null
>         } | null,
>         version?: string[] | null,
>         method?: string[] | null
>       } | null
>     } | null,
>     metricSumInRange?: {
>       range?: {
>         max?: number | null,
>         min?: number | null
>       } | null,
>       timeSeries?: string | null
>     } | null,
>     goodBadMetricFilter?: string | null
>   } | null
> } | null
> ```

***

### services.serviceLevelObjectives.list

`monitoring.services.serviceLevelObjectives.list`

List the ServiceLevelObjectives for the given Service (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.serviceLevelObjectives.list({ parent: 'projects/demo-project/services/checkout' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. Resource name of the parent containing the listed SLOs, either a project or a Monitoring Metrics Scope. The formats are: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID] workspaces/\[HOST\_PROJECT\_ID\_OR\_NUMBER]/services/- Format: `<id>/<id>/services/<id>`. |
| `pageToken` | `string` | No | If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. |
| `view` | `VIEW_UNSPECIFIED \| FULL \| EXPLICIT` | No | View of the ServiceLevelObjectives to return. If DEFAULT, return each ServiceLevelObjective as originally defined. If EXPLICIT and the ServiceLevelObjective is defined in terms of a BasicSli, replace the BasicSli with a RequestBasedSli spelling out how the SLI is computed. |
| `filter` | `string` | No | A filter specifying what ServiceLevelObjectives to return. |
| `pageSize` | `number` | No | A non-negative number that is the maximum number of results to return. When 0, use default page size. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `serviceLevelObjectives` | `object[] \| null` | No | The ServiceLevelObjectives matching the specified filter. |
| `nextPageToken` | `string \| null` | No | If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page\_token in the next call to this method. |

> [accordion] serviceLevelObjectives full type
>
> ```ts theme={null}
> {
>   rollingPeriod?: string | null,
>   name?: string | null,
>   serviceLevelIndicator?: {
>     basicSli?: {
>       availability?: {
>       } | null,
>       location?: string[] | null,
>       latency?: {
>         threshold?: string | null
>       } | null,
>       version?: string[] | null,
>       method?: string[] | null
>     } | null,
>     requestBased?: {
>       goodTotalRatio?: {
>         totalServiceFilter?: string | null,
>         badServiceFilter?: string | null,
>         goodServiceFilter?: string | null
>       } | null,
>       distributionCut?: {
>         distributionFilter?: string | null,
>         range?: {
>           max?: number | null,
>           min?: number | null
>         } | null
>       } | null
>     } | null,
>     windowsBased?: {
>       windowPeriod?: string | null,
>       metricMeanInRange?: {
>         range?: {
>           max?: number | null,
>           min?: number | null
>         } | null,
>         timeSeries?: string | null
>       } | null,
>       goodTotalRatioThreshold?: {
>         threshold?: number | null,
>         performance?: {
>           goodTotalRatio?: {
>             totalServiceFilter?: string | null,
>             badServiceFilter?: string | null,
>             goodServiceFilter?: string | null
>           } | null,
>           distributionCut?: {
>             distributionFilter?: string | null,
>             range?: {
>               max?: number | null,
>               min?: number | null
>             } | null
>           } | null
>         } | null,
>         basicSliPerformance?: {
>           availability?: {
>           } | null,
>           location?: string[] | null,
>           latency?: {
>             threshold?: string | null
>           } | null,
>           version?: string[] | null,
>           method?: string[] | null
>         } | null
>       } | null,
>       metricSumInRange?: {
>         range?: {
>           max?: number | null,
>           min?: number | null
>         } | null,
>         timeSeries?: string | null
>       } | null,
>       goodBadMetricFilter?: string | null
>     } | null
>   } | null,
>   goal?: number | null,
>   userLabels?: Record<string, string> | null,
>   displayName?: string | null,
>   calendarPeriod?: string | null
> }[] | null
> ```

***

### services.serviceLevelObjectives.patch

`monitoring.services.serviceLevelObjectives.patch`

Update the given ServiceLevelObjective

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.services.serviceLevelObjectives.patch({ name: 'projects/demo-project/services/checkout/serviceLevelObjectives/availability', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. Resource name for this ServiceLevelObjective. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID]/serviceLevelObjectives/\[SLO\_NAME] Format: `<id>/<id>/services/<id>/serviceLevelObjectives/<id>`. |
| `updateMask` | `string` | No | A set of field paths defining which fields to use for the update. |
| `rollingPeriod` | `string` | No | A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days. |
| `body_name` | `string` | No | Identifier. Resource name for this ServiceLevelObjective. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID]/serviceLevelObjectives/\[SLO\_NAME] |
| `serviceLevelIndicator` | `object` | No | A Service-Level Indicator (SLI) describes the "performance" of a service. For some services, the SLI is well-defined. In such cases, the SLI can be described easily by referencing the well-known SLI and providing the needed parameters. Alternatively, a "custom" SLI can be defined with a query to the underlying metric store. An SLI is defined to be good\_service / total\_service over any queried time interval. The value of performance always falls into the range 0 \<= performance \<= 1. |
| `goal` | `number` | No | The fraction of service that must be good in order for this objective to be met. 0 \< goal \<= 0.9999. |
| `userLabels` | `Record<string, string>` | No | Labels which have been used to annotate the service-level objective. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `displayName` | `string` | No | Name used for UI elements listing this SLO. |
| `calendarPeriod` | `CALENDAR_PERIOD_UNSPECIFIED \| DAY \| WEEK \| FORTNIGHT \| MONTH \| QUARTER \| HALF \| YEAR` | No | A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. |

> [accordion] serviceLevelIndicator full type
>
> ```ts theme={null}
> {
>   basicSli?: {
>     availability?: {
>     },
>     location?: string[],
>     latency?: {
>       threshold?: string
>     },
>     version?: string[],
>     method?: string[]
>   },
>   requestBased?: {
>     goodTotalRatio?: {
>       totalServiceFilter?: string,
>       badServiceFilter?: string,
>       goodServiceFilter?: string
>     },
>     distributionCut?: {
>       distributionFilter?: string,
>       range?: {
>         max?: number,
>         min?: number
>       }
>     }
>   },
>   windowsBased?: {
>     windowPeriod?: string,
>     metricMeanInRange?: {
>       range?: {
>         max?: number,
>         min?: number
>       },
>       timeSeries?: string
>     },
>     goodTotalRatioThreshold?: {
>       threshold?: number,
>       performance?: {
>         goodTotalRatio?: {
>           totalServiceFilter?: string,
>           badServiceFilter?: string,
>           goodServiceFilter?: string
>         },
>         distributionCut?: {
>           distributionFilter?: string,
>           range?: {
>             max?: number,
>             min?: number
>           }
>         }
>       },
>       basicSliPerformance?: {
>         availability?: {
>         },
>         location?: string[],
>         latency?: {
>           threshold?: string
>         },
>         version?: string[],
>         method?: string[]
>       }
>     },
>     metricSumInRange?: {
>       range?: {
>         max?: number,
>         min?: number
>       },
>       timeSeries?: string
>     },
>     goodBadMetricFilter?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rollingPeriod` | `string \| null` | No | A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days. |
| `name` | `string \| null` | No | Identifier. Resource name for this ServiceLevelObjective. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/services/\[SERVICE\_ID]/serviceLevelObjectives/\[SLO\_NAME] |
| `serviceLevelIndicator` | `object \| null` | No | A Service-Level Indicator (SLI) describes the "performance" of a service. For some services, the SLI is well-defined. In such cases, the SLI can be described easily by referencing the well-known SLI and providing the needed parameters. Alternatively, a "custom" SLI can be defined with a query to the underlying metric store. An SLI is defined to be good\_service / total\_service over any queried time interval. The value of performance always falls into the range 0 \<= performance \<= 1. |
| `goal` | `number \| null` | No | The fraction of service that must be good in order for this objective to be met. 0 \< goal \<= 0.9999. |
| `userLabels` | `Record<string, string> \| null` | No | Labels which have been used to annotate the service-level objective. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
| `displayName` | `string \| null` | No | Name used for UI elements listing this SLO. |
| `calendarPeriod` | `string \| null` | No | A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. |

> [accordion] serviceLevelIndicator full type
>
> ```ts theme={null}
> {
>   basicSli?: {
>     availability?: {
>     } | null,
>     location?: string[] | null,
>     latency?: {
>       threshold?: string | null
>     } | null,
>     version?: string[] | null,
>     method?: string[] | null
>   } | null,
>   requestBased?: {
>     goodTotalRatio?: {
>       totalServiceFilter?: string | null,
>       badServiceFilter?: string | null,
>       goodServiceFilter?: string | null
>     } | null,
>     distributionCut?: {
>       distributionFilter?: string | null,
>       range?: {
>         max?: number | null,
>         min?: number | null
>       } | null
>     } | null
>   } | null,
>   windowsBased?: {
>     windowPeriod?: string | null,
>     metricMeanInRange?: {
>       range?: {
>         max?: number | null,
>         min?: number | null
>       } | null,
>       timeSeries?: string | null
>     } | null,
>     goodTotalRatioThreshold?: {
>       threshold?: number | null,
>       performance?: {
>         goodTotalRatio?: {
>           totalServiceFilter?: string | null,
>           badServiceFilter?: string | null,
>           goodServiceFilter?: string | null
>         } | null,
>         distributionCut?: {
>           distributionFilter?: string | null,
>           range?: {
>             max?: number | null,
>             min?: number | null
>           } | null
>         } | null
>       } | null,
>       basicSliPerformance?: {
>         availability?: {
>         } | null,
>         location?: string[] | null,
>         latency?: {
>           threshold?: string | null
>         } | null,
>         version?: string[] | null,
>         method?: string[] | null
>       } | null
>     } | null,
>     metricSumInRange?: {
>       range?: {
>         max?: number | null,
>         min?: number | null
>       } | null,
>       timeSeries?: string | null
>     } | null,
>     goodBadMetricFilter?: string | null
>   } | null
> } | null
> ```

***

### snoozes.create

`monitoring.snoozes.create`

Creates a Snooze that will prevent alerts, which match the provided criteria, from being opened. The Snooze applies for a specific time interval

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.snoozes.create({
	parent: 'projects/demo-project',
	displayName: 'Maintenance',
	criteria: {
		policies: ['projects/demo-project/alertPolicies/cpu-high'],
	},
	interval: { startTime: '2026-12-06T02:00:00Z', endTime: '2026-12-06T04:00:00Z' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) in which a Snooze should be created. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `displayName` | `string` | No | Required. A display name for the Snooze. This can be, at most, 512 unicode characters. |
| `name` | `string` | No | Required. Identifier. The name of the Snooze. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/snoozes/\[SNOOZE\_ID] The ID of the Snooze will be generated by the system. |
| `criteria` | `object` | No | Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. |
| `interval` | `object` | No | Describes a time interval: Reads: A half-open time interval. It includes the end time but excludes the start time: (startTime, endTime]. The start time must be specified, must be earlier than the end time, and should be no older than the data retention period for the metric. Writes: A closed time interval. It extends from the start time to the end time, and includes both: \[startTime, endTime]. Valid time intervals depend on the MetricKind ([https://cloud.google.com/monitoring/api/ref\_v3/rest/v3/projects.metricDescriptors#MetricKind](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind)) of the metric value. |

> [accordion] criteria full type
>
> ```ts theme={null}
> {
>   policies?: string[],
>   filter?: string
> }
> ```

> [accordion] interval full type
>
> ```ts theme={null}
> {
>   endTime?: string,
>   startTime?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Required. A display name for the Snooze. This can be, at most, 512 unicode characters. |
| `name` | `string \| null` | No | Required. Identifier. The name of the Snooze. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/snoozes/\[SNOOZE\_ID] The ID of the Snooze will be generated by the system. |
| `criteria` | `object \| null` | No | Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. |
| `interval` | `object \| null` | No | Describes a time interval: Reads: A half-open time interval. It includes the end time but excludes the start time: (startTime, endTime]. The start time must be specified, must be earlier than the end time, and should be no older than the data retention period for the metric. Writes: A closed time interval. It extends from the start time to the end time, and includes both: \[startTime, endTime]. Valid time intervals depend on the MetricKind ([https://cloud.google.com/monitoring/api/ref\_v3/rest/v3/projects.metricDescriptors#MetricKind](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind)) of the metric value. |

> [accordion] criteria full type
>
> ```ts theme={null}
> {
>   policies?: string[] | null,
>   filter?: string | null
> } | null
> ```

> [accordion] interval full type
>
> ```ts theme={null}
> {
>   endTime?: string | null,
>   startTime?: string | null
> } | null
> ```

***

### snoozes.get

`monitoring.snoozes.get`

Retrieves a Snooze by name

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.snoozes.get({ name: 'projects/demo-project/snoozes/maint' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The ID of the Snooze to retrieve. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/snoozes/\[SNOOZE\_ID] Format: `projects/<id>/snoozes/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Required. A display name for the Snooze. This can be, at most, 512 unicode characters. |
| `name` | `string \| null` | No | Required. Identifier. The name of the Snooze. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/snoozes/\[SNOOZE\_ID] The ID of the Snooze will be generated by the system. |
| `criteria` | `object \| null` | No | Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. |
| `interval` | `object \| null` | No | Describes a time interval: Reads: A half-open time interval. It includes the end time but excludes the start time: (startTime, endTime]. The start time must be specified, must be earlier than the end time, and should be no older than the data retention period for the metric. Writes: A closed time interval. It extends from the start time to the end time, and includes both: \[startTime, endTime]. Valid time intervals depend on the MetricKind ([https://cloud.google.com/monitoring/api/ref\_v3/rest/v3/projects.metricDescriptors#MetricKind](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind)) of the metric value. |

> [accordion] criteria full type
>
> ```ts theme={null}
> {
>   policies?: string[] | null,
>   filter?: string | null
> } | null
> ```

> [accordion] interval full type
>
> ```ts theme={null}
> {
>   endTime?: string | null,
>   startTime?: string | null
> } | null
> ```

***

### snoozes.list

`monitoring.snoozes.list`

Lists the Snoozes associated with a project. Can optionally pass in filter, which specifies predicates to match Snoozes (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.snoozes.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) whose Snoozes should be listed. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `filter` | `string` | No | Optional. Optional filter to restrict results to the given criteria. The following fields are supported. interval.start\_time interval.end\_timeFor example: interval.start\_time > "2022-03-11T00:00:00-08:00" AND interval.end\_time \< "2022-03-12T00:00:00-08:00" |
| `pageSize` | `number` | No | Optional. The maximum number of results to return for a single query. The server may further constrain the maximum number of results returned in a single page. The value should be in the range 1, 1000. If the value given is outside this range, the server will decide the number of results to be returned. |
| `pageToken` | `string` | No | Optional. The next\_page\_token from a previous call to ListSnoozesRequest to get the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Page token for repeated calls to ListSnoozes, to fetch additional pages of results. If this is empty or missing, there are no more pages. |
| `snoozes` | `object[] \| null` | No | Snoozes matching this list call. |

> [accordion] snoozes full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   name?: string | null,
>   criteria?: {
>     policies?: string[] | null,
>     filter?: string | null
>   } | null,
>   interval?: {
>     endTime?: string | null,
>     startTime?: string | null
>   } | null
> }[] | null
> ```

***

### snoozes.patch

`monitoring.snoozes.patch`

Updates a Snooze, identified by its name, with the parameters in the given Snooze object

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.snoozes.patch({ name: 'projects/demo-project/snoozes/maint', updateMask: 'displayName', displayName: 'Maintenance' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Identifier. The name of the Snooze. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/snoozes/\[SNOOZE\_ID] The ID of the Snooze will be generated by the system. Format: `projects/<id>/snoozes/<id>`. |
| `updateMask` | `string` | No | Required. The fields to update.For each field listed in update\_mask: If the Snooze object supplied in the UpdateSnoozeRequest has a value for that field, the value of the field in the existing Snooze will be set to the value of the field in the supplied Snooze. |
| `displayName` | `string` | No | Required. A display name for the Snooze. This can be, at most, 512 unicode characters. |
| `body_name` | `string` | No | Required. Identifier. The name of the Snooze. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/snoozes/\[SNOOZE\_ID] The ID of the Snooze will be generated by the system. |
| `criteria` | `object` | No | Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. |
| `interval` | `object` | No | Describes a time interval: Reads: A half-open time interval. It includes the end time but excludes the start time: (startTime, endTime]. The start time must be specified, must be earlier than the end time, and should be no older than the data retention period for the metric. Writes: A closed time interval. It extends from the start time to the end time, and includes both: \[startTime, endTime]. Valid time intervals depend on the MetricKind ([https://cloud.google.com/monitoring/api/ref\_v3/rest/v3/projects.metricDescriptors#MetricKind](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind)) of the metric value. |

> [accordion] criteria full type
>
> ```ts theme={null}
> {
>   policies?: string[],
>   filter?: string
> }
> ```

> [accordion] interval full type
>
> ```ts theme={null}
> {
>   endTime?: string,
>   startTime?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Required. A display name for the Snooze. This can be, at most, 512 unicode characters. |
| `name` | `string \| null` | No | Required. Identifier. The name of the Snooze. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/snoozes/\[SNOOZE\_ID] The ID of the Snooze will be generated by the system. |
| `criteria` | `object \| null` | No | Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. |
| `interval` | `object \| null` | No | Describes a time interval: Reads: A half-open time interval. It includes the end time but excludes the start time: (startTime, endTime]. The start time must be specified, must be earlier than the end time, and should be no older than the data retention period for the metric. Writes: A closed time interval. It extends from the start time to the end time, and includes both: \[startTime, endTime]. Valid time intervals depend on the MetricKind ([https://cloud.google.com/monitoring/api/ref\_v3/rest/v3/projects.metricDescriptors#MetricKind](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind)) of the metric value. |

> [accordion] criteria full type
>
> ```ts theme={null}
> {
>   policies?: string[] | null,
>   filter?: string | null
> } | null
> ```

> [accordion] interval full type
>
> ```ts theme={null}
> {
>   endTime?: string | null,
>   startTime?: string | null
> } | null
> ```

***

### timeSeries.create

`monitoring.timeSeries.create`

Creates or adds data to one or more time series. The response is empty if all time series in the request were written

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.timeSeries.create({
	name: 'projects/demo-project',
	timeSeries: [{
		metric: { type: 'custom.googleapis.com/orders' },
		resource: {
			type: 'global',
			labels: { project_id: 'demo-project' },
		},
		points: [{
			interval: { endTime: '2026-12-02T10:00:00Z' },
			value: { int64Value: '42' },
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `timeSeries` | `object[]` | No | Required. The new data to be added to a list of time series. Adds at most one data point to each of several time series. The new data point must be more recent than any other point in its time series. Each TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.The maximum number of TimeSeries objects per Create request is 200. |

> [accordion] timeSeries full type
>
> ```ts theme={null}
> {
>   points?: {
>     interval?: {
>       endTime?: string,
>       startTime?: string
>     },
>     value?: {
>       int64Value?: string | number,
>       boolValue?: boolean,
>       doubleValue?: number,
>       distributionValue?: {
>         bucketCounts?: (string | number)[],
>         exemplars?: {
>           timestamp?: string,
>           attachments?: Record<string, any>[],
>           value?: number
>         }[],
>         sumOfSquaredDeviation?: number,
>         mean?: number,
>         bucketOptions?: {
>           exponentialBuckets?: {
>             growthFactor?: number,
>             numFiniteBuckets?: number,
>             scale?: number
>           },
>           linearBuckets?: {
>             numFiniteBuckets?: number,
>             width?: number,
>             offset?: number
>           },
>           explicitBuckets?: {
>             bounds?: number[]
>           }
>         },
>         count?: string | number,
>         range?: {
>           min?: number,
>           max?: number
>         }
>       },
>       stringValue?: string
>     }
>   }[],
>   unit?: string,
>   metadata?: {
>     systemLabels?: Record<string, any>,
>     userLabels?: Record<string, string>
>   },
>   valueType?: VALUE_TYPE_UNSPECIFIED | BOOL | INT64 | DOUBLE | STRING | DISTRIBUTION | MONEY,
>   metric?: {
>     type?: string,
>     labels?: Record<string, string>
>   },
>   metricKind?: METRIC_KIND_UNSPECIFIED | GAUGE | DELTA | CUMULATIVE,
>   description?: string,
>   resource?: {
>     type?: string,
>     labels?: Record<string, string>
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### timeSeries.createService

`monitoring.timeSeries.createService`

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.timeSeries.createService({
	name: 'projects/demo-project',
	timeSeries: [{
		metric: { type: 'pubsub.googleapis.com/topic/send_request_count' },
		resource: {
			type: 'pubsub_topic',
			labels: { project_id: 'demo-project', topic_id: 'orders' },
		},
		points: [{
			interval: { endTime: '2026-12-02T10:00:00Z' },
			value: { int64Value: '42' },
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `timeSeries` | `object[]` | No | Required. The new data to be added to a list of time series. Adds at most one data point to each of several time series. The new data point must be more recent than any other point in its time series. Each TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.The maximum number of TimeSeries objects per Create request is 200. |

> [accordion] timeSeries full type
>
> ```ts theme={null}
> {
>   points?: {
>     interval?: {
>       endTime?: string,
>       startTime?: string
>     },
>     value?: {
>       int64Value?: string | number,
>       boolValue?: boolean,
>       doubleValue?: number,
>       distributionValue?: {
>         bucketCounts?: (string | number)[],
>         exemplars?: {
>           timestamp?: string,
>           attachments?: Record<string, any>[],
>           value?: number
>         }[],
>         sumOfSquaredDeviation?: number,
>         mean?: number,
>         bucketOptions?: {
>           exponentialBuckets?: {
>             growthFactor?: number,
>             numFiniteBuckets?: number,
>             scale?: number
>           },
>           linearBuckets?: {
>             numFiniteBuckets?: number,
>             width?: number,
>             offset?: number
>           },
>           explicitBuckets?: {
>             bounds?: number[]
>           }
>         },
>         count?: string | number,
>         range?: {
>           min?: number,
>           max?: number
>         }
>       },
>       stringValue?: string
>     }
>   }[],
>   unit?: string,
>   metadata?: {
>     systemLabels?: Record<string, any>,
>     userLabels?: Record<string, string>
>   },
>   valueType?: VALUE_TYPE_UNSPECIFIED | BOOL | INT64 | DOUBLE | STRING | DISTRIBUTION | MONEY,
>   metric?: {
>     type?: string,
>     labels?: Record<string, string>
>   },
>   metricKind?: METRIC_KIND_UNSPECIFIED | GAUGE | DELTA | CUMULATIVE,
>   description?: string,
>   resource?: {
>     type?: string,
>     labels?: Record<string, string>
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### timeSeries.list

`monitoring.timeSeries.list`

Lists time series that match a filter (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.timeSeries.list({
	name: 'projects/demo-project',
	filter: 'metric.type="compute.googleapis.com/instance/cpu/utilization"',
	'interval.startTime': '2026-12-02T09:00:00Z',
	'interval.endTime': '2026-12-02T10:00:00Z',
	view: 'FULL',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `interval.startTime` | `string` | No | Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time. |
| `secondaryAggregation.crossSeriesReducer` | `REDUCE_NONE \| REDUCE_MEAN \| REDUCE_MIN \| REDUCE_MAX \| REDUCE_SUM \| REDUCE_STDDEV \| REDUCE_COUNT \| REDUCE_COUNT_TRUE \| REDUCE_COUNT_FALSE \| REDUCE_FRACTION_TRUE \| REDUCE_PERCENTILE_99 \| REDUCE_PERCENTILE_95 \| REDUCE_PERCENTILE_50 \| REDUCE_PERCENTILE_05` | No | The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric\_kind and the value\_type of the original time series. Reduction can yield a time series with a different metric\_kind or value\_type than the input time series.Time series data must first be aligned (see per\_series\_aligner) in order to perform cross-time series reduction. |
| `pageToken` | `string` | No | If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. |
| `aggregation.groupByFields` | `string[]` | No | The set of fields to preserve when cross\_series\_reducer is specified. The group\_by\_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross\_series\_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group\_by\_fields are aggregated away. |
| `interval.endTime` | `string` | No | Required. The end of the time interval. |
| `aggregation.crossSeriesReducer` | `REDUCE_NONE \| REDUCE_MEAN \| REDUCE_MIN \| REDUCE_MAX \| REDUCE_SUM \| REDUCE_STDDEV \| REDUCE_COUNT \| REDUCE_COUNT_TRUE \| REDUCE_COUNT_FALSE \| REDUCE_FRACTION_TRUE \| REDUCE_PERCENTILE_99 \| REDUCE_PERCENTILE_95 \| REDUCE_PERCENTILE_50 \| REDUCE_PERCENTILE_05` | No | The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric\_kind and the value\_type of the original time series. Reduction can yield a time series with a different metric\_kind or value\_type than the input time series.Time series data must first be aligned (see per\_series\_aligner) in order to perform cross-time series reduction. |
| `aggregation.perSeriesAligner` | `ALIGN_NONE \| ALIGN_DELTA \| ALIGN_RATE \| ALIGN_INTERPOLATE \| ALIGN_NEXT_OLDER \| ALIGN_MIN \| ALIGN_MAX \| ALIGN_MEAN \| ALIGN_COUNT \| ALIGN_SUM \| ALIGN_STDDEV \| ALIGN_COUNT_TRUE \| ALIGN_COUNT_FALSE \| ALIGN_FRACTION_TRUE \| ALIGN_PERCENTILE_99 \| ALIGN_PERCENTILE_95 \| ALIGN_PERCENTILE_50 \| ALIGN_PERCENTILE_05 \| ALIGN_PERCENT_CHANGE` | No | An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN\_NONE, all alignments cause all the data points in an alignment\_period to be mathematically grouped together, resulting in a single data point for each alignment\_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric\_kind and value\_type of the original time series. |
| `pageSize` | `number` | No | A positive number that is the maximum number of results to return. If page\_size is empty or more than 100,000 results, the effective page\_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned. |
| `aggregation.alignmentPeriod` | `string` | No | The alignment\_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN\_NONE is specified, this field is required or an error is returned. |
| `secondaryAggregation.perSeriesAligner` | `ALIGN_NONE \| ALIGN_DELTA \| ALIGN_RATE \| ALIGN_INTERPOLATE \| ALIGN_NEXT_OLDER \| ALIGN_MIN \| ALIGN_MAX \| ALIGN_MEAN \| ALIGN_COUNT \| ALIGN_SUM \| ALIGN_STDDEV \| ALIGN_COUNT_TRUE \| ALIGN_COUNT_FALSE \| ALIGN_FRACTION_TRUE \| ALIGN_PERCENTILE_99 \| ALIGN_PERCENTILE_95 \| ALIGN_PERCENTILE_50 \| ALIGN_PERCENTILE_05 \| ALIGN_PERCENT_CHANGE` | No | An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN\_NONE, all alignments cause all the data points in an alignment\_period to be mathematically grouped together, resulting in a single data point for each alignment\_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric\_kind and value\_type of the original time series. |
| `view` | `FULL \| HEADERS` | No | Required. Specifies which information is returned about the time series. |
| `orderBy` | `string` | No | Unsupported: must be left blank. The points in each time series are currently returned in reverse time order (most recent to oldest). |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)), organization or folder on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] organizations/\[ORGANIZATION\_ID] folders/\[FOLDER\_ID] Format: `projects/<id>`. |
| `secondaryAggregation.groupByFields` | `string[]` | No | The set of fields to preserve when cross\_series\_reducer is specified. The group\_by\_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross\_series\_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group\_by\_fields are aggregated away. |
| `filter` | `string` | No | Required. A monitoring filter ([https://cloud.google.com/monitoring/api/v3/filters](https://cloud.google.com/monitoring/api/v3/filters)) that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage\_time" AND metric.labels.instance\_name = "my-instance-name" |
| `secondaryAggregation.alignmentPeriod` | `string` | No | The alignment\_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN\_NONE is specified, this field is required or an error is returned. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `executionErrors` | `object[] \| null` | No | Query execution errors that may have caused the time series data returned to be incomplete. |
| `nextPageToken` | `string \| null` | No | If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page\_token in the next call to this method. |
| `timeSeries` | `object[] \| null` | No | One or more time series that match the filter included in the request. |
| `unreachable` | `string[] \| null` | No | Cloud regions that were unreachable which may have caused incomplete data to be returned. |
| `unit` | `string \| null` | No | The unit in which all time\_series point values are reported. unit follows the UCUM format for units as seen in [https://unitsofmeasure.org/ucum.html](https://unitsofmeasure.org/ucum.html). If different time\_series have different units (for example, because they come from different metric types, or a unit is absent), then unit will be "\{not\_a\_unit}". |

> [accordion] executionErrors full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] timeSeries full type
>
> ```ts theme={null}
> {
>   points?: {
>     interval?: {
>       endTime?: string | null,
>       startTime?: string | null
>     } | null,
>     value?: {
>       int64Value?: string | number | null,
>       boolValue?: boolean | null,
>       doubleValue?: number | null,
>       distributionValue?: {
>         bucketCounts?: (string | number)[] | null,
>         exemplars?: {
>           timestamp?: string | null,
>           attachments?: Record<string, any>[] | null,
>           value?: number | null
>         }[] | null,
>         sumOfSquaredDeviation?: number | null,
>         mean?: number | null,
>         bucketOptions?: {
>           exponentialBuckets?: {
>             growthFactor?: number | null,
>             numFiniteBuckets?: number | null,
>             scale?: number | null
>           } | null,
>           linearBuckets?: {
>             numFiniteBuckets?: number | null,
>             width?: number | null,
>             offset?: number | null
>           } | null,
>           explicitBuckets?: {
>             bounds?: number[] | null
>           } | null
>         } | null,
>         count?: string | number | null,
>         range?: {
>           min?: number | null,
>           max?: number | null
>         } | null
>       } | null,
>       stringValue?: string | null
>     } | null
>   }[] | null,
>   unit?: string | null,
>   metadata?: {
>     systemLabels?: Record<string, any> | null,
>     userLabels?: Record<string, string> | null
>   } | null,
>   valueType?: string | null,
>   metric?: {
>     type?: string | null,
>     labels?: Record<string, string> | null
>   } | null,
>   metricKind?: string | null,
>   description?: string | null,
>   resource?: {
>     type?: string | null,
>     labels?: Record<string, string> | null
>   } | null
> }[] | null
> ```

***

### timeSeries.query

`monitoring.timeSeries.query`

Queries time series by using Monitoring Query Language (MQL). We recommend using PromQL instead of MQL

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.timeSeries.query({ name: 'projects/demo-project', query: 'fetch gce_instance | metric "compute.googleapis.com/instance/cpu/utilization" | within 1h' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) on which to execute the request. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `query` | `string` | No | Required. The query in the Monitoring Query Language ([https://cloud.google.com/monitoring/mql/reference](https://cloud.google.com/monitoring/mql/reference)) format. The default time zone is in UTC. |
| `pageSize` | `number` | No | A positive number that is the maximum number of time\_series\_data to return. |
| `pageToken` | `string` | No | If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `timeSeriesDescriptor` | `object \| null` | No | A descriptor for the labels and points in a time series. |
| `nextPageToken` | `string \| null` | No | If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page\_token in the next call to this method. |
| `partialErrors` | `object[] \| null` | No | Query execution errors that may have caused the time series data returned to be incomplete. The available data will be available in the response. |
| `timeSeriesData` | `object[] \| null` | No | The time series data. |

> [accordion] timeSeriesDescriptor full type
>
> ```ts theme={null}
> {
>   labelDescriptors?: {
>     valueType?: string | null,
>     key?: string | null,
>     description?: string | null
>   }[] | null,
>   pointDescriptors?: {
>     valueType?: string | null,
>     metricKind?: string | null,
>     unit?: string | null,
>     key?: string | null
>   }[] | null
> } | null
> ```

> [accordion] partialErrors full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] timeSeriesData full type
>
> ```ts theme={null}
> {
>   pointData?: {
>     timeInterval?: {
>       endTime?: string | null,
>       startTime?: string | null
>     } | null,
>     values?: {
>       int64Value?: string | number | null,
>       boolValue?: boolean | null,
>       doubleValue?: number | null,
>       distributionValue?: {
>         bucketCounts?: (string | number)[] | null,
>         exemplars?: {
>           timestamp?: string | null,
>           attachments?: Record<string, any>[] | null,
>           value?: number | null
>         }[] | null,
>         sumOfSquaredDeviation?: number | null,
>         mean?: number | null,
>         bucketOptions?: {
>           exponentialBuckets?: {
>             growthFactor?: number | null,
>             numFiniteBuckets?: number | null,
>             scale?: number | null
>           } | null,
>           linearBuckets?: {
>             numFiniteBuckets?: number | null,
>             width?: number | null,
>             offset?: number | null
>           } | null,
>           explicitBuckets?: {
>             bounds?: number[] | null
>           } | null
>         } | null,
>         count?: string | number | null,
>         range?: {
>           min?: number | null,
>           max?: number | null
>         } | null
>       } | null,
>       stringValue?: string | null
>     }[] | null
>   }[] | null,
>   labelValues?: {
>     int64Value?: string | number | null,
>     stringValue?: string | null,
>     boolValue?: boolean | null
>   }[] | null
> }[] | null
> ```

***

### uptimeCheckConfigs.create

`monitoring.uptimeCheckConfigs.create`

Creates a new Uptime check configuration

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.uptimeCheckConfigs.create({
	parent: 'projects/demo-project',
	displayName: 'Homepage',
	monitoredResource: {
		type: 'uptime_url',
		labels: { project_id: 'demo-project', host: 'example.com' },
	},
	httpCheck: { path: '/', port: 443, useSsl: true },
	period: '60s',
	timeout: '10s',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) in which to create the Uptime check. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `checkerType` | `CHECKER_TYPE_UNSPECIFIED \| STATIC_IP_CHECKERS \| VPC_CHECKERS` | No | The type of checkers to use to execute the Uptime check. |
| `contentMatchers` | `object[]` | No | The content that is expected to appear in the data returned by the target server against which the check is run. Currently, only the first entry in the content\_matchers list is supported, and additional entries will be ignored. This field is optional and should only be specified if a content match is required as part of the/ Uptime check. |
| `syntheticMonitor` | `object` | No | Describes a Synthetic Monitor to be invoked by Uptime. |
| `httpCheck` | `object` | No | Information involved in an HTTP/HTTPS Uptime check request. |
| `selectedRegions` | `(REGION_UNSPECIFIED \| USA \| EUROPE \| SOUTH_AMERICA \| ASIA_PACIFIC \| USA_OREGON \| USA_IOWA \| USA_VIRGINIA)[]` | No | The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions must be provided to include a minimum of 3 locations. Not specifying this field will result in Uptime checks running from all available regions. |
| `tcpCheck` | `object` | No | Information required for a TCP Uptime check request. |
| `name` | `string` | No | Identifier. A unique resource name for this Uptime check configuration. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/uptimeCheckConfigs/\[UPTIME\_CHECK\_ID] \[PROJECT\_ID\_OR\_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response. |
| `resourceGroup` | `object` | No | The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored. |
| `period` | `string` | No | How often, in seconds, the Uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 60s. |
| `displayName` | `string` | No | A human-friendly name for the Uptime check configuration. The display name should be unique within a Cloud Monitoring Workspace in order to make it easier to identify; however, uniqueness is not enforced. Required. |
| `isInternal` | `boolean` | No | If this is true, then checks are made only from the 'internal\_checkers'. If it is false, then checks are made only from the 'selected\_regions'. It is an error to provide 'selected\_regions' when is\_internal is true, or to provide 'internal\_checkers' when is\_internal is false. |
| `logCheckFailures` | `boolean` | No | To specify whether to log the results of failed probes to Cloud Logging. |
| `internalCheckers` | `object[]` | No | The internal checkers that this check will egress from. If is\_internal is true and this list is empty, the check will egress from all the InternalCheckers configured for the project that owns this UptimeCheckConfig. |
| `timeout` | `string` | No | The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Required. |
| `disabled` | `boolean` | No | Whether the check is disabled or not. |
| `monitoredResource` | `object` | No | An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. |
| `userLabels` | `Record<string, string>` | No | User-supplied key/value data to be used for organizing and identifying the UptimeCheckConfig objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |

> [accordion] contentMatchers full type
>
> ```ts theme={null}
> {
>   content?: string,
>   jsonPathMatcher?: {
>     jsonPath?: string,
>     jsonMatcher?: JSON_PATH_MATCHER_OPTION_UNSPECIFIED | EXACT_MATCH | REGEX_MATCH
>   },
>   matcher?: CONTENT_MATCHER_OPTION_UNSPECIFIED | CONTAINS_STRING | NOT_CONTAINS_STRING | MATCHES_REGEX | NOT_MATCHES_REGEX | MATCHES_JSON_PATH | NOT_MATCHES_JSON_PATH
> }[]
> ```

> [accordion] syntheticMonitor full type
>
> ```ts theme={null}
> {
>   cloudFunctionV2?: {
>     name?: string
>   }
> }
> ```

> [accordion] httpCheck full type
>
> ```ts theme={null}
> {
>   useSsl?: boolean,
>   customContentType?: string,
>   body?: string,
>   port?: number,
>   validateSsl?: boolean,
>   requestMethod?: METHOD_UNSPECIFIED | GET | POST,
>   maskHeaders?: boolean,
>   authInfo?: {
>     password?: string,
>     username?: string
>   },
>   contentType?: TYPE_UNSPECIFIED | URL_ENCODED | USER_PROVIDED,
>   acceptedResponseStatusCodes?: {
>     statusValue?: number,
>     statusClass?: STATUS_CLASS_UNSPECIFIED | STATUS_CLASS_1XX | STATUS_CLASS_2XX | STATUS_CLASS_3XX | STATUS_CLASS_4XX | STATUS_CLASS_5XX | STATUS_CLASS_ANY
>   }[],
>   serviceAgentAuthentication?: {
>     type?: SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED | OIDC_TOKEN
>   },
>   pingConfig?: {
>     pingsCount?: number
>   },
>   headers?: Record<string, string>,
>   path?: string
> }
> ```

> [accordion] tcpCheck full type
>
> ```ts theme={null}
> {
>   pingConfig?: {
>     pingsCount?: number
>   },
>   port?: number
> }
> ```

> [accordion] resourceGroup full type
>
> ```ts theme={null}
> {
>   groupId?: string,
>   resourceType?: RESOURCE_TYPE_UNSPECIFIED | INSTANCE | AWS_ELB_LOAD_BALANCER
> }
> ```

> [accordion] internalCheckers full type
>
> ```ts theme={null}
> {
>   network?: string,
>   peerProjectId?: string,
>   name?: string,
>   state?: UNSPECIFIED | CREATING | RUNNING,
>   gcpZone?: string,
>   displayName?: string
> }[]
> ```

> [accordion] monitoredResource full type
>
> ```ts theme={null}
> {
>   type?: string,
>   labels?: Record<string, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkerType` | `string \| null` | No | The type of checkers to use to execute the Uptime check. |
| `contentMatchers` | `object[] \| null` | No | The content that is expected to appear in the data returned by the target server against which the check is run. Currently, only the first entry in the content\_matchers list is supported, and additional entries will be ignored. This field is optional and should only be specified if a content match is required as part of the/ Uptime check. |
| `syntheticMonitor` | `object \| null` | No | Describes a Synthetic Monitor to be invoked by Uptime. |
| `httpCheck` | `object \| null` | No | Information involved in an HTTP/HTTPS Uptime check request. |
| `selectedRegions` | `string[] \| null` | No | The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions must be provided to include a minimum of 3 locations. Not specifying this field will result in Uptime checks running from all available regions. |
| `tcpCheck` | `object \| null` | No | Information required for a TCP Uptime check request. |
| `name` | `string \| null` | No | Identifier. A unique resource name for this Uptime check configuration. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/uptimeCheckConfigs/\[UPTIME\_CHECK\_ID] \[PROJECT\_ID\_OR\_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response. |
| `resourceGroup` | `object \| null` | No | The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored. |
| `period` | `string \| null` | No | How often, in seconds, the Uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 60s. |
| `displayName` | `string \| null` | No | A human-friendly name for the Uptime check configuration. The display name should be unique within a Cloud Monitoring Workspace in order to make it easier to identify; however, uniqueness is not enforced. Required. |
| `isInternal` | `boolean \| null` | No | If this is true, then checks are made only from the 'internal\_checkers'. If it is false, then checks are made only from the 'selected\_regions'. It is an error to provide 'selected\_regions' when is\_internal is true, or to provide 'internal\_checkers' when is\_internal is false. |
| `logCheckFailures` | `boolean \| null` | No | To specify whether to log the results of failed probes to Cloud Logging. |
| `internalCheckers` | `object[] \| null` | No | The internal checkers that this check will egress from. If is\_internal is true and this list is empty, the check will egress from all the InternalCheckers configured for the project that owns this UptimeCheckConfig. |
| `timeout` | `string \| null` | No | The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Required. |
| `disabled` | `boolean \| null` | No | Whether the check is disabled or not. |
| `monitoredResource` | `object \| null` | No | An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data to be used for organizing and identifying the UptimeCheckConfig objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |

> [accordion] contentMatchers full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   jsonPathMatcher?: {
>     jsonPath?: string | null,
>     jsonMatcher?: string | null
>   } | null,
>   matcher?: string | null
> }[] | null
> ```

> [accordion] syntheticMonitor full type
>
> ```ts theme={null}
> {
>   cloudFunctionV2?: {
>     cloudRunRevision?: {
>       type?: string | null,
>       labels?: Record<string, string> | null
>     } | null,
>     name?: string | null
>   } | null
> } | null
> ```

> [accordion] httpCheck full type
>
> ```ts theme={null}
> {
>   useSsl?: boolean | null,
>   customContentType?: string | null,
>   body?: string | null,
>   port?: number | null,
>   validateSsl?: boolean | null,
>   requestMethod?: string | null,
>   maskHeaders?: boolean | null,
>   authInfo?: {
>     password?: string | null,
>     username?: string | null
>   } | null,
>   contentType?: string | null,
>   acceptedResponseStatusCodes?: {
>     statusValue?: number | null,
>     statusClass?: string | null
>   }[] | null,
>   serviceAgentAuthentication?: {
>     type?: string | null
>   } | null,
>   pingConfig?: {
>     pingsCount?: number | null
>   } | null,
>   headers?: Record<string, string> | null,
>   path?: string | null
> } | null
> ```

> [accordion] tcpCheck full type
>
> ```ts theme={null}
> {
>   pingConfig?: {
>     pingsCount?: number | null
>   } | null,
>   port?: number | null
> } | null
> ```

> [accordion] resourceGroup full type
>
> ```ts theme={null}
> {
>   groupId?: string | null,
>   resourceType?: string | null
> } | null
> ```

> [accordion] internalCheckers full type
>
> ```ts theme={null}
> {
>   network?: string | null,
>   peerProjectId?: string | null,
>   name?: string | null,
>   state?: string | null,
>   gcpZone?: string | null,
>   displayName?: string | null
> }[] | null
> ```

> [accordion] monitoredResource full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   labels?: Record<string, string> | null
> } | null
> ```

***

### uptimeCheckConfigs.delete

`monitoring.uptimeCheckConfigs.delete`

Deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.monitoring.uptimeCheckConfigs.delete({ name: 'projects/demo-project/uptimeCheckConfigs/homepage' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The Uptime check configuration to delete. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/uptimeCheckConfigs/\[UPTIME\_CHECK\_ID] Format: `projects/<id>/uptimeCheckConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### uptimeCheckConfigs.get

`monitoring.uptimeCheckConfigs.get`

Gets a single Uptime check configuration

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.uptimeCheckConfigs.get({ name: 'projects/demo-project/uptimeCheckConfigs/homepage' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The Uptime check configuration to retrieve. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/uptimeCheckConfigs/\[UPTIME\_CHECK\_ID] Format: `projects/<id>/uptimeCheckConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkerType` | `string \| null` | No | The type of checkers to use to execute the Uptime check. |
| `contentMatchers` | `object[] \| null` | No | The content that is expected to appear in the data returned by the target server against which the check is run. Currently, only the first entry in the content\_matchers list is supported, and additional entries will be ignored. This field is optional and should only be specified if a content match is required as part of the/ Uptime check. |
| `syntheticMonitor` | `object \| null` | No | Describes a Synthetic Monitor to be invoked by Uptime. |
| `httpCheck` | `object \| null` | No | Information involved in an HTTP/HTTPS Uptime check request. |
| `selectedRegions` | `string[] \| null` | No | The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions must be provided to include a minimum of 3 locations. Not specifying this field will result in Uptime checks running from all available regions. |
| `tcpCheck` | `object \| null` | No | Information required for a TCP Uptime check request. |
| `name` | `string \| null` | No | Identifier. A unique resource name for this Uptime check configuration. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/uptimeCheckConfigs/\[UPTIME\_CHECK\_ID] \[PROJECT\_ID\_OR\_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response. |
| `resourceGroup` | `object \| null` | No | The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored. |
| `period` | `string \| null` | No | How often, in seconds, the Uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 60s. |
| `displayName` | `string \| null` | No | A human-friendly name for the Uptime check configuration. The display name should be unique within a Cloud Monitoring Workspace in order to make it easier to identify; however, uniqueness is not enforced. Required. |
| `isInternal` | `boolean \| null` | No | If this is true, then checks are made only from the 'internal\_checkers'. If it is false, then checks are made only from the 'selected\_regions'. It is an error to provide 'selected\_regions' when is\_internal is true, or to provide 'internal\_checkers' when is\_internal is false. |
| `logCheckFailures` | `boolean \| null` | No | To specify whether to log the results of failed probes to Cloud Logging. |
| `internalCheckers` | `object[] \| null` | No | The internal checkers that this check will egress from. If is\_internal is true and this list is empty, the check will egress from all the InternalCheckers configured for the project that owns this UptimeCheckConfig. |
| `timeout` | `string \| null` | No | The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Required. |
| `disabled` | `boolean \| null` | No | Whether the check is disabled or not. |
| `monitoredResource` | `object \| null` | No | An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data to be used for organizing and identifying the UptimeCheckConfig objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |

> [accordion] contentMatchers full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   jsonPathMatcher?: {
>     jsonPath?: string | null,
>     jsonMatcher?: string | null
>   } | null,
>   matcher?: string | null
> }[] | null
> ```

> [accordion] syntheticMonitor full type
>
> ```ts theme={null}
> {
>   cloudFunctionV2?: {
>     cloudRunRevision?: {
>       type?: string | null,
>       labels?: Record<string, string> | null
>     } | null,
>     name?: string | null
>   } | null
> } | null
> ```

> [accordion] httpCheck full type
>
> ```ts theme={null}
> {
>   useSsl?: boolean | null,
>   customContentType?: string | null,
>   body?: string | null,
>   port?: number | null,
>   validateSsl?: boolean | null,
>   requestMethod?: string | null,
>   maskHeaders?: boolean | null,
>   authInfo?: {
>     password?: string | null,
>     username?: string | null
>   } | null,
>   contentType?: string | null,
>   acceptedResponseStatusCodes?: {
>     statusValue?: number | null,
>     statusClass?: string | null
>   }[] | null,
>   serviceAgentAuthentication?: {
>     type?: string | null
>   } | null,
>   pingConfig?: {
>     pingsCount?: number | null
>   } | null,
>   headers?: Record<string, string> | null,
>   path?: string | null
> } | null
> ```

> [accordion] tcpCheck full type
>
> ```ts theme={null}
> {
>   pingConfig?: {
>     pingsCount?: number | null
>   } | null,
>   port?: number | null
> } | null
> ```

> [accordion] resourceGroup full type
>
> ```ts theme={null}
> {
>   groupId?: string | null,
>   resourceType?: string | null
> } | null
> ```

> [accordion] internalCheckers full type
>
> ```ts theme={null}
> {
>   network?: string | null,
>   peerProjectId?: string | null,
>   name?: string | null,
>   state?: string | null,
>   gcpZone?: string | null,
>   displayName?: string | null
> }[] | null
> ```

> [accordion] monitoredResource full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   labels?: Record<string, string> | null
> } | null
> ```

***

### uptimeCheckConfigs.list

`monitoring.uptimeCheckConfigs.list`

Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations) (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.uptimeCheckConfigs.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project ([https://cloud.google.com/monitoring/api/v3#project\_name](https://cloud.google.com/monitoring/api/v3#project_name)) whose Uptime check configurations are listed. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER] Format: `projects/<id>`. |
| `filter` | `string` | No | If provided, this field specifies the criteria that must be met by uptime checks to be included in the response.For more details, see Filtering syntax ([https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter\_syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax)). |
| `pageSize` | `number` | No | The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page\_size is \<=0, the server will decide the number of results to be returned. |
| `pageToken` | `string` | No | If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uptimeCheckConfigs` | `object[] \| null` | No | The returned Uptime check configurations. |
| `totalSize` | `number \| null` | No | The total number of Uptime check configurations for the project, irrespective of any pagination. |
| `nextPageToken` | `string \| null` | No | This field represents the pagination token to retrieve the next page of results. If the value is empty, it means no further results for the request. To retrieve the next page of results, the value of the next\_page\_token is passed to the subsequent List method call (in the request message's page\_token field). |

> [accordion] uptimeCheckConfigs full type
>
> ```ts theme={null}
> {
>   checkerType?: string | null,
>   contentMatchers?: {
>     content?: string | null,
>     jsonPathMatcher?: {
>       jsonPath?: string | null,
>       jsonMatcher?: string | null
>     } | null,
>     matcher?: string | null
>   }[] | null,
>   syntheticMonitor?: {
>     cloudFunctionV2?: {
>       cloudRunRevision?: {
>         type?: string | null,
>         labels?: Record<string, string> | null
>       } | null,
>       name?: string | null
>     } | null
>   } | null,
>   httpCheck?: {
>     useSsl?: boolean | null,
>     customContentType?: string | null,
>     body?: string | null,
>     port?: number | null,
>     validateSsl?: boolean | null,
>     requestMethod?: string | null,
>     maskHeaders?: boolean | null,
>     authInfo?: {
>       password?: string | null,
>       username?: string | null
>     } | null,
>     contentType?: string | null,
>     acceptedResponseStatusCodes?: {
>       statusValue?: number | null,
>       statusClass?: string | null
>     }[] | null,
>     serviceAgentAuthentication?: {
>       type?: string | null
>     } | null,
>     pingConfig?: {
>       pingsCount?: number | null
>     } | null,
>     headers?: Record<string, string> | null,
>     path?: string | null
>   } | null,
>   selectedRegions?: string[] | null,
>   tcpCheck?: {
>     pingConfig?: {
>       pingsCount?: number | null
>     } | null,
>     port?: number | null
>   } | null,
>   name?: string | null,
>   resourceGroup?: {
>     groupId?: string | null,
>     resourceType?: string | null
>   } | null,
>   period?: string | null,
>   displayName?: string | null,
>   isInternal?: boolean | null,
>   logCheckFailures?: boolean | null,
>   internalCheckers?: {
>     network?: string | null,
>     peerProjectId?: string | null,
>     name?: string | null,
>     state?: string | null,
>     gcpZone?: string | null,
>     displayName?: string | null
>   }[] | null,
>   timeout?: string | null,
>   disabled?: boolean | null,
>   monitoredResource?: {
>     type?: string | null,
>     labels?: Record<string, string> | null
>   } | null,
>   userLabels?: Record<string, string> | null
> }[] | null
> ```

***

### uptimeCheckConfigs.patch

`monitoring.uptimeCheckConfigs.patch`

Updates an Uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via updateMask

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.monitoring.uptimeCheckConfigs.patch({ name: 'projects/demo-project/uptimeCheckConfigs/homepage', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. If present, only the listed fields in the current Uptime check configuration are updated with values from the new configuration. If this field is empty, then the current configuration is completely replaced with the new configuration. |
| `name` | `string` | Yes | Identifier. A unique resource name for this Uptime check configuration. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/uptimeCheckConfigs/\[UPTIME\_CHECK\_ID] \[PROJECT\_ID\_OR\_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response. Format: `projects/<id>/uptimeCheckConfigs/<id>`. |
| `checkerType` | `CHECKER_TYPE_UNSPECIFIED \| STATIC_IP_CHECKERS \| VPC_CHECKERS` | No | The type of checkers to use to execute the Uptime check. |
| `contentMatchers` | `object[]` | No | The content that is expected to appear in the data returned by the target server against which the check is run. Currently, only the first entry in the content\_matchers list is supported, and additional entries will be ignored. This field is optional and should only be specified if a content match is required as part of the/ Uptime check. |
| `syntheticMonitor` | `object` | No | Describes a Synthetic Monitor to be invoked by Uptime. |
| `httpCheck` | `object` | No | Information involved in an HTTP/HTTPS Uptime check request. |
| `selectedRegions` | `(REGION_UNSPECIFIED \| USA \| EUROPE \| SOUTH_AMERICA \| ASIA_PACIFIC \| USA_OREGON \| USA_IOWA \| USA_VIRGINIA)[]` | No | The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions must be provided to include a minimum of 3 locations. Not specifying this field will result in Uptime checks running from all available regions. |
| `tcpCheck` | `object` | No | Information required for a TCP Uptime check request. |
| `body_name` | `string` | No | Identifier. A unique resource name for this Uptime check configuration. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/uptimeCheckConfigs/\[UPTIME\_CHECK\_ID] \[PROJECT\_ID\_OR\_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response. |
| `resourceGroup` | `object` | No | The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored. |
| `period` | `string` | No | How often, in seconds, the Uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 60s. |
| `displayName` | `string` | No | A human-friendly name for the Uptime check configuration. The display name should be unique within a Cloud Monitoring Workspace in order to make it easier to identify; however, uniqueness is not enforced. Required. |
| `isInternal` | `boolean` | No | If this is true, then checks are made only from the 'internal\_checkers'. If it is false, then checks are made only from the 'selected\_regions'. It is an error to provide 'selected\_regions' when is\_internal is true, or to provide 'internal\_checkers' when is\_internal is false. |
| `logCheckFailures` | `boolean` | No | To specify whether to log the results of failed probes to Cloud Logging. |
| `internalCheckers` | `object[]` | No | The internal checkers that this check will egress from. If is\_internal is true and this list is empty, the check will egress from all the InternalCheckers configured for the project that owns this UptimeCheckConfig. |
| `timeout` | `string` | No | The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Required. |
| `disabled` | `boolean` | No | Whether the check is disabled or not. |
| `monitoredResource` | `object` | No | An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. |
| `userLabels` | `Record<string, string>` | No | User-supplied key/value data to be used for organizing and identifying the UptimeCheckConfig objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |

> [accordion] contentMatchers full type
>
> ```ts theme={null}
> {
>   content?: string,
>   jsonPathMatcher?: {
>     jsonPath?: string,
>     jsonMatcher?: JSON_PATH_MATCHER_OPTION_UNSPECIFIED | EXACT_MATCH | REGEX_MATCH
>   },
>   matcher?: CONTENT_MATCHER_OPTION_UNSPECIFIED | CONTAINS_STRING | NOT_CONTAINS_STRING | MATCHES_REGEX | NOT_MATCHES_REGEX | MATCHES_JSON_PATH | NOT_MATCHES_JSON_PATH
> }[]
> ```

> [accordion] syntheticMonitor full type
>
> ```ts theme={null}
> {
>   cloudFunctionV2?: {
>     name?: string
>   }
> }
> ```

> [accordion] httpCheck full type
>
> ```ts theme={null}
> {
>   useSsl?: boolean,
>   customContentType?: string,
>   body?: string,
>   port?: number,
>   validateSsl?: boolean,
>   requestMethod?: METHOD_UNSPECIFIED | GET | POST,
>   maskHeaders?: boolean,
>   authInfo?: {
>     password?: string,
>     username?: string
>   },
>   contentType?: TYPE_UNSPECIFIED | URL_ENCODED | USER_PROVIDED,
>   acceptedResponseStatusCodes?: {
>     statusValue?: number,
>     statusClass?: STATUS_CLASS_UNSPECIFIED | STATUS_CLASS_1XX | STATUS_CLASS_2XX | STATUS_CLASS_3XX | STATUS_CLASS_4XX | STATUS_CLASS_5XX | STATUS_CLASS_ANY
>   }[],
>   serviceAgentAuthentication?: {
>     type?: SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED | OIDC_TOKEN
>   },
>   pingConfig?: {
>     pingsCount?: number
>   },
>   headers?: Record<string, string>,
>   path?: string
> }
> ```

> [accordion] tcpCheck full type
>
> ```ts theme={null}
> {
>   pingConfig?: {
>     pingsCount?: number
>   },
>   port?: number
> }
> ```

> [accordion] resourceGroup full type
>
> ```ts theme={null}
> {
>   groupId?: string,
>   resourceType?: RESOURCE_TYPE_UNSPECIFIED | INSTANCE | AWS_ELB_LOAD_BALANCER
> }
> ```

> [accordion] internalCheckers full type
>
> ```ts theme={null}
> {
>   network?: string,
>   peerProjectId?: string,
>   name?: string,
>   state?: UNSPECIFIED | CREATING | RUNNING,
>   gcpZone?: string,
>   displayName?: string
> }[]
> ```

> [accordion] monitoredResource full type
>
> ```ts theme={null}
> {
>   type?: string,
>   labels?: Record<string, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkerType` | `string \| null` | No | The type of checkers to use to execute the Uptime check. |
| `contentMatchers` | `object[] \| null` | No | The content that is expected to appear in the data returned by the target server against which the check is run. Currently, only the first entry in the content\_matchers list is supported, and additional entries will be ignored. This field is optional and should only be specified if a content match is required as part of the/ Uptime check. |
| `syntheticMonitor` | `object \| null` | No | Describes a Synthetic Monitor to be invoked by Uptime. |
| `httpCheck` | `object \| null` | No | Information involved in an HTTP/HTTPS Uptime check request. |
| `selectedRegions` | `string[] \| null` | No | The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions must be provided to include a minimum of 3 locations. Not specifying this field will result in Uptime checks running from all available regions. |
| `tcpCheck` | `object \| null` | No | Information required for a TCP Uptime check request. |
| `name` | `string \| null` | No | Identifier. A unique resource name for this Uptime check configuration. The format is: projects/\[PROJECT\_ID\_OR\_NUMBER]/uptimeCheckConfigs/\[UPTIME\_CHECK\_ID] \[PROJECT\_ID\_OR\_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response. |
| `resourceGroup` | `object \| null` | No | The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored. |
| `period` | `string \| null` | No | How often, in seconds, the Uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 60s. |
| `displayName` | `string \| null` | No | A human-friendly name for the Uptime check configuration. The display name should be unique within a Cloud Monitoring Workspace in order to make it easier to identify; however, uniqueness is not enforced. Required. |
| `isInternal` | `boolean \| null` | No | If this is true, then checks are made only from the 'internal\_checkers'. If it is false, then checks are made only from the 'selected\_regions'. It is an error to provide 'selected\_regions' when is\_internal is true, or to provide 'internal\_checkers' when is\_internal is false. |
| `logCheckFailures` | `boolean \| null` | No | To specify whether to log the results of failed probes to Cloud Logging. |
| `internalCheckers` | `object[] \| null` | No | The internal checkers that this check will egress from. If is\_internal is true and this list is empty, the check will egress from all the InternalCheckers configured for the project that owns this UptimeCheckConfig. |
| `timeout` | `string \| null` | No | The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Required. |
| `disabled` | `boolean \| null` | No | Whether the check is disabled or not. |
| `monitoredResource` | `object \| null` | No | An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. |
| `userLabels` | `Record<string, string> \| null` | No | User-supplied key/value data to be used for organizing and identifying the UptimeCheckConfig objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. |

> [accordion] contentMatchers full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   jsonPathMatcher?: {
>     jsonPath?: string | null,
>     jsonMatcher?: string | null
>   } | null,
>   matcher?: string | null
> }[] | null
> ```

> [accordion] syntheticMonitor full type
>
> ```ts theme={null}
> {
>   cloudFunctionV2?: {
>     cloudRunRevision?: {
>       type?: string | null,
>       labels?: Record<string, string> | null
>     } | null,
>     name?: string | null
>   } | null
> } | null
> ```

> [accordion] httpCheck full type
>
> ```ts theme={null}
> {
>   useSsl?: boolean | null,
>   customContentType?: string | null,
>   body?: string | null,
>   port?: number | null,
>   validateSsl?: boolean | null,
>   requestMethod?: string | null,
>   maskHeaders?: boolean | null,
>   authInfo?: {
>     password?: string | null,
>     username?: string | null
>   } | null,
>   contentType?: string | null,
>   acceptedResponseStatusCodes?: {
>     statusValue?: number | null,
>     statusClass?: string | null
>   }[] | null,
>   serviceAgentAuthentication?: {
>     type?: string | null
>   } | null,
>   pingConfig?: {
>     pingsCount?: number | null
>   } | null,
>   headers?: Record<string, string> | null,
>   path?: string | null
> } | null
> ```

> [accordion] tcpCheck full type
>
> ```ts theme={null}
> {
>   pingConfig?: {
>     pingsCount?: number | null
>   } | null,
>   port?: number | null
> } | null
> ```

> [accordion] resourceGroup full type
>
> ```ts theme={null}
> {
>   groupId?: string | null,
>   resourceType?: string | null
> } | null
> ```

> [accordion] internalCheckers full type
>
> ```ts theme={null}
> {
>   network?: string | null,
>   peerProjectId?: string | null,
>   name?: string | null,
>   state?: string | null,
>   gcpZone?: string | null,
>   displayName?: string | null
> }[] | null
> ```

> [accordion] monitoredResource full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   labels?: Record<string, string> | null
> } | null
> ```

***

### uptimeCheckIps.list

`monitoring.uptimeCheckIps.list`

Returns the list of IP addresses that checkers run from (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.monitoring.uptimeCheckIps.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page\_size is \<=0, the server will decide the number of results to be returned. NOTE: this field is not yet implemented |
| `pageToken` | `string` | No | If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call. NOTE: this field is not yet implemented |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uptimeCheckIps` | `object[] \| null` | No | The returned list of IP addresses (including region and location) that the checkers run from. |
| `nextPageToken` | `string \| null` | No | This field represents the pagination token to retrieve the next page of results. If the value is empty, it means no further results for the request. To retrieve the next page of results, the value of the next\_page\_token is passed to the subsequent List method call (in the request message's page\_token field). NOTE: this field is not yet implemented |

> [accordion] uptimeCheckIps full type
>
> ```ts theme={null}
> {
>   location?: string | null,
>   region?: string | null,
>   ipAddress?: string | null
> }[] | null
> ```

***

## Pubsub

### schemas.commit

`pubsub.schemas.commit`

Commits a new schema revision to an existing schema

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.commit({
	name: 'projects/demo-project/schemas/order',
	schema: { name: 'projects/demo-project/schemas/order', type: 'AVRO', definition: '{"type":"record","name":"Order","fields":[{"name":"id","type":"string"},{"name":"note","type":"string","default":""}]}' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the schema we are revising. Format is `projects/{project}/schemas/{schema}`. Format: `projects/<id>/schemas/<id>`. |
| `schema` | `object` | No | A schema resource. |

> [accordion] schema full type
>
> ```ts theme={null}
> {
>   type?: TYPE_UNSPECIFIED | PROTOCOL_BUFFER | AVRO,
>   compiledProtoSchema?: {
>     compiledBytes?: string,
>     rootMessage?: string
>   },
>   definition?: string,
>   name?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | The type of the schema definition. |
| `revisionCreateTime` | `string \| null` | No | Output only. The timestamp that the revision was created. |
| `compiledProtoSchema` | `object \| null` | No | Configuration specific to compiled Protocol Buffer schemas. |
| `definition` | `string \| null` | No | The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`. |
| `name` | `string \| null` | No | Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`. |
| `revisionId` | `string \| null` | No | Output only. Immutable. The revision ID of the schema. |

> [accordion] compiledProtoSchema full type
>
> ```ts theme={null}
> {
>   compiledBytes?: string | null,
>   rootMessage?: string | null
> } | null
> ```

***

### schemas.create

`pubsub.schemas.create`

Creates a schema

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.create({
	parent: 'projects/demo-project',
	schemaId: 'order',
	type: 'AVRO',
	definition: '{"type":"record","name":"Order","fields":[{"name":"id","type":"string"}]}',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `schemaId` | `string` | No | The ID to use for the schema, which will become the final component of the schema's resource name. See [https://cloud.google.com/pubsub/docs/pubsub-basics#resource\_names](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names) for resource name constraints. |
| `parent` | `string` | Yes | Required. The name of the project in which to create the schema. Format is `projects/{project-id}`. Format: `projects/<id>`. |
| `type` | `TYPE_UNSPECIFIED \| PROTOCOL_BUFFER \| AVRO` | No | The type of the schema definition. |
| `compiledProtoSchema` | `object` | No | Configuration specific to compiled Protocol Buffer schemas. |
| `definition` | `string` | No | The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`. |
| `name` | `string` | No | Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`. |

> [accordion] compiledProtoSchema full type
>
> ```ts theme={null}
> {
>   compiledBytes?: string,
>   rootMessage?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | The type of the schema definition. |
| `revisionCreateTime` | `string \| null` | No | Output only. The timestamp that the revision was created. |
| `compiledProtoSchema` | `object \| null` | No | Configuration specific to compiled Protocol Buffer schemas. |
| `definition` | `string \| null` | No | The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`. |
| `name` | `string \| null` | No | Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`. |
| `revisionId` | `string \| null` | No | Output only. Immutable. The revision ID of the schema. |

> [accordion] compiledProtoSchema full type
>
> ```ts theme={null}
> {
>   compiledBytes?: string | null,
>   rootMessage?: string | null
> } | null
> ```

***

### schemas.delete

`pubsub.schemas.delete`

Deletes a schema

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.delete({ name: 'projects/demo-project/schemas/order' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Name of the schema to delete. Format is `projects/{project}/schemas/{schema}`. Format: `projects/<id>/schemas/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### schemas.deleteRevision

`pubsub.schemas.deleteRevision`

Deletes a specific schema revision

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.deleteRevision({ name: 'projects/demo-project/schemas/order' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `revisionId` | `string` | No | Optional. This field is deprecated and should not be used for specifying the revision ID. The revision ID should be specified via the `name` parameter. |
| `name` | `string` | Yes | Required. The name of the schema revision to be deleted, with a revision ID explicitly included. Example: `projects/123/schemas/my-schema@c7cfa2a8` Format: `projects/<id>/schemas/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | The type of the schema definition. |
| `revisionCreateTime` | `string \| null` | No | Output only. The timestamp that the revision was created. |
| `compiledProtoSchema` | `object \| null` | No | Configuration specific to compiled Protocol Buffer schemas. |
| `definition` | `string \| null` | No | The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`. |
| `name` | `string \| null` | No | Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`. |
| `revisionId` | `string \| null` | No | Output only. Immutable. The revision ID of the schema. |

> [accordion] compiledProtoSchema full type
>
> ```ts theme={null}
> {
>   compiledBytes?: string | null,
>   rootMessage?: string | null
> } | null
> ```

***

### schemas.get

`pubsub.schemas.get`

Gets a schema

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.get({ name: 'projects/demo-project/schemas/order' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the schema to get. Format is `projects/{project}/schemas/{schema}`. Format: `projects/<id>/schemas/<id>`. |
| `view` | `SCHEMA_VIEW_UNSPECIFIED \| BASIC \| FULL` | No | The set of fields to return in the response. If not set, returns a Schema with all fields filled out. Set to `BASIC` to omit the `definition`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | The type of the schema definition. |
| `revisionCreateTime` | `string \| null` | No | Output only. The timestamp that the revision was created. |
| `compiledProtoSchema` | `object \| null` | No | Configuration specific to compiled Protocol Buffer schemas. |
| `definition` | `string \| null` | No | The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`. |
| `name` | `string \| null` | No | Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`. |
| `revisionId` | `string \| null` | No | Output only. Immutable. The revision ID of the schema. |

> [accordion] compiledProtoSchema full type
>
> ```ts theme={null}
> {
>   compiledBytes?: string | null,
>   rootMessage?: string | null
> } | null
> ```

***

### schemas.getIamPolicy

`pubsub.schemas.getIamPolicy`

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.getIamPolicy({ resource: 'projects/demo-project/schemas/order' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/schemas/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null,
>     location?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### schemas.list

`pubsub.schemas.list`

Lists schemas in a project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Maximum number of schemas to return. |
| `parent` | `string` | Yes | Required. The name of the project in which to list schemas. Format is `projects/{project-id}`. Format: `projects/<id>`. |
| `pageToken` | `string` | No | The value returned by the last `ListSchemasResponse`; indicates that this is a continuation of a prior `ListSchemas` call, and that the system should return the next page of data. |
| `view` | `SCHEMA_VIEW_UNSPECIFIED \| BASIC \| FULL` | No | The set of Schema fields to return in the response. If not set, returns Schemas with `name` and `type`, but not `definition`. Set to `FULL` to retrieve all fields. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `schemas` | `object[] \| null` | No | The resulting schemas. |
| `nextPageToken` | `string \| null` | No | If not empty, indicates that there may be more schemas that match the request; this value should be passed in a new `ListSchemasRequest`. |

> [accordion] schemas full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   revisionCreateTime?: string | null,
>   compiledProtoSchema?: {
>     compiledBytes?: string | null,
>     rootMessage?: string | null
>   } | null,
>   definition?: string | null,
>   name?: string | null,
>   revisionId?: string | null
> }[] | null
> ```

***

### schemas.listRevisions

`pubsub.schemas.listRevisions`

Lists all schema revisions for the named schema (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.listRevisions({ name: 'projects/demo-project/schemas/order' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | The page token, received from a previous ListSchemaRevisions call. Provide this to retrieve the subsequent page. |
| `name` | `string` | Yes | Required. The name of the schema to list revisions for. Format: `projects/<id>/schemas/<id>`. |
| `view` | `SCHEMA_VIEW_UNSPECIFIED \| BASIC \| FULL` | No | The set of Schema fields to return in the response. If not set, returns Schemas with `name` and `type`, but not `definition`. Set to `FULL` to retrieve all fields. |
| `pageSize` | `number` | No | The maximum number of revisions to return per page. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `schemas` | `object[] \| null` | No | The revisions of the schema. |
| `nextPageToken` | `string \| null` | No | A token that can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages. |

> [accordion] schemas full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   revisionCreateTime?: string | null,
>   compiledProtoSchema?: {
>     compiledBytes?: string | null,
>     rootMessage?: string | null
>   } | null,
>   definition?: string | null,
>   name?: string | null,
>   revisionId?: string | null
> }[] | null
> ```

***

### schemas.rollback

`pubsub.schemas.rollback`

Creates a new schema revision that is a copy of the provided revision\_id

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.rollback({ name: 'projects/demo-project/schemas/order', revisionId: 'c7cfa2a8' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The schema being rolled back with revision id. Format: `projects/<id>/schemas/<id>`. |
| `revisionId` | `string` | No | Required. The revision ID to roll back to. It must be a revision of the same schema. Example: c7cfa2a8 |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | The type of the schema definition. |
| `revisionCreateTime` | `string \| null` | No | Output only. The timestamp that the revision was created. |
| `compiledProtoSchema` | `object \| null` | No | Configuration specific to compiled Protocol Buffer schemas. |
| `definition` | `string \| null` | No | The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`. |
| `name` | `string \| null` | No | Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`. |
| `revisionId` | `string \| null` | No | Output only. Immutable. The revision ID of the schema. |

> [accordion] compiledProtoSchema full type
>
> ```ts theme={null}
> {
>   compiledBytes?: string | null,
>   rootMessage?: string | null
> } | null
> ```

***

### schemas.setIamPolicy

`pubsub.schemas.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.setIamPolicy({
	resource: 'projects/demo-project/schemas/order',
	policy: {
		bindings: [{
			role: 'roles/pubsub.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/schemas/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   bindings?: {
>     condition?: {
>       expression?: string,
>       description?: string,
>       title?: string,
>       location?: string
>     },
>     members?: string[],
>     role?: string
>   }[],
>   etag?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null,
>     location?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### schemas.testIamPermissions

`pubsub.schemas.testIamPermissions`

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.testIamPermissions({
	resource: 'projects/demo-project/schemas/order',
	permissions: ['pubsub.schemas.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/schemas/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### schemas.validate

`pubsub.schemas.validate`

Validates a schema

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.validate({
	parent: 'projects/demo-project',
	schema: { type: 'AVRO', definition: '{"type":"record","name":"Order","fields":[{"name":"id","type":"string"}]}' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the project in which to validate schemas. Format is `projects/{project-id}`. Format: `projects/<id>`. |
| `schema` | `object` | No | A schema resource. |

> [accordion] schema full type
>
> ```ts theme={null}
> {
>   type?: TYPE_UNSPECIFIED | PROTOCOL_BUFFER | AVRO,
>   compiledProtoSchema?: {
>     compiledBytes?: string,
>     rootMessage?: string
>   },
>   definition?: string,
>   name?: string
> }
> ```

**Output:** *empty object*

***

### schemas.validateMessage

`pubsub.schemas.validateMessage`

Validates a message against a schema

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.schemas.validateMessage({
	parent: 'projects/demo-project',
	name: 'projects/demo-project/schemas/order',
	encoding: 'JSON',
	message: 'eyJpZCI6IjQyIn0=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the project in which to validate schemas. Format is `projects/{project-id}`. Format: `projects/<id>`. |
| `name` | `string` | No | Name of the schema against which to validate. Format is `projects/{project}/schemas/{schema}`. |
| `schema` | `object` | No | A schema resource. |
| `encoding` | `ENCODING_UNSPECIFIED \| JSON \| BINARY` | No | The encoding expected for messages |
| `message` | `string` | No | Message to validate against the provided `schema_spec`. (base64) |

> [accordion] schema full type
>
> ```ts theme={null}
> {
>   type?: TYPE_UNSPECIFIED | PROTOCOL_BUFFER | AVRO,
>   compiledProtoSchema?: {
>     compiledBytes?: string,
>     rootMessage?: string
>   },
>   definition?: string,
>   name?: string
> }
> ```

**Output:** *empty object*

***

### snapshots.create

`pubsub.snapshots.create`

Creates a snapshot from the requested subscription. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.snapshots.create({ name: 'projects/demo-project/snapshots/orders-snap', subscription: 'projects/demo-project/subscriptions/orders-worker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. User-provided name for this snapshot. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription. Note that for REST API requests, you must specify a name. See the [resource name rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). Format is `projects/{project}/snapshots/{snap}`. Format: `projects/<id>/snapshots/<id>`. |
| `labels` | `Record<string, string>` | No | Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels). |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https\://\{\$universe.dns\_names.final\_documentation\_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. |
| `subscription` | `string` | No | Required. The subscription whose backlog the snapshot retains. Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the subscription. More precisely, this is defined as the messages in the subscription's backlog that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as well as: (b) Any messages published to the subscription's topic following the successful completion of the CreateSnapshot request. Format is `projects/{project}/subscriptions/{sub}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expireTime` | `string \| null` | No | Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is `7 days - (age of oldest unacked message in the subscription)`. For example, consider a subscription whose oldest unacked message is 3 days old. |
| `name` | `string \| null` | No | Optional. The name of the snapshot. |
| `topic` | `string \| null` | No | Optional. The name of the topic from which this snapshot is retaining messages. |
| `labels` | `Record<string, string> \| null` | No | Optional. See Creating and managing labels. |

***

### snapshots.delete

`pubsub.snapshots.delete`

Removes an existing snapshot. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.pubsub.snapshots.delete({ snapshot: 'projects/demo-project/snapshots/orders-snap' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `snapshot` | `string` | Yes | Required. The name of the snapshot to delete. Format is `projects/{project}/snapshots/{snap}`. Format: `projects/<id>/snapshots/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### snapshots.get

`pubsub.snapshots.get`

Gets the configuration details of a snapshot. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.snapshots.get({ snapshot: 'projects/demo-project/snapshots/orders-snap' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `snapshot` | `string` | Yes | Required. The name of the snapshot to get. Format is `projects/{project}/snapshots/{snap}`. Format: `projects/<id>/snapshots/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expireTime` | `string \| null` | No | Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is `7 days - (age of oldest unacked message in the subscription)`. For example, consider a subscription whose oldest unacked message is 3 days old. |
| `name` | `string \| null` | No | Optional. The name of the snapshot. |
| `topic` | `string \| null` | No | Optional. The name of the topic from which this snapshot is retaining messages. |
| `labels` | `Record<string, string> \| null` | No | Optional. See Creating and managing labels. |

***

### snapshots.getIamPolicy

`pubsub.snapshots.getIamPolicy`

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.snapshots.getIamPolicy({ resource: 'projects/demo-project/snapshots/orders-snap' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/snapshots/<id>`. |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null,
>     location?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### snapshots.list

`pubsub.snapshots.list`

Lists the existing snapshots. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.snapshots.list({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. The name of the project in which to list snapshots. Format is `projects/{project-id}`. Format: `projects/<id>`. |
| `pageToken` | `string` | No | Optional. The value returned by the last `ListSnapshotsResponse`; indicates that this is a continuation of a prior `ListSnapshots` call, and that the system should return the next page of data. |
| `pageSize` | `number` | No | Optional. Maximum number of snapshots to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `snapshots` | `object[] \| null` | No | Optional. The resulting snapshots. |
| `nextPageToken` | `string \| null` | No | Optional. If not empty, indicates that there may be more snapshot that match the request; this value should be passed in a new `ListSnapshotsRequest`. |

> [accordion] snapshots full type
>
> ```ts theme={null}
> {
>   expireTime?: string | null,
>   name?: string | null,
>   topic?: string | null,
>   labels?: Record<string, string> | null
> }[] | null
> ```

***

### snapshots.patch

`pubsub.snapshots.patch`

Updates an existing snapshot by updating the fields specified in the update mask. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.snapshots.patch({
	name: 'projects/demo-project/snapshots/orders-snap',
	updateMask: 'labels',
	snapshot: {
		labels: { env: 'prod' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Optional. The name of the snapshot. Format: `projects/<id>/snapshots/<id>`. |
| `snapshot` | `object` | No | A snapshot resource. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. |
| `updateMask` | `string` | No | Required. Indicates which fields in the provided snapshot to update. Must be specified and non-empty. |

> [accordion] snapshot full type
>
> ```ts theme={null}
> {
>   expireTime?: string,
>   name?: string,
>   topic?: string,
>   labels?: Record<string, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expireTime` | `string \| null` | No | Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is `7 days - (age of oldest unacked message in the subscription)`. For example, consider a subscription whose oldest unacked message is 3 days old. |
| `name` | `string \| null` | No | Optional. The name of the snapshot. |
| `topic` | `string \| null` | No | Optional. The name of the topic from which this snapshot is retaining messages. |
| `labels` | `Record<string, string> \| null` | No | Optional. See Creating and managing labels. |

***

### snapshots.setIamPolicy

`pubsub.snapshots.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.pubsub.snapshots.setIamPolicy({
	resource: 'projects/demo-project/snapshots/orders-snap',
	policy: {
		bindings: [{
			role: 'roles/pubsub.subscriber',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/snapshots/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   bindings?: {
>     condition?: {
>       expression?: string,
>       description?: string,
>       title?: string,
>       location?: string
>     },
>     members?: string[],
>     role?: string
>   }[],
>   etag?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null,
>     location?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### snapshots.testIamPermissions

`pubsub.snapshots.testIamPermissions`

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.snapshots.testIamPermissions({
	resource: 'projects/demo-project/snapshots/orders-snap',
	permissions: ['pubsub.snapshots.seek'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/snapshots/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### subscriptions.acknowledge

`pubsub.subscriptions.acknowledge`

Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.acknowledge({
	subscription: 'projects/demo-project/subscriptions/orders-worker',
	ackIds: ['ack-id-from-pull'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscription` | `string` | Yes | Required. The subscription whose message is being acknowledged. Format is `projects/{project}/subscriptions/{sub}`. Format: `projects/<id>/subscriptions/<id>`. |
| `ackIds` | `string[]` | No | Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the `Pull` response. Must not be empty. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### subscriptions.create

`pubsub.subscriptions.create`

Creates a subscription to a given topic. See the resource name rules

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.create({ name: 'projects/demo-project/subscriptions/orders-worker', topic: 'projects/demo-project/topics/orders', ackDeadlineSeconds: 30 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Identifier. The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. Format: `projects/<id>/subscriptions/<id>`. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https\://\{\$universe.dns\_names.final\_documentation\_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. |
| `retryPolicy` | `object` | No | A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. [https://en.wikipedia.org/wiki/Exponential\_backoff](https://en.wikipedia.org/wiki/Exponential_backoff). RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff. |
| `enableExactlyOnceDelivery` | `boolean` | No | Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: \* The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgment deadline expires. \* An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values. |
| `messageRetentionDuration` | `string` | No | Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes. |
| `retainAckedMessages` | `boolean` | No | Optional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to `Seek` to a timestamp in the past to replay previously-acknowledged messages. |
| `cloudStorageConfig` | `object` | No | Configuration for a Cloud Storage subscription. |
| `topic` | `string` | No | Required. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted. |
| `messageTransforms` | `object[]` | No | Optional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified. |
| `bigtableConfig` | `object` | No | Configuration for a Bigtable subscription, which will write a Pub/Sub message to a Bigtable row. See the ColumnFamilyMapping documentation below for details on how the row keys and columns will be written. |
| `labels` | `Record<string, string>` | No | Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels). |
| `detached` | `boolean` | No | Optional. Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. `Pull` and `StreamingPull` requests will return FAILED\_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made. |
| `filter` | `string` | No | Optional. An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out. |
| `enableMessageOrdering` | `boolean` | No | Optional. If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. |
| `expirationPolicy` | `object` | No | A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion). |
| `ackDeadlineSeconds` | `number` | No | Optional. The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be *outstanding*. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. |
| `bigqueryConfig` | `object` | No | Configuration for a BigQuery subscription. |
| `body_name` | `string` | No | Required. Identifier. The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. |
| `pushConfig` | `object` | No | Configuration for a push delivery endpoint. |
| `deadLetterPolicy` | `object` | No | Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times. If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail. |

> [accordion] retryPolicy full type
>
> ```ts theme={null}
> {
>   minimumBackoff?: string,
>   maximumBackoff?: string
> }
> ```

> [accordion] cloudStorageConfig full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   filenamePrefix?: string,
>   textConfig?: {
>   },
>   filenameSuffix?: string,
>   maxMessages?: string | number,
>   maxDuration?: string,
>   serviceAccountEmail?: string,
>   maxBytes?: string | number,
>   avroConfig?: {
>     writeMetadata?: boolean,
>     useTopicSchema?: boolean
>   },
>   filenameDatetimeFormat?: string
> }
> ```

> [accordion] messageTransforms full type
>
> ```ts theme={null}
> {
>   enabled?: boolean,
>   compression?: {
>     compressionAlgorithm?: COMPRESSION_ALGORITHM_UNSPECIFIED | ZLIB | ZSTD,
>     compressionMode?: COMPRESSION_MODE_UNSPECIFIED | COMPRESS | DECOMPRESS
>   },
>   aiInference?: {
>     endpoint?: string,
>     unstructuredInference?: {
>       parameters?: Record<string, any>
>     },
>     serviceAccountEmail?: string
>   },
>   javascriptUdf?: {
>     code?: string,
>     functionName?: string
>   },
>   disabled?: boolean
> }[]
> ```

> [accordion] bigtableConfig full type
>
> ```ts theme={null}
> {
>   table?: string,
>   serviceAccountEmail?: string,
>   columnFamilyMapping?: {
>     rowKeySchema?: {
>     },
>     delimitedKey?: {
>       delimiter?: string,
>       keyFields?: string[]
>     }
>   },
>   writeMetadata?: boolean,
>   appProfileId?: string
> }
> ```

> [accordion] expirationPolicy full type
>
> ```ts theme={null}
> {
>   ttl?: string
> }
> ```

> [accordion] bigqueryConfig full type
>
> ```ts theme={null}
> {
>   dropUnknownFields?: boolean,
>   useTableSchema?: boolean,
>   writeMetadata?: boolean,
>   useTopicSchema?: boolean,
>   serviceAccountEmail?: string,
>   table?: string
> }
> ```

> [accordion] pushConfig full type
>
> ```ts theme={null}
> {
>   noWrapper?: {
>     writeMetadata?: boolean
>   },
>   pushEndpoint?: string,
>   attributes?: Record<string, string>,
>   pubsubWrapper?: {
>   },
>   oidcToken?: {
>     serviceAccountEmail?: string,
>     audience?: string
>   }
> }
> ```

> [accordion] deadLetterPolicy full type
>
> ```ts theme={null}
> {
>   deadLetterTopic?: string,
>   maxDeliveryAttempts?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https\://\{\$universe.dns\_names.final\_documentation\_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. |
| `retryPolicy` | `object \| null` | No | A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. [https://en.wikipedia.org/wiki/Exponential\_backoff](https://en.wikipedia.org/wiki/Exponential_backoff). RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff. |
| `enableExactlyOnceDelivery` | `boolean \| null` | No | Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: \* The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgment deadline expires. \* An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values. |
| `messageRetentionDuration` | `string \| null` | No | Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes. |
| `retainAckedMessages` | `boolean \| null` | No | Optional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to `Seek` to a timestamp in the past to replay previously-acknowledged messages. |
| `cloudStorageConfig` | `object \| null` | No | Configuration for a Cloud Storage subscription. |
| `topic` | `string \| null` | No | Required. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted. |
| `messageTransforms` | `object[] \| null` | No | Optional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified. |
| `analyticsHubSubscriptionInfo` | `object \| null` | No | Information about an associated [Analytics Hub subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions). |
| `bigtableConfig` | `object \| null` | No | Configuration for a Bigtable subscription, which will write a Pub/Sub message to a Bigtable row. See the ColumnFamilyMapping documentation below for details on how the row keys and columns will be written. |
| `labels` | `Record<string, string> \| null` | No | Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels). |
| `state` | `string \| null` | No | Output only. An output-only field indicating whether or not the subscription can receive messages. |
| `detached` | `boolean \| null` | No | Optional. Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. `Pull` and `StreamingPull` requests will return FAILED\_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made. |
| `filter` | `string \| null` | No | Optional. An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out. |
| `enableMessageOrdering` | `boolean \| null` | No | Optional. If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. |
| `topicMessageRetentionDuration` | `string \| null` | No | Output only. Indicates the minimum duration for which a message is retained after it is published to the subscription's topic. If this field is set, messages published to the subscription's topic in the last `topic_message_retention_duration` are always available to subscribers. See the `message_retention_duration` field in `Topic`. This field is set only in responses from the server; it is ignored if it is set in any requests. |
| `expirationPolicy` | `object \| null` | No | A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion). |
| `ackDeadlineSeconds` | `number \| null` | No | Optional. The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be *outstanding*. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. |
| `bigqueryConfig` | `object \| null` | No | Configuration for a BigQuery subscription. |
| `name` | `string \| null` | No | Required. Identifier. The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. |
| `pushConfig` | `object \| null` | No | Configuration for a push delivery endpoint. |
| `deadLetterPolicy` | `object \| null` | No | Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times. If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail. |

> [accordion] retryPolicy full type
>
> ```ts theme={null}
> {
>   minimumBackoff?: string | null,
>   maximumBackoff?: string | null
> } | null
> ```

> [accordion] cloudStorageConfig full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   filenamePrefix?: string | null,
>   textConfig?: {
>   } | null,
>   filenameSuffix?: string | null,
>   maxMessages?: string | number | null,
>   maxDuration?: string | null,
>   serviceAccountEmail?: string | null,
>   state?: string | null,
>   maxBytes?: string | number | null,
>   avroConfig?: {
>     writeMetadata?: boolean | null,
>     useTopicSchema?: boolean | null
>   } | null,
>   filenameDatetimeFormat?: string | null
> } | null
> ```

> [accordion] messageTransforms full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   compression?: {
>     compressionAlgorithm?: string | null,
>     compressionMode?: string | null
>   } | null,
>   aiInference?: {
>     endpoint?: string | null,
>     unstructuredInference?: {
>       parameters?: Record<string, any> | null
>     } | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   javascriptUdf?: {
>     code?: string | null,
>     functionName?: string | null
>   } | null,
>   disabled?: boolean | null
> }[] | null
> ```

> [accordion] analyticsHubSubscriptionInfo full type
>
> ```ts theme={null}
> {
>   listing?: string | null,
>   subscription?: string | null
> } | null
> ```

> [accordion] bigtableConfig full type
>
> ```ts theme={null}
> {
>   table?: string | null,
>   state?: string | null,
>   serviceAccountEmail?: string | null,
>   columnFamilyMapping?: {
>     rowKeySchema?: {
>     } | null,
>     delimitedKey?: {
>       delimiter?: string | null,
>       keyFields?: string[] | null
>     } | null
>   } | null,
>   writeMetadata?: boolean | null,
>   appProfileId?: string | null
> } | null
> ```

> [accordion] expirationPolicy full type
>
> ```ts theme={null}
> {
>   ttl?: string | null
> } | null
> ```

> [accordion] bigqueryConfig full type
>
> ```ts theme={null}
> {
>   dropUnknownFields?: boolean | null,
>   useTableSchema?: boolean | null,
>   writeMetadata?: boolean | null,
>   useTopicSchema?: boolean | null,
>   serviceAccountEmail?: string | null,
>   table?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] pushConfig full type
>
> ```ts theme={null}
> {
>   noWrapper?: {
>     writeMetadata?: boolean | null
>   } | null,
>   pushEndpoint?: string | null,
>   attributes?: Record<string, string> | null,
>   pubsubWrapper?: {
>   } | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] deadLetterPolicy full type
>
> ```ts theme={null}
> {
>   deadLetterTopic?: string | null,
>   maxDeliveryAttempts?: number | null
> } | null
> ```

***

### subscriptions.delete

`pubsub.subscriptions.delete`

Deletes an existing subscription. All messages retained in the subscription are immediately dropped

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.delete({ subscription: 'projects/demo-project/subscriptions/orders-worker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscription` | `string` | Yes | Required. The subscription to delete. Format is `projects/{project}/subscriptions/{sub}`. Format: `projects/<id>/subscriptions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### subscriptions.detach

`pubsub.subscriptions.detach`

Detaches a subscription from this topic. All messages retained in the subscription are dropped

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.detach({ subscription: 'projects/demo-project/subscriptions/orders-worker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscription` | `string` | Yes | Required. The subscription to detach. Format is `projects/{project}/subscriptions/{subscription}`. Format: `projects/<id>/subscriptions/<id>`. |

**Output:** *empty object*

***

### subscriptions.get

`pubsub.subscriptions.get`

Gets the configuration details of a subscription

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.get({ subscription: 'projects/demo-project/subscriptions/orders-worker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscription` | `string` | Yes | Required. The name of the subscription to get. Format is `projects/{project}/subscriptions/{sub}`. Format: `projects/<id>/subscriptions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https\://\{\$universe.dns\_names.final\_documentation\_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. |
| `retryPolicy` | `object \| null` | No | A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. [https://en.wikipedia.org/wiki/Exponential\_backoff](https://en.wikipedia.org/wiki/Exponential_backoff). RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff. |
| `enableExactlyOnceDelivery` | `boolean \| null` | No | Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: \* The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgment deadline expires. \* An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values. |
| `messageRetentionDuration` | `string \| null` | No | Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes. |
| `retainAckedMessages` | `boolean \| null` | No | Optional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to `Seek` to a timestamp in the past to replay previously-acknowledged messages. |
| `cloudStorageConfig` | `object \| null` | No | Configuration for a Cloud Storage subscription. |
| `topic` | `string \| null` | No | Required. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted. |
| `messageTransforms` | `object[] \| null` | No | Optional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified. |
| `analyticsHubSubscriptionInfo` | `object \| null` | No | Information about an associated [Analytics Hub subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions). |
| `bigtableConfig` | `object \| null` | No | Configuration for a Bigtable subscription, which will write a Pub/Sub message to a Bigtable row. See the ColumnFamilyMapping documentation below for details on how the row keys and columns will be written. |
| `labels` | `Record<string, string> \| null` | No | Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels). |
| `state` | `string \| null` | No | Output only. An output-only field indicating whether or not the subscription can receive messages. |
| `detached` | `boolean \| null` | No | Optional. Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. `Pull` and `StreamingPull` requests will return FAILED\_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made. |
| `filter` | `string \| null` | No | Optional. An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out. |
| `enableMessageOrdering` | `boolean \| null` | No | Optional. If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. |
| `topicMessageRetentionDuration` | `string \| null` | No | Output only. Indicates the minimum duration for which a message is retained after it is published to the subscription's topic. If this field is set, messages published to the subscription's topic in the last `topic_message_retention_duration` are always available to subscribers. See the `message_retention_duration` field in `Topic`. This field is set only in responses from the server; it is ignored if it is set in any requests. |
| `expirationPolicy` | `object \| null` | No | A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion). |
| `ackDeadlineSeconds` | `number \| null` | No | Optional. The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be *outstanding*. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. |
| `bigqueryConfig` | `object \| null` | No | Configuration for a BigQuery subscription. |
| `name` | `string \| null` | No | Required. Identifier. The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. |
| `pushConfig` | `object \| null` | No | Configuration for a push delivery endpoint. |
| `deadLetterPolicy` | `object \| null` | No | Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times. If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail. |

> [accordion] retryPolicy full type
>
> ```ts theme={null}
> {
>   minimumBackoff?: string | null,
>   maximumBackoff?: string | null
> } | null
> ```

> [accordion] cloudStorageConfig full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   filenamePrefix?: string | null,
>   textConfig?: {
>   } | null,
>   filenameSuffix?: string | null,
>   maxMessages?: string | number | null,
>   maxDuration?: string | null,
>   serviceAccountEmail?: string | null,
>   state?: string | null,
>   maxBytes?: string | number | null,
>   avroConfig?: {
>     writeMetadata?: boolean | null,
>     useTopicSchema?: boolean | null
>   } | null,
>   filenameDatetimeFormat?: string | null
> } | null
> ```

> [accordion] messageTransforms full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   compression?: {
>     compressionAlgorithm?: string | null,
>     compressionMode?: string | null
>   } | null,
>   aiInference?: {
>     endpoint?: string | null,
>     unstructuredInference?: {
>       parameters?: Record<string, any> | null
>     } | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   javascriptUdf?: {
>     code?: string | null,
>     functionName?: string | null
>   } | null,
>   disabled?: boolean | null
> }[] | null
> ```

> [accordion] analyticsHubSubscriptionInfo full type
>
> ```ts theme={null}
> {
>   listing?: string | null,
>   subscription?: string | null
> } | null
> ```

> [accordion] bigtableConfig full type
>
> ```ts theme={null}
> {
>   table?: string | null,
>   state?: string | null,
>   serviceAccountEmail?: string | null,
>   columnFamilyMapping?: {
>     rowKeySchema?: {
>     } | null,
>     delimitedKey?: {
>       delimiter?: string | null,
>       keyFields?: string[] | null
>     } | null
>   } | null,
>   writeMetadata?: boolean | null,
>   appProfileId?: string | null
> } | null
> ```

> [accordion] expirationPolicy full type
>
> ```ts theme={null}
> {
>   ttl?: string | null
> } | null
> ```

> [accordion] bigqueryConfig full type
>
> ```ts theme={null}
> {
>   dropUnknownFields?: boolean | null,
>   useTableSchema?: boolean | null,
>   writeMetadata?: boolean | null,
>   useTopicSchema?: boolean | null,
>   serviceAccountEmail?: string | null,
>   table?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] pushConfig full type
>
> ```ts theme={null}
> {
>   noWrapper?: {
>     writeMetadata?: boolean | null
>   } | null,
>   pushEndpoint?: string | null,
>   attributes?: Record<string, string> | null,
>   pubsubWrapper?: {
>   } | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] deadLetterPolicy full type
>
> ```ts theme={null}
> {
>   deadLetterTopic?: string | null,
>   maxDeliveryAttempts?: number | null
> } | null
> ```

***

### subscriptions.getIamPolicy

`pubsub.subscriptions.getIamPolicy`

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.getIamPolicy({ resource: 'projects/demo-project/subscriptions/orders-worker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/subscriptions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null,
>     location?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### subscriptions.list

`pubsub.subscriptions.list`

Lists matching subscriptions (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.list({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. The name of the project in which to list subscriptions. Format is `projects/{project-id}`. Format: `projects/<id>`. |
| `pageSize` | `number` | No | Optional. Maximum number of subscriptions to return. |
| `pageToken` | `string` | No | Optional. The value returned by the last `ListSubscriptionsResponse`; indicates that this is a continuation of a prior `ListSubscriptions` call, and that the system should return the next page of data. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscriptions` | `object[] \| null` | No | Optional. The subscriptions that match the request. |
| `nextPageToken` | `string \| null` | No | Optional. If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListSubscriptionsRequest` to get more subscriptions. |

> [accordion] subscriptions full type
>
> ```ts theme={null}
> {
>   tags?: Record<string, string> | null,
>   retryPolicy?: {
>     minimumBackoff?: string | null,
>     maximumBackoff?: string | null
>   } | null,
>   enableExactlyOnceDelivery?: boolean | null,
>   messageRetentionDuration?: string | null,
>   retainAckedMessages?: boolean | null,
>   cloudStorageConfig?: {
>     bucket?: string | null,
>     filenamePrefix?: string | null,
>     textConfig?: {
>     } | null,
>     filenameSuffix?: string | null,
>     maxMessages?: string | number | null,
>     maxDuration?: string | null,
>     serviceAccountEmail?: string | null,
>     state?: string | null,
>     maxBytes?: string | number | null,
>     avroConfig?: {
>       writeMetadata?: boolean | null,
>       useTopicSchema?: boolean | null
>     } | null,
>     filenameDatetimeFormat?: string | null
>   } | null,
>   topic?: string | null,
>   messageTransforms?: {
>     enabled?: boolean | null,
>     compression?: {
>       compressionAlgorithm?: string | null,
>       compressionMode?: string | null
>     } | null,
>     aiInference?: {
>       endpoint?: string | null,
>       unstructuredInference?: {
>         parameters?: Record<string, any> | null
>       } | null,
>       serviceAccountEmail?: string | null
>     } | null,
>     javascriptUdf?: {
>       code?: string | null,
>       functionName?: string | null
>     } | null,
>     disabled?: boolean | null
>   }[] | null,
>   analyticsHubSubscriptionInfo?: {
>     listing?: string | null,
>     subscription?: string | null
>   } | null,
>   bigtableConfig?: {
>     table?: string | null,
>     state?: string | null,
>     serviceAccountEmail?: string | null,
>     columnFamilyMapping?: {
>       rowKeySchema?: {
>       } | null,
>       delimitedKey?: {
>         delimiter?: string | null,
>         keyFields?: string[] | null
>       } | null
>     } | null,
>     writeMetadata?: boolean | null,
>     appProfileId?: string | null
>   } | null,
>   labels?: Record<string, string> | null,
>   state?: string | null,
>   detached?: boolean | null,
>   filter?: string | null,
>   enableMessageOrdering?: boolean | null,
>   topicMessageRetentionDuration?: string | null,
>   expirationPolicy?: {
>     ttl?: string | null
>   } | null,
>   ackDeadlineSeconds?: number | null,
>   bigqueryConfig?: {
>     dropUnknownFields?: boolean | null,
>     useTableSchema?: boolean | null,
>     writeMetadata?: boolean | null,
>     useTopicSchema?: boolean | null,
>     serviceAccountEmail?: string | null,
>     table?: string | null,
>     state?: string | null
>   } | null,
>   name?: string | null,
>   pushConfig?: {
>     noWrapper?: {
>       writeMetadata?: boolean | null
>     } | null,
>     pushEndpoint?: string | null,
>     attributes?: Record<string, string> | null,
>     pubsubWrapper?: {
>     } | null,
>     oidcToken?: {
>       serviceAccountEmail?: string | null,
>       audience?: string | null
>     } | null
>   } | null,
>   deadLetterPolicy?: {
>     deadLetterTopic?: string | null,
>     maxDeliveryAttempts?: number | null
>   } | null
> }[] | null
> ```

***

### subscriptions.modifyAckDeadline

`pubsub.subscriptions.modifyAckDeadline`

Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.modifyAckDeadline({
	subscription: 'projects/demo-project/subscriptions/orders-worker',
	ackIds: ['ack-id-from-pull'],
	ackDeadlineSeconds: 60,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscription` | `string` | Yes | Required. The name of the subscription. Format is `projects/{project}/subscriptions/{sub}`. Format: `projects/<id>/subscriptions/<id>`. |
| `ackIds` | `string[]` | No | Required. List of acknowledgment IDs. |
| `ackDeadlineSeconds` | `number` | No | Required. The new ack deadline with respect to the time this request was sent to the Pub/Sub system. For example, if the value is 10, the new ack deadline will expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero might immediately make the message available for delivery to another subscriber client. This typically results in an increase in the rate of message redeliveries (that is, duplicates). The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify in a single request is 600 seconds (10 minutes). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### subscriptions.modifyPushConfig

`pubsub.subscriptions.modifyPushConfig`

Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.modifyPushConfig({
	subscription: 'projects/demo-project/subscriptions/orders-worker',
	pushConfig: { pushEndpoint: 'https://example.com/pubsub' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscription` | `string` | Yes | Required. The name of the subscription. Format is `projects/{project}/subscriptions/{sub}`. Format: `projects/<id>/subscriptions/<id>`. |
| `pushConfig` | `object` | No | Configuration for a push delivery endpoint. |

> [accordion] pushConfig full type
>
> ```ts theme={null}
> {
>   noWrapper?: {
>     writeMetadata?: boolean
>   },
>   pushEndpoint?: string,
>   attributes?: Record<string, string>,
>   pubsubWrapper?: {
>   },
>   oidcToken?: {
>     serviceAccountEmail?: string,
>     audience?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### subscriptions.patch

`pubsub.subscriptions.patch`

Updates an existing subscription by updating the fields specified in the update mask. Note that certain properties of a subscription, such as its topic, are not modifiable

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.patch({
	name: 'projects/demo-project/subscriptions/orders-worker',
	updateMask: 'ackDeadlineSeconds',
	subscription: { ackDeadlineSeconds: 60 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Identifier. The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. Format: `projects/<id>/subscriptions/<id>`. |
| `updateMask` | `string` | No | Required. Indicates which fields in the provided subscription to update. Must be specified and non-empty. |
| `subscription` | `object` | No | A subscription resource. If none of `push_config`, `bigquery_config`, `cloud_storage_config`, or `bigtable_config` is set, then the subscriber will pull and ack messages using API methods. At most one of these fields may be set. |

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   tags?: Record<string, string>,
>   retryPolicy?: {
>     minimumBackoff?: string,
>     maximumBackoff?: string
>   },
>   enableExactlyOnceDelivery?: boolean,
>   messageRetentionDuration?: string,
>   retainAckedMessages?: boolean,
>   cloudStorageConfig?: {
>     bucket?: string,
>     filenamePrefix?: string,
>     textConfig?: {
>     },
>     filenameSuffix?: string,
>     maxMessages?: string | number,
>     maxDuration?: string,
>     serviceAccountEmail?: string,
>     maxBytes?: string | number,
>     avroConfig?: {
>       writeMetadata?: boolean,
>       useTopicSchema?: boolean
>     },
>     filenameDatetimeFormat?: string
>   },
>   topic?: string,
>   messageTransforms?: {
>     enabled?: boolean,
>     compression?: {
>       compressionAlgorithm?: COMPRESSION_ALGORITHM_UNSPECIFIED | ZLIB | ZSTD,
>       compressionMode?: COMPRESSION_MODE_UNSPECIFIED | COMPRESS | DECOMPRESS
>     },
>     aiInference?: {
>       endpoint?: string,
>       unstructuredInference?: {
>         parameters?: Record<string, any>
>       },
>       serviceAccountEmail?: string
>     },
>     javascriptUdf?: {
>       code?: string,
>       functionName?: string
>     },
>     disabled?: boolean
>   }[],
>   bigtableConfig?: {
>     table?: string,
>     serviceAccountEmail?: string,
>     columnFamilyMapping?: {
>       rowKeySchema?: {
>       },
>       delimitedKey?: {
>         delimiter?: string,
>         keyFields?: string[]
>       }
>     },
>     writeMetadata?: boolean,
>     appProfileId?: string
>   },
>   labels?: Record<string, string>,
>   detached?: boolean,
>   filter?: string,
>   enableMessageOrdering?: boolean,
>   expirationPolicy?: {
>     ttl?: string
>   },
>   ackDeadlineSeconds?: number,
>   bigqueryConfig?: {
>     dropUnknownFields?: boolean,
>     useTableSchema?: boolean,
>     writeMetadata?: boolean,
>     useTopicSchema?: boolean,
>     serviceAccountEmail?: string,
>     table?: string
>   },
>   name?: string,
>   pushConfig?: {
>     noWrapper?: {
>       writeMetadata?: boolean
>     },
>     pushEndpoint?: string,
>     attributes?: Record<string, string>,
>     pubsubWrapper?: {
>     },
>     oidcToken?: {
>       serviceAccountEmail?: string,
>       audience?: string
>     }
>   },
>   deadLetterPolicy?: {
>     deadLetterTopic?: string,
>     maxDeliveryAttempts?: number
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https\://\{\$universe.dns\_names.final\_documentation\_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. |
| `retryPolicy` | `object \| null` | No | A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. [https://en.wikipedia.org/wiki/Exponential\_backoff](https://en.wikipedia.org/wiki/Exponential_backoff). RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff. |
| `enableExactlyOnceDelivery` | `boolean \| null` | No | Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: \* The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgment deadline expires. \* An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values. |
| `messageRetentionDuration` | `string \| null` | No | Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes. |
| `retainAckedMessages` | `boolean \| null` | No | Optional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to `Seek` to a timestamp in the past to replay previously-acknowledged messages. |
| `cloudStorageConfig` | `object \| null` | No | Configuration for a Cloud Storage subscription. |
| `topic` | `string \| null` | No | Required. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted. |
| `messageTransforms` | `object[] \| null` | No | Optional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified. |
| `analyticsHubSubscriptionInfo` | `object \| null` | No | Information about an associated [Analytics Hub subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions). |
| `bigtableConfig` | `object \| null` | No | Configuration for a Bigtable subscription, which will write a Pub/Sub message to a Bigtable row. See the ColumnFamilyMapping documentation below for details on how the row keys and columns will be written. |
| `labels` | `Record<string, string> \| null` | No | Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels). |
| `state` | `string \| null` | No | Output only. An output-only field indicating whether or not the subscription can receive messages. |
| `detached` | `boolean \| null` | No | Optional. Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. `Pull` and `StreamingPull` requests will return FAILED\_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made. |
| `filter` | `string \| null` | No | Optional. An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out. |
| `enableMessageOrdering` | `boolean \| null` | No | Optional. If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. |
| `topicMessageRetentionDuration` | `string \| null` | No | Output only. Indicates the minimum duration for which a message is retained after it is published to the subscription's topic. If this field is set, messages published to the subscription's topic in the last `topic_message_retention_duration` are always available to subscribers. See the `message_retention_duration` field in `Topic`. This field is set only in responses from the server; it is ignored if it is set in any requests. |
| `expirationPolicy` | `object \| null` | No | A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion). |
| `ackDeadlineSeconds` | `number \| null` | No | Optional. The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be *outstanding*. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. |
| `bigqueryConfig` | `object \| null` | No | Configuration for a BigQuery subscription. |
| `name` | `string \| null` | No | Required. Identifier. The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. |
| `pushConfig` | `object \| null` | No | Configuration for a push delivery endpoint. |
| `deadLetterPolicy` | `object \| null` | No | Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times. If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail. |

> [accordion] retryPolicy full type
>
> ```ts theme={null}
> {
>   minimumBackoff?: string | null,
>   maximumBackoff?: string | null
> } | null
> ```

> [accordion] cloudStorageConfig full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   filenamePrefix?: string | null,
>   textConfig?: {
>   } | null,
>   filenameSuffix?: string | null,
>   maxMessages?: string | number | null,
>   maxDuration?: string | null,
>   serviceAccountEmail?: string | null,
>   state?: string | null,
>   maxBytes?: string | number | null,
>   avroConfig?: {
>     writeMetadata?: boolean | null,
>     useTopicSchema?: boolean | null
>   } | null,
>   filenameDatetimeFormat?: string | null
> } | null
> ```

> [accordion] messageTransforms full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   compression?: {
>     compressionAlgorithm?: string | null,
>     compressionMode?: string | null
>   } | null,
>   aiInference?: {
>     endpoint?: string | null,
>     unstructuredInference?: {
>       parameters?: Record<string, any> | null
>     } | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   javascriptUdf?: {
>     code?: string | null,
>     functionName?: string | null
>   } | null,
>   disabled?: boolean | null
> }[] | null
> ```

> [accordion] analyticsHubSubscriptionInfo full type
>
> ```ts theme={null}
> {
>   listing?: string | null,
>   subscription?: string | null
> } | null
> ```

> [accordion] bigtableConfig full type
>
> ```ts theme={null}
> {
>   table?: string | null,
>   state?: string | null,
>   serviceAccountEmail?: string | null,
>   columnFamilyMapping?: {
>     rowKeySchema?: {
>     } | null,
>     delimitedKey?: {
>       delimiter?: string | null,
>       keyFields?: string[] | null
>     } | null
>   } | null,
>   writeMetadata?: boolean | null,
>   appProfileId?: string | null
> } | null
> ```

> [accordion] expirationPolicy full type
>
> ```ts theme={null}
> {
>   ttl?: string | null
> } | null
> ```

> [accordion] bigqueryConfig full type
>
> ```ts theme={null}
> {
>   dropUnknownFields?: boolean | null,
>   useTableSchema?: boolean | null,
>   writeMetadata?: boolean | null,
>   useTopicSchema?: boolean | null,
>   serviceAccountEmail?: string | null,
>   table?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] pushConfig full type
>
> ```ts theme={null}
> {
>   noWrapper?: {
>     writeMetadata?: boolean | null
>   } | null,
>   pushEndpoint?: string | null,
>   attributes?: Record<string, string> | null,
>   pubsubWrapper?: {
>   } | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] deadLetterPolicy full type
>
> ```ts theme={null}
> {
>   deadLetterTopic?: string | null,
>   maxDeliveryAttempts?: number | null
> } | null
> ```

***

### subscriptions.pull

`pubsub.subscriptions.pull`

Pull messages from a subscription (ack them afterwards with pubsub.subscriptions.acknowledge, or they come back)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.pull({ subscription: 'projects/demo-project/subscriptions/orders-worker', maxMessages: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscription` | `string` | Yes | Required. The subscription from which messages should be pulled. Format is `projects/{project}/subscriptions/{sub}`. Format: `projects/<id>/subscriptions/<id>`. |
| `returnImmediately` | `boolean` | No | Optional. If this field set to true, the system will respond immediately even if it there are no messages available to return in the `Pull` response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Warning: setting this field to `true` is discouraged because it adversely impacts the performance of `Pull` operations. We recommend that users do not set this field. |
| `maxMessages` | `number` | No | Required. The maximum number of messages to return for this request. Must be a positive integer. The Pub/Sub system may return fewer than the number specified. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receivedMessages` | `object[] \| null` | No | Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the `maxMessages` requested even if there are more messages available in the backlog. |

> [accordion] receivedMessages full type
>
> ```ts theme={null}
> {
>   ackId?: string | null,
>   deliveryAttempt?: number | null,
>   message?: {
>     publishTime?: string | null,
>     attributes?: Record<string, string> | null,
>     messageId?: string | null,
>     orderingKey?: string | null,
>     data?: string | null
>   } | null
> }[] | null
> ```

***

### subscriptions.seek

`pubsub.subscriptions.seek`

Seeks an existing subscription to a point in time or to a given snapshot, whichever is provided in the request. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.seek({ subscription: 'projects/demo-project/subscriptions/orders-worker', time: '2026-12-02T09:00:00Z' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscription` | `string` | Yes | Required. The subscription to affect. Format: `projects/<id>/subscriptions/<id>`. |
| `snapshot` | `string` | No | Optional. The snapshot to seek to. The snapshot's topic must be the same as that of the provided subscription. Format is `projects/{project}/snapshots/{snap}`. |
| `time` | `string` | No | Optional. The time to seek to. Messages retained in the subscription that were published before this time are marked as acknowledged, and messages retained in the subscription that were published after this time are marked as unacknowledged. Note that this operation affects only those messages retained in the subscription (configured by the combination of `message_retention_duration` and `retain_acked_messages`). |

**Output:** *empty object*

***

### subscriptions.setIamPolicy

`pubsub.subscriptions.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.setIamPolicy({
	resource: 'projects/demo-project/subscriptions/orders-worker',
	policy: {
		bindings: [{
			role: 'roles/pubsub.subscriber',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/subscriptions/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   bindings?: {
>     condition?: {
>       expression?: string,
>       description?: string,
>       title?: string,
>       location?: string
>     },
>     members?: string[],
>     role?: string
>   }[],
>   etag?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null,
>     location?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### subscriptions.testIamPermissions

`pubsub.subscriptions.testIamPermissions`

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.subscriptions.testIamPermissions({
	resource: 'projects/demo-project/subscriptions/orders-worker',
	permissions: ['pubsub.subscriptions.consume'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/subscriptions/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### topics.create

`pubsub.topics.create`

Creates the given topic with the given name. See the resource name rules

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.create({
	name: 'projects/demo-project/topics/orders',
	labels: { env: 'prod' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. Format: `projects/<id>/topics/<id>`. |
| `body_name` | `string` | No | Required. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. |
| `messageTransforms` | `object[]` | No | Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified. |
| `messageRetentionDuration` | `string` | No | Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. |
| `messageStoragePolicy` | `object` | No | A policy constraining the storage of messages published to the topic. |
| `labels` | `Record<string, string>` | No | Optional. See Creating and managing labels. |
| `ingestionDataSourceSettings` | `object` | No | Settings for an ingestion data source on a topic. |
| `kmsKeyName` | `string` | No | Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https\://\{\$universe.dns\_names.final\_documentation\_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. |
| `satisfiesPzs` | `boolean` | No | Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
| `schemaSettings` | `object` | No | Settings for validating messages published against a schema. |

> [accordion] messageTransforms full type
>
> ```ts theme={null}
> {
>   enabled?: boolean,
>   compression?: {
>     compressionAlgorithm?: COMPRESSION_ALGORITHM_UNSPECIFIED | ZLIB | ZSTD,
>     compressionMode?: COMPRESSION_MODE_UNSPECIFIED | COMPRESS | DECOMPRESS
>   },
>   aiInference?: {
>     endpoint?: string,
>     unstructuredInference?: {
>       parameters?: Record<string, any>
>     },
>     serviceAccountEmail?: string
>   },
>   javascriptUdf?: {
>     code?: string,
>     functionName?: string
>   },
>   disabled?: boolean
> }[]
> ```

> [accordion] messageStoragePolicy full type
>
> ```ts theme={null}
> {
>   allowedPersistenceRegions?: string[],
>   enforceInTransit?: boolean
> }
> ```

> [accordion] ingestionDataSourceSettings full type
>
> ```ts theme={null}
> {
>   confluentCloud?: {
>     bootstrapServer?: string,
>     topic?: string,
>     identityPoolId?: string,
>     gcpServiceAccount?: string,
>     clusterId?: string
>   },
>   cloudStorage?: {
>     matchGlob?: string,
>     avroFormat?: {
>     },
>     bucket?: string,
>     pubsubAvroFormat?: {
>     },
>     minimumObjectCreateTime?: string,
>     textFormat?: {
>       delimiter?: string
>     }
>   },
>   awsMsk?: {
>     gcpServiceAccount?: string,
>     clusterArn?: string,
>     awsRoleArn?: string,
>     topic?: string
>   },
>   awsKinesis?: {
>     gcpServiceAccount?: string,
>     consumerArn?: string,
>     streamArn?: string,
>     awsRoleArn?: string
>   },
>   platformLogsSettings?: {
>     severity?: SEVERITY_UNSPECIFIED | DISABLED | DEBUG | INFO | WARNING | ERROR
>   },
>   azureEventHubs?: {
>     subscriptionId?: string,
>     clientId?: string,
>     resourceGroup?: string,
>     eventHub?: string,
>     tenantId?: string,
>     gcpServiceAccount?: string,
>     namespace?: string
>   }
> }
> ```

> [accordion] schemaSettings full type
>
> ```ts theme={null}
> {
>   schema?: string,
>   firstRevisionId?: string,
>   lastRevisionId?: string,
>   encoding?: ENCODING_UNSPECIFIED | JSON | BINARY
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. |
| `messageTransforms` | `object[] \| null` | No | Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified. |
| `messageRetentionDuration` | `string \| null` | No | Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. |
| `messageStoragePolicy` | `object \| null` | No | A policy constraining the storage of messages published to the topic. |
| `labels` | `Record<string, string> \| null` | No | Optional. See Creating and managing labels. |
| `ingestionDataSourceSettings` | `object \| null` | No | Settings for an ingestion data source on a topic. |
| `kmsKeyName` | `string \| null` | No | Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
| `state` | `string \| null` | No | Output only. An output-only field indicating the state of the topic. |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https\://\{\$universe.dns\_names.final\_documentation\_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. |
| `satisfiesPzs` | `boolean \| null` | No | Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
| `schemaSettings` | `object \| null` | No | Settings for validating messages published against a schema. |

> [accordion] messageTransforms full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   compression?: {
>     compressionAlgorithm?: string | null,
>     compressionMode?: string | null
>   } | null,
>   aiInference?: {
>     endpoint?: string | null,
>     unstructuredInference?: {
>       parameters?: Record<string, any> | null
>     } | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   javascriptUdf?: {
>     code?: string | null,
>     functionName?: string | null
>   } | null,
>   disabled?: boolean | null
> }[] | null
> ```

> [accordion] messageStoragePolicy full type
>
> ```ts theme={null}
> {
>   allowedPersistenceRegions?: string[] | null,
>   enforceInTransit?: boolean | null
> } | null
> ```

> [accordion] ingestionDataSourceSettings full type
>
> ```ts theme={null}
> {
>   confluentCloud?: {
>     bootstrapServer?: string | null,
>     topic?: string | null,
>     identityPoolId?: string | null,
>     gcpServiceAccount?: string | null,
>     state?: string | null,
>     clusterId?: string | null
>   } | null,
>   cloudStorage?: {
>     matchGlob?: string | null,
>     avroFormat?: {
>     } | null,
>     bucket?: string | null,
>     pubsubAvroFormat?: {
>     } | null,
>     minimumObjectCreateTime?: string | null,
>     textFormat?: {
>       delimiter?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   awsMsk?: {
>     gcpServiceAccount?: string | null,
>     state?: string | null,
>     clusterArn?: string | null,
>     awsRoleArn?: string | null,
>     topic?: string | null
>   } | null,
>   awsKinesis?: {
>     state?: string | null,
>     gcpServiceAccount?: string | null,
>     consumerArn?: string | null,
>     streamArn?: string | null,
>     awsRoleArn?: string | null
>   } | null,
>   platformLogsSettings?: {
>     severity?: string | null
>   } | null,
>   azureEventHubs?: {
>     subscriptionId?: string | null,
>     state?: string | null,
>     clientId?: string | null,
>     resourceGroup?: string | null,
>     eventHub?: string | null,
>     tenantId?: string | null,
>     gcpServiceAccount?: string | null,
>     namespace?: string | null
>   } | null
> } | null
> ```

> [accordion] schemaSettings full type
>
> ```ts theme={null}
> {
>   schema?: string | null,
>   firstRevisionId?: string | null,
>   lastRevisionId?: string | null,
>   encoding?: string | null
> } | null
> ```

***

### topics.delete

`pubsub.topics.delete`

Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.delete({ topic: 'projects/demo-project/topics/orders' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `topic` | `string` | Yes | Required. Name of the topic to delete. Format is `projects/{project}/topics/{topic}`. Format: `projects/<id>/topics/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### topics.get

`pubsub.topics.get`

Gets the configuration of a topic

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.get({ topic: 'projects/demo-project/topics/orders' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `topic` | `string` | Yes | Required. The name of the topic to get. Format is `projects/{project}/topics/{topic}`. Format: `projects/<id>/topics/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. |
| `messageTransforms` | `object[] \| null` | No | Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified. |
| `messageRetentionDuration` | `string \| null` | No | Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. |
| `messageStoragePolicy` | `object \| null` | No | A policy constraining the storage of messages published to the topic. |
| `labels` | `Record<string, string> \| null` | No | Optional. See Creating and managing labels. |
| `ingestionDataSourceSettings` | `object \| null` | No | Settings for an ingestion data source on a topic. |
| `kmsKeyName` | `string \| null` | No | Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
| `state` | `string \| null` | No | Output only. An output-only field indicating the state of the topic. |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https\://\{\$universe.dns\_names.final\_documentation\_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. |
| `satisfiesPzs` | `boolean \| null` | No | Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
| `schemaSettings` | `object \| null` | No | Settings for validating messages published against a schema. |

> [accordion] messageTransforms full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   compression?: {
>     compressionAlgorithm?: string | null,
>     compressionMode?: string | null
>   } | null,
>   aiInference?: {
>     endpoint?: string | null,
>     unstructuredInference?: {
>       parameters?: Record<string, any> | null
>     } | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   javascriptUdf?: {
>     code?: string | null,
>     functionName?: string | null
>   } | null,
>   disabled?: boolean | null
> }[] | null
> ```

> [accordion] messageStoragePolicy full type
>
> ```ts theme={null}
> {
>   allowedPersistenceRegions?: string[] | null,
>   enforceInTransit?: boolean | null
> } | null
> ```

> [accordion] ingestionDataSourceSettings full type
>
> ```ts theme={null}
> {
>   confluentCloud?: {
>     bootstrapServer?: string | null,
>     topic?: string | null,
>     identityPoolId?: string | null,
>     gcpServiceAccount?: string | null,
>     state?: string | null,
>     clusterId?: string | null
>   } | null,
>   cloudStorage?: {
>     matchGlob?: string | null,
>     avroFormat?: {
>     } | null,
>     bucket?: string | null,
>     pubsubAvroFormat?: {
>     } | null,
>     minimumObjectCreateTime?: string | null,
>     textFormat?: {
>       delimiter?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   awsMsk?: {
>     gcpServiceAccount?: string | null,
>     state?: string | null,
>     clusterArn?: string | null,
>     awsRoleArn?: string | null,
>     topic?: string | null
>   } | null,
>   awsKinesis?: {
>     state?: string | null,
>     gcpServiceAccount?: string | null,
>     consumerArn?: string | null,
>     streamArn?: string | null,
>     awsRoleArn?: string | null
>   } | null,
>   platformLogsSettings?: {
>     severity?: string | null
>   } | null,
>   azureEventHubs?: {
>     subscriptionId?: string | null,
>     state?: string | null,
>     clientId?: string | null,
>     resourceGroup?: string | null,
>     eventHub?: string | null,
>     tenantId?: string | null,
>     gcpServiceAccount?: string | null,
>     namespace?: string | null
>   } | null
> } | null
> ```

> [accordion] schemaSettings full type
>
> ```ts theme={null}
> {
>   schema?: string | null,
>   firstRevisionId?: string | null,
>   lastRevisionId?: string | null,
>   encoding?: string | null
> } | null
> ```

***

### topics.getIamPolicy

`pubsub.topics.getIamPolicy`

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.getIamPolicy({ resource: 'projects/demo-project/topics/orders' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/topics/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null,
>     location?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### topics.list

`pubsub.topics.list`

Lists matching topics (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.list({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. The value returned by the last `ListTopicsResponse`; indicates that this is a continuation of a prior `ListTopics` call, and that the system should return the next page of data. |
| `project` | `string` | Yes | Required. The name of the project in which to list topics. Format is `projects/{project-id}`. Format: `projects/<id>`. |
| `pageSize` | `number` | No | Optional. Maximum number of topics to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `topics` | `object[] \| null` | No | Optional. The resulting topics. |
| `nextPageToken` | `string \| null` | No | Optional. If not empty, indicates that there may be more topics that match the request; this value should be passed in a new `ListTopicsRequest`. |

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   messageTransforms?: {
>     enabled?: boolean | null,
>     compression?: {
>       compressionAlgorithm?: string | null,
>       compressionMode?: string | null
>     } | null,
>     aiInference?: {
>       endpoint?: string | null,
>       unstructuredInference?: {
>         parameters?: Record<string, any> | null
>       } | null,
>       serviceAccountEmail?: string | null
>     } | null,
>     javascriptUdf?: {
>       code?: string | null,
>       functionName?: string | null
>     } | null,
>     disabled?: boolean | null
>   }[] | null,
>   messageRetentionDuration?: string | null,
>   messageStoragePolicy?: {
>     allowedPersistenceRegions?: string[] | null,
>     enforceInTransit?: boolean | null
>   } | null,
>   labels?: Record<string, string> | null,
>   ingestionDataSourceSettings?: {
>     confluentCloud?: {
>       bootstrapServer?: string | null,
>       topic?: string | null,
>       identityPoolId?: string | null,
>       gcpServiceAccount?: string | null,
>       state?: string | null,
>       clusterId?: string | null
>     } | null,
>     cloudStorage?: {
>       matchGlob?: string | null,
>       avroFormat?: {
>       } | null,
>       bucket?: string | null,
>       pubsubAvroFormat?: {
>       } | null,
>       minimumObjectCreateTime?: string | null,
>       textFormat?: {
>         delimiter?: string | null
>       } | null,
>       state?: string | null
>     } | null,
>     awsMsk?: {
>       gcpServiceAccount?: string | null,
>       state?: string | null,
>       clusterArn?: string | null,
>       awsRoleArn?: string | null,
>       topic?: string | null
>     } | null,
>     awsKinesis?: {
>       state?: string | null,
>       gcpServiceAccount?: string | null,
>       consumerArn?: string | null,
>       streamArn?: string | null,
>       awsRoleArn?: string | null
>     } | null,
>     platformLogsSettings?: {
>       severity?: string | null
>     } | null,
>     azureEventHubs?: {
>       subscriptionId?: string | null,
>       state?: string | null,
>       clientId?: string | null,
>       resourceGroup?: string | null,
>       eventHub?: string | null,
>       tenantId?: string | null,
>       gcpServiceAccount?: string | null,
>       namespace?: string | null
>     } | null
>   } | null,
>   kmsKeyName?: string | null,
>   state?: string | null,
>   tags?: Record<string, string> | null,
>   satisfiesPzs?: boolean | null,
>   schemaSettings?: {
>     schema?: string | null,
>     firstRevisionId?: string | null,
>     lastRevisionId?: string | null,
>     encoding?: string | null
>   } | null
> }[] | null
> ```

***

### topics.patch

`pubsub.topics.patch`

Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.patch({
	name: 'projects/demo-project/topics/orders',
	updateMask: 'labels',
	topic: {
		labels: { env: 'prod' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. Format: `projects/<id>/topics/<id>`. |
| `updateMask` | `string` | No | Required. Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if `update_mask` contains "message\_storage\_policy" but the `message_storage_policy` is not set in the `topic` provided above, then the updated value is determined by the policy configured at the project or organization level. |
| `topic` | `object` | No | A topic resource. |

> [accordion] topic full type
>
> ```ts theme={null}
> {
>   name?: string,
>   messageTransforms?: {
>     enabled?: boolean,
>     compression?: {
>       compressionAlgorithm?: COMPRESSION_ALGORITHM_UNSPECIFIED | ZLIB | ZSTD,
>       compressionMode?: COMPRESSION_MODE_UNSPECIFIED | COMPRESS | DECOMPRESS
>     },
>     aiInference?: {
>       endpoint?: string,
>       unstructuredInference?: {
>         parameters?: Record<string, any>
>       },
>       serviceAccountEmail?: string
>     },
>     javascriptUdf?: {
>       code?: string,
>       functionName?: string
>     },
>     disabled?: boolean
>   }[],
>   messageRetentionDuration?: string,
>   messageStoragePolicy?: {
>     allowedPersistenceRegions?: string[],
>     enforceInTransit?: boolean
>   },
>   labels?: Record<string, string>,
>   ingestionDataSourceSettings?: {
>     confluentCloud?: {
>       bootstrapServer?: string,
>       topic?: string,
>       identityPoolId?: string,
>       gcpServiceAccount?: string,
>       clusterId?: string
>     },
>     cloudStorage?: {
>       matchGlob?: string,
>       avroFormat?: {
>       },
>       bucket?: string,
>       pubsubAvroFormat?: {
>       },
>       minimumObjectCreateTime?: string,
>       textFormat?: {
>         delimiter?: string
>       }
>     },
>     awsMsk?: {
>       gcpServiceAccount?: string,
>       clusterArn?: string,
>       awsRoleArn?: string,
>       topic?: string
>     },
>     awsKinesis?: {
>       gcpServiceAccount?: string,
>       consumerArn?: string,
>       streamArn?: string,
>       awsRoleArn?: string
>     },
>     platformLogsSettings?: {
>       severity?: SEVERITY_UNSPECIFIED | DISABLED | DEBUG | INFO | WARNING | ERROR
>     },
>     azureEventHubs?: {
>       subscriptionId?: string,
>       clientId?: string,
>       resourceGroup?: string,
>       eventHub?: string,
>       tenantId?: string,
>       gcpServiceAccount?: string,
>       namespace?: string
>     }
>   },
>   kmsKeyName?: string,
>   tags?: Record<string, string>,
>   satisfiesPzs?: boolean,
>   schemaSettings?: {
>     schema?: string,
>     firstRevisionId?: string,
>     lastRevisionId?: string,
>     encoding?: ENCODING_UNSPECIFIED | JSON | BINARY
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. |
| `messageTransforms` | `object[] \| null` | No | Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified. |
| `messageRetentionDuration` | `string \| null` | No | Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. |
| `messageStoragePolicy` | `object \| null` | No | A policy constraining the storage of messages published to the topic. |
| `labels` | `Record<string, string> \| null` | No | Optional. See Creating and managing labels. |
| `ingestionDataSourceSettings` | `object \| null` | No | Settings for an ingestion data source on a topic. |
| `kmsKeyName` | `string \| null` | No | Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
| `state` | `string \| null` | No | Output only. An output-only field indicating the state of the topic. |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https\://\{\$universe.dns\_names.final\_documentation\_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. |
| `satisfiesPzs` | `boolean \| null` | No | Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
| `schemaSettings` | `object \| null` | No | Settings for validating messages published against a schema. |

> [accordion] messageTransforms full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   compression?: {
>     compressionAlgorithm?: string | null,
>     compressionMode?: string | null
>   } | null,
>   aiInference?: {
>     endpoint?: string | null,
>     unstructuredInference?: {
>       parameters?: Record<string, any> | null
>     } | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   javascriptUdf?: {
>     code?: string | null,
>     functionName?: string | null
>   } | null,
>   disabled?: boolean | null
> }[] | null
> ```

> [accordion] messageStoragePolicy full type
>
> ```ts theme={null}
> {
>   allowedPersistenceRegions?: string[] | null,
>   enforceInTransit?: boolean | null
> } | null
> ```

> [accordion] ingestionDataSourceSettings full type
>
> ```ts theme={null}
> {
>   confluentCloud?: {
>     bootstrapServer?: string | null,
>     topic?: string | null,
>     identityPoolId?: string | null,
>     gcpServiceAccount?: string | null,
>     state?: string | null,
>     clusterId?: string | null
>   } | null,
>   cloudStorage?: {
>     matchGlob?: string | null,
>     avroFormat?: {
>     } | null,
>     bucket?: string | null,
>     pubsubAvroFormat?: {
>     } | null,
>     minimumObjectCreateTime?: string | null,
>     textFormat?: {
>       delimiter?: string | null
>     } | null,
>     state?: string | null
>   } | null,
>   awsMsk?: {
>     gcpServiceAccount?: string | null,
>     state?: string | null,
>     clusterArn?: string | null,
>     awsRoleArn?: string | null,
>     topic?: string | null
>   } | null,
>   awsKinesis?: {
>     state?: string | null,
>     gcpServiceAccount?: string | null,
>     consumerArn?: string | null,
>     streamArn?: string | null,
>     awsRoleArn?: string | null
>   } | null,
>   platformLogsSettings?: {
>     severity?: string | null
>   } | null,
>   azureEventHubs?: {
>     subscriptionId?: string | null,
>     state?: string | null,
>     clientId?: string | null,
>     resourceGroup?: string | null,
>     eventHub?: string | null,
>     tenantId?: string | null,
>     gcpServiceAccount?: string | null,
>     namespace?: string | null
>   } | null
> } | null
> ```

> [accordion] schemaSettings full type
>
> ```ts theme={null}
> {
>   schema?: string | null,
>   firstRevisionId?: string | null,
>   lastRevisionId?: string | null,
>   encoding?: string | null
> } | null
> ```

***

### topics.publish

`pubsub.topics.publish`

Publish messages to a topic: each message has `data` (base64) and optional `attributes`

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.publish({
	topic: 'projects/demo-project/topics/orders',
	messages: [{
		data: 'eyJvcmRlciI6IDQyfQ==',
		attributes: { source: 'corsair' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `topic` | `string` | Yes | Required. The messages in the request will be published on this topic. Format is `projects/{project}/topics/{topic}`. Format: `projects/<id>/topics/<id>`. |
| `messages` | `object[]` | No | Required. The messages to publish. |

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   publishTime?: string,
>   attributes?: Record<string, string>,
>   messageId?: string,
>   orderingKey?: string,
>   data?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `messageIds` | `string[] \| null` | No | Optional. The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic. |

***

### topics.setIamPolicy

`pubsub.topics.setIamPolicy`

Sets the access control policy on the specified resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.setIamPolicy({
	resource: 'projects/demo-project/topics/gmail-push',
	policy: {
		bindings: [{
			role: 'roles/pubsub.publisher',
			members: ['serviceAccount:gmail-api-push@system.gserviceaccount.com'],
		}],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/topics/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   bindings?: {
>     condition?: {
>       expression?: string,
>       description?: string,
>       title?: string,
>       location?: string
>     },
>     members?: string[],
>     role?: string
>   }[],
>   etag?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null,
>     location?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### topics.snapshots.list

`pubsub.topics.snapshots.list`

Lists the names of the snapshots on this topic. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.snapshots.list({ topic: 'projects/demo-project/topics/orders' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. The value returned by the last `ListTopicSnapshotsResponse`; indicates that this is a continuation of a prior `ListTopicSnapshots` call, and that the system should return the next page of data. |
| `topic` | `string` | Yes | Required. The name of the topic that snapshots are attached to. Format is `projects/{project}/topics/{topic}`. Format: `projects/<id>/topics/<id>`. |
| `pageSize` | `number` | No | Optional. Maximum number of snapshot names to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Optional. If not empty, indicates that there may be more snapshots that match the request; this value should be passed in a new `ListTopicSnapshotsRequest` to get more snapshots. |
| `snapshots` | `string[] \| null` | No | Optional. The names of the snapshots that match the request. |

***

### topics.subscriptions.list

`pubsub.topics.subscriptions.list`

Lists the names of the attached subscriptions on this topic (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.subscriptions.list({ topic: 'projects/demo-project/topics/orders' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. The value returned by the last `ListTopicSubscriptionsResponse`; indicates that this is a continuation of a prior `ListTopicSubscriptions` call, and that the system should return the next page of data. |
| `topic` | `string` | Yes | Required. The name of the topic that subscriptions are attached to. Format is `projects/{project}/topics/{topic}`. Format: `projects/<id>/topics/<id>`. |
| `pageSize` | `number` | No | Optional. Maximum number of subscription names to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscriptions` | `string[] \| null` | No | Optional. The names of subscriptions attached to the topic specified in the request. |
| `nextPageToken` | `string \| null` | No | Optional. If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListTopicSubscriptionsRequest` to get more subscriptions. |

***

### topics.testIamPermissions

`pubsub.topics.testIamPermissions`

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.pubsub.topics.testIamPermissions({
	resource: 'projects/demo-project/topics/orders',
	permissions: ['pubsub.topics.publish'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/topics/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

## Resource Manager

### capabilityConfigs.create

`resourceManager.capabilityConfigs.create`

Creates a CapabilityConfig under a parent Organization, Folder or Project. Creating a CapabilityConfig triggers the creation of a Management Project if one is not supplied

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.capabilityConfigs.create({
	parent: 'projects/demo-project',
	capabilityConfigId: 'config',
	displayName: 'App management',
	types: ['APP_MANAGEMENT'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource under which the CapabilityConfig will be created. Format: `organizations/{organization_id}` or `folders/{folder_id}` or `projects/{project_number}` Format: `projects/<id>`. |
| `capabilityConfigId` | `string` | No | Required. The user-assigned ID for the CapabilityConfig, which will become the final component of the CapabilityConfig's resource name. Must be unique within the parent resource. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `my-capability-config-123` |
| `displayName` | `string` | No | Optional. Human-readable non-unique display name of the CapabilityConfig. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My CapabilityConfig` |
| `types` | `(TYPE_UNSPECIFIED \| APP_MANAGEMENT \| AGENT_MANAGEMENT)[]` | No | Required. The CapabilityConfig types. |
| `name` | `string` | No | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` |
| `boundaries` | `string[]` | No | Optional. The list of Boundaries associated with this CapabilityConfig. Format: `organizations/{organization}/boundaries/{boundary}` or, `folders/{folder}/boundaries/{boundary}` or, `projects/{project}/boundaries/{boundary}` |
| `managementProject` | `string` | No | Optional. Immutable. The Management Project associated with this CapabilityConfig. If not provided during creation, a management project will be automatically created. Cannot be modified after creation. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### capabilityConfigs.delete

`resourceManager.capabilityConfigs.delete`

Deletes the CapabilityConfig identified by the specified `name` (for example, `folders/123456789/capabilityConfigs/my-capability-config`)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.capabilityConfigs.delete({ name: 'projects/demo-project/capabilityConfigs/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the CapabilityConfig to delete. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` Format: `projects/<id>/capabilityConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### capabilityConfigs.get

`resourceManager.capabilityConfigs.get`

Retrieves the CapabilityConfig identified by the specified `name` (for example, `folders/123456789/capabilityConfigs/my-capability-config`)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.capabilityConfigs.get({ name: 'projects/demo-project/capabilityConfigs/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the CapabilityConfig to retrieve. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` Example: `folders/123456789/capabilityConfigs/my-capability-config` Format: `projects/<id>/capabilityConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. Human-readable non-unique display name of the CapabilityConfig. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My CapabilityConfig` |
| `types` | `string[] \| null` | No | Required. The CapabilityConfig types. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the CapabilityConfig. |
| `name` | `string \| null` | No | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` |
| `createTime` | `string \| null` | No | Output only. The creation time of the CapabilityConfig. |
| `boundaries` | `string[] \| null` | No | Optional. The list of Boundaries associated with this CapabilityConfig. Format: `organizations/{organization}/boundaries/{boundary}` or, `folders/{folder}/boundaries/{boundary}` or, `projects/{project}/boundaries/{boundary}` |
| `updateTime` | `string \| null` | No | Output only. The most recent time this CapabilityConfig was modified. |
| `managementProject` | `string \| null` | No | Optional. Immutable. The Management Project associated with this CapabilityConfig. If not provided during creation, a management project will be automatically created. Cannot be modified after creation. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

***

### capabilityConfigs.list

`resourceManager.capabilityConfigs.list`

Lists CapabilityConfigs that are direct children of the specified organization, folder or project resource (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.capabilityConfigs.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of CapabilityConfigs to return in the response. The service may return fewer CapabilityConfigs than requested. If unspecified, at most 100 CapabilityConfigs will be returned. The maximum value is 100; values above 100 will be coerced to 100. |
| `parent` | `string` | Yes | Required. The name of the parent resource whose CapabilityConfigs are being listed. Format: `organizations/{organization_id}` or `folders/{folder_id}` Format: `projects/<id>`. |
| `pageToken` | `string` | No | Optional. A pagination token received from a previous call to `ListCapabilityConfigs` that indicates from where listing should continue. Provide this to retrieve the subsequent page. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `capabilityConfigs` | `object[] \| null` | No | The list of CapabilityConfigs under the parent. This list can be paginated. |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. |

> [accordion] capabilityConfigs full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   types?: string[] | null,
>   state?: string | null,
>   name?: string | null,
>   createTime?: string | null,
>   boundaries?: string[] | null,
>   updateTime?: string | null,
>   managementProject?: string | null,
>   etag?: string | null
> }[] | null
> ```

***

### capabilityConfigs.patch

`resourceManager.capabilityConfigs.patch`

Updates the `display_name`, `types` and `boundaries` of the CapabilityConfig identified by the specified `name` (for example, `folders/123456789/capabilityConfigs/my-capability-config`)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.capabilityConfigs.patch({ name: 'projects/demo-project/capabilityConfigs/config', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` Format: `projects/<id>/capabilityConfigs/<id>`. |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `displayName` | `string` | No | Optional. Human-readable non-unique display name of the CapabilityConfig. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My CapabilityConfig` |
| `types` | `(TYPE_UNSPECIFIED \| APP_MANAGEMENT \| AGENT_MANAGEMENT)[]` | No | Required. The CapabilityConfig types. |
| `body_name` | `string` | No | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` |
| `boundaries` | `string[]` | No | Optional. The list of Boundaries associated with this CapabilityConfig. Format: `organizations/{organization}/boundaries/{boundary}` or, `folders/{folder}/boundaries/{boundary}` or, `projects/{project}/boundaries/{boundary}` |
| `managementProject` | `string` | No | Optional. Immutable. The Management Project associated with this CapabilityConfig. If not provided during creation, a management project will be automatically created. Cannot be modified after creation. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### effectiveTags.list

`resourceManager.effectiveTags.list`

Return a list of effective tags for the given Google Cloud resource, as specified in `parent` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.effectiveTags.list({ parent: '//cloudresourcemanager.googleapis.com/projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of effective tags to return in the response. The server allows a maximum of 300 effective tags to return in a single page. If unspecified, the server will use 100 as the default. |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to `ListEffectiveTags` that indicates from where this listing should continue. |
| `parent` | `string` | No | Required. The full resource name of a resource for which you want to list the effective tags. E.g. "//cloudresourcemanager.googleapis.com/projects/123" |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime. |
| `effectiveTags` | `object[] \| null` | No | A possibly paginated list of effective tags for the specified resource. |

> [accordion] effectiveTags full type
>
> ```ts theme={null}
> {
>   namespacedTagValue?: string | null,
>   tagValue?: string | null,
>   tagKeyParentName?: string | null,
>   inherited?: boolean | null,
>   tagKey?: string | null,
>   namespacedTagKey?: string | null
> }[] | null
> ```

***

### fetchResourceSemantics

`resourceManager.fetchResourceSemantics`

Returns the semantics associated with the specified resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.fetchResourceSemantics({ fullResourceName: '//cloudresourcemanager.googleapis.com/projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fullResourceName` | `string` | No | Required. The full resource name of the GCP resource to retrieve semantics for. Examples: "//compute.googleapis.com/projects/123/zones/us-central1-a/instances/my-instance" "//storage.googleapis.com/projects/\_/buckets/my\_bucket" |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `fullResourceName` | `string \| null` | No | The full resource name for which semantics are returned. Examples: "//compute.googleapis.com/projects/123/zones/us-central1-a/instances/my-instance" "//storage.googleapis.com/projects/\_/buckets/my\_bucket" |
| `semantics` | `Record<string, string> \| null` | No | Map of resource semantics (e.g., `"ENVIRONMENT": "PRODUCTION"`). |

***

### folders.boundaries.create

`resourceManager.folders.boundaries.create`

Creates a Boundary under a parent Folder or Organization. Creating a Boundary triggers the creation of a Management Project if one is not supplied

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.boundaries.create({ parent: 'folders/345678901234', boundaryId: 'prod', displayName: 'Production' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `boundaryId` | `string` | No | Required. The user-assigned ID for the Boundary, which will become the final component of the Boundary's resource name. Must be unique within the parent resource. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `my-boundary-123` |
| `parent` | `string` | Yes | Required. The parent resource under which the Boundary will be created. Format: `organizations/{organization_id}` or `folders/{folder_id}` Format: `folders/<id>`. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `resourceFilter` | `object` | No | Filter to define the criteria for including projects in the Boundary. |
| `name` | `string` | No | Identifier. The unique resource name of the Boundary. Format: - `organizations/{organization_id}/boundaries/{boundary_id}` - `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` |
| `displayName` | `string` | No | Optional. Human-readable display name of the Boundary. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Production Boundary` |

> [accordion] resourceFilter full type
>
> ```ts theme={null}
> {
>   tagFilter?: {
>     tagValue?: string,
>     tagKey?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.boundaries.delete

`resourceManager.folders.boundaries.delete`

Deletes the Boundary identified by the specified `name` (for example, `folders/123456789/boundaries/my-boundary`)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.boundaries.delete({ name: 'folders/345678901234/boundaries/prod' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Boundary to delete. Format: `organizations/{organization_id}/boundaries/{boundary_id}` or `folders/{folder_id}/boundaries/{boundary_id}` Format: `folders/<id>/boundaries/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.boundaries.get

`resourceManager.folders.boundaries.get`

Retrieves the Boundary identified by the specified `name` (for example, `folders/123456789/boundaries/my-boundary`)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.boundaries.get({ name: 'folders/345678901234/boundaries/prod' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Boundary to retrieve. Format: `organizations/{organization_id}/boundaries/{boundary_id}` or `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` Format: `folders/<id>/boundaries/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | Output only. The most recent time this Boundary was modified. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the Boundary. |
| `managementProject` | `string \| null` | No | Output only. The Management Project of the CapabilityConfig this Boundary is associated with. Will be empty if the Boundary is not associated with any CapabilityConfig. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `resourceFilter` | `object \| null` | No | Filter to define the criteria for including projects in the Boundary. |
| `name` | `string \| null` | No | Identifier. The unique resource name of the Boundary. Format: - `organizations/{organization_id}/boundaries/{boundary_id}` - `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` |
| `displayName` | `string \| null` | No | Optional. Human-readable display name of the Boundary. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Production Boundary` |
| `createTime` | `string \| null` | No | Output only. The creation time of the Boundary. |

> [accordion] resourceFilter full type
>
> ```ts theme={null}
> {
>   tagFilter?: {
>     tagValue?: string | null,
>     tagKey?: string | null
>   } | null
> } | null
> ```

***

### folders.boundaries.list

`resourceManager.folders.boundaries.list`

Lists Boundaries that are direct children of the specified organization or folder resource (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.boundaries.list({ parent: 'folders/345678901234' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the parent resource whose Boundaries are being listed. Format: `organizations/{organization_id}` or `folders/{folder_id}` Format: `folders/<id>`. |
| `pageSize` | `number` | No | Optional. The maximum number of Boundaries to return in the response. The service may return fewer Boundaries than requested. If unspecified, at most 100 Boundaries will be returned. The maximum value is 100; values above 100 will be coerced to 100. |
| `pageToken` | `string` | No | Optional. A pagination token received from a previous call to `ListBoundaries` that indicates from where listing should continue. Provide this to retrieve the subsequent page. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. |
| `boundaries` | `object[] \| null` | No | The list of Boundaries under the parent. This list can be paginated. |

> [accordion] boundaries full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   state?: string | null,
>   managementProject?: string | null,
>   etag?: string | null,
>   resourceFilter?: {
>     tagFilter?: {
>       tagValue?: string | null,
>       tagKey?: string | null
>     } | null
>   } | null,
>   name?: string | null,
>   displayName?: string | null,
>   createTime?: string | null
> }[] | null
> ```

***

### folders.boundaries.patch

`resourceManager.folders.boundaries.patch`

Updates the `display_name` and `resource_filter.tag_filter.tag_value` of the Boundary identified by the specified `name` (for example, `folders/123456789/boundaries/my-boundary`)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.boundaries.patch({ name: 'folders/345678901234/boundaries/prod', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `name` | `string` | Yes | Identifier. The unique resource name of the Boundary. Format: - `organizations/{organization_id}/boundaries/{boundary_id}` - `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` Format: `folders/<id>/boundaries/<id>`. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `resourceFilter` | `object` | No | Filter to define the criteria for including projects in the Boundary. |
| `body_name` | `string` | No | Identifier. The unique resource name of the Boundary. Format: - `organizations/{organization_id}/boundaries/{boundary_id}` - `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` |
| `displayName` | `string` | No | Optional. Human-readable display name of the Boundary. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Production Boundary` |

> [accordion] resourceFilter full type
>
> ```ts theme={null}
> {
>   tagFilter?: {
>     tagValue?: string,
>     tagKey?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.capabilities.get

`resourceManager.folders.capabilities.get`

Retrieves the Capability identified by the supplied resource name

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.capabilities.get({ name: 'folders/345678901234/capabilities/app-management' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the capability to get. For example, `folders/123/capabilities/app-management` Format: `folders/<id>/capabilities/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `boolean \| null` | No | Required. The configured value of the capability at the given parent resource. |
| `name` | `string \| null` | No | Immutable. Identifier. The resource name of the capability. Must be in the following form: \* `folders/{folder_id}/capabilities/{capability_name}` For example, `folders/123/capabilities/app-management` Following are the allowed \{capability\_name} values: \* `app-management` |

***

### folders.capabilities.patch

`resourceManager.folders.capabilities.patch`

Updates the Capability

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.capabilities.patch({ name: 'folders/345678901234/capabilities/app-management', updateMask: 'value', value: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. The list of fields to update. Only \[Capability.value] can be updated. |
| `name` | `string` | Yes | Immutable. Identifier. The resource name of the capability. Must be in the following form: \* `folders/{folder_id}/capabilities/{capability_name}` For example, `folders/123/capabilities/app-management` Following are the allowed \{capability\_name} values: \* `app-management` Format: `folders/<id>/capabilities/<id>`. |
| `value` | `boolean` | No | Required. The configured value of the capability at the given parent resource. |
| `body_name` | `string` | No | Immutable. Identifier. The resource name of the capability. Must be in the following form: \* `folders/{folder_id}/capabilities/{capability_name}` For example, `folders/123/capabilities/app-management` Following are the allowed \{capability\_name} values: \* `app-management` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.capabilityConfigs.create

`resourceManager.folders.capabilityConfigs.create`

Creates a CapabilityConfig under a parent Organization, Folder or Project. Creating a CapabilityConfig triggers the creation of a Management Project if one is not supplied

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.capabilityConfigs.create({
	parent: 'folders/345678901234',
	capabilityConfigId: 'config',
	displayName: 'App management',
	types: ['APP_MANAGEMENT'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `capabilityConfigId` | `string` | No | Required. The user-assigned ID for the CapabilityConfig, which will become the final component of the CapabilityConfig's resource name. Must be unique within the parent resource. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `my-capability-config-123` |
| `parent` | `string` | Yes | Required. The parent resource under which the CapabilityConfig will be created. Format: `organizations/{organization_id}` or `folders/{folder_id}` or `projects/{project_number}` Format: `folders/<id>`. |
| `displayName` | `string` | No | Optional. Human-readable non-unique display name of the CapabilityConfig. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My CapabilityConfig` |
| `types` | `(TYPE_UNSPECIFIED \| APP_MANAGEMENT \| AGENT_MANAGEMENT)[]` | No | Required. The CapabilityConfig types. |
| `name` | `string` | No | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` |
| `boundaries` | `string[]` | No | Optional. The list of Boundaries associated with this CapabilityConfig. Format: `organizations/{organization}/boundaries/{boundary}` or, `folders/{folder}/boundaries/{boundary}` or, `projects/{project}/boundaries/{boundary}` |
| `managementProject` | `string` | No | Optional. Immutable. The Management Project associated with this CapabilityConfig. If not provided during creation, a management project will be automatically created. Cannot be modified after creation. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.capabilityConfigs.delete

`resourceManager.folders.capabilityConfigs.delete`

Deletes the CapabilityConfig identified by the specified `name` (for example, `folders/123456789/capabilityConfigs/my-capability-config`)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.capabilityConfigs.delete({ name: 'folders/345678901234/capabilityConfigs/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the CapabilityConfig to delete. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` Format: `folders/<id>/capabilityConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.capabilityConfigs.get

`resourceManager.folders.capabilityConfigs.get`

Retrieves the CapabilityConfig identified by the specified `name` (for example, `folders/123456789/capabilityConfigs/my-capability-config`)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.capabilityConfigs.get({ name: 'folders/345678901234/capabilityConfigs/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the CapabilityConfig to retrieve. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` Example: `folders/123456789/capabilityConfigs/my-capability-config` Format: `folders/<id>/capabilityConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. Human-readable non-unique display name of the CapabilityConfig. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My CapabilityConfig` |
| `types` | `string[] \| null` | No | Required. The CapabilityConfig types. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the CapabilityConfig. |
| `name` | `string \| null` | No | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` |
| `createTime` | `string \| null` | No | Output only. The creation time of the CapabilityConfig. |
| `boundaries` | `string[] \| null` | No | Optional. The list of Boundaries associated with this CapabilityConfig. Format: `organizations/{organization}/boundaries/{boundary}` or, `folders/{folder}/boundaries/{boundary}` or, `projects/{project}/boundaries/{boundary}` |
| `updateTime` | `string \| null` | No | Output only. The most recent time this CapabilityConfig was modified. |
| `managementProject` | `string \| null` | No | Optional. Immutable. The Management Project associated with this CapabilityConfig. If not provided during creation, a management project will be automatically created. Cannot be modified after creation. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

***

### folders.capabilityConfigs.list

`resourceManager.folders.capabilityConfigs.list`

Lists CapabilityConfigs that are direct children of the specified organization, folder or project resource (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.capabilityConfigs.list({ parent: 'folders/345678901234' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the parent resource whose CapabilityConfigs are being listed. Format: `organizations/{organization_id}` or `folders/{folder_id}` Format: `folders/<id>`. |
| `pageToken` | `string` | No | Optional. A pagination token received from a previous call to `ListCapabilityConfigs` that indicates from where listing should continue. Provide this to retrieve the subsequent page. |
| `pageSize` | `number` | No | Optional. The maximum number of CapabilityConfigs to return in the response. The service may return fewer CapabilityConfigs than requested. If unspecified, at most 100 CapabilityConfigs will be returned. The maximum value is 100; values above 100 will be coerced to 100. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `capabilityConfigs` | `object[] \| null` | No | The list of CapabilityConfigs under the parent. This list can be paginated. |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. |

> [accordion] capabilityConfigs full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   types?: string[] | null,
>   state?: string | null,
>   name?: string | null,
>   createTime?: string | null,
>   boundaries?: string[] | null,
>   updateTime?: string | null,
>   managementProject?: string | null,
>   etag?: string | null
> }[] | null
> ```

***

### folders.capabilityConfigs.patch

`resourceManager.folders.capabilityConfigs.patch`

Updates the `display_name`, `types` and `boundaries` of the CapabilityConfig identified by the specified `name` (for example, `folders/123456789/capabilityConfigs/my-capability-config`)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.capabilityConfigs.patch({ name: 'folders/345678901234/capabilityConfigs/config', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` Format: `folders/<id>/capabilityConfigs/<id>`. |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `displayName` | `string` | No | Optional. Human-readable non-unique display name of the CapabilityConfig. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My CapabilityConfig` |
| `types` | `(TYPE_UNSPECIFIED \| APP_MANAGEMENT \| AGENT_MANAGEMENT)[]` | No | Required. The CapabilityConfig types. |
| `body_name` | `string` | No | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` |
| `boundaries` | `string[]` | No | Optional. The list of Boundaries associated with this CapabilityConfig. Format: `organizations/{organization}/boundaries/{boundary}` or, `folders/{folder}/boundaries/{boundary}` or, `projects/{project}/boundaries/{boundary}` |
| `managementProject` | `string` | No | Optional. Immutable. The Management Project associated with this CapabilityConfig. If not provided during creation, a management project will be automatically created. Cannot be modified after creation. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.create

`resourceManager.folders.create`

Creates a folder in the resource hierarchy. Returns an `Operation` which can be used to track the progress of the folder creation workflow

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.create({ parent: 'organizations/123456789012', displayName: 'Engineering' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string` | No | The folder's display name. A folder's display name must be unique amongst its siblings. For example, no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: `\\p{L}\\p{N}?`. |
| `name` | `string` | No | Identifier. The resource name of the folder. Its format is `folders/{folder_id}`, for example: "folders/1234". |
| `parent` | `string` | No | Required. The folder's parent's resource name. Updates to the folder's parent must be performed using MoveFolder. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this folder. Each item in the map must be expressed as " : ". For example: "123/environment" : "production", "123/costCenter" : "marketing" Note: Currently this field is in Preview. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.delete

`resourceManager.folders.delete`

Requests deletion of a folder. The folder is moved into the DELETE\_REQUESTED state immediately, and is deleted approximately 30 days later

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.delete({ name: 'folders/345678901234' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the folder to be deleted. Must be of the form `folders/{folder_id}`. Format: `folders/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.get

`resourceManager.folders.get`

Retrieves a folder identified by the supplied resource name. Valid folder resource names have the format `folders/{folder_id}` (for example, `folders/1234`)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.get({ name: 'folders/345678901234' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the folder to retrieve. Must be of the form `folders/{folder_id}`. Format: `folders/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The folder's display name. A folder's display name must be unique amongst its siblings. For example, no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: `\\p{L}\\p{N}?`. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the folder. Updates to the state must be performed using DeleteFolder and UndeleteFolder. |
| `name` | `string \| null` | No | Identifier. The resource name of the folder. Its format is `folders/{folder_id}`, for example: "folders/1234". |
| `updateTime` | `string \| null` | No | Output only. Timestamp when the folder was last modified. |
| `managementProject` | `string \| null` | No | Output only. Management Project associated with this folder (if app-management capability is enabled). Example: `projects/google-mp-123` OUTPUT ONLY. |
| `etag` | `string \| null` | No | Output only. A checksum computed by the server based on the current value of the folder resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `configuredCapabilities` | `string[] \| null` | No | Output only. Optional capabilities configured for this folder (via UpdateCapability API). Example: `folders/123/capabilities/app-management`. |
| `parent` | `string \| null` | No | Required. The folder's parent's resource name. Updates to the folder's parent must be performed using MoveFolder. |
| `createTime` | `string \| null` | No | Output only. Timestamp when the folder was created. |
| `deleteTime` | `string \| null` | No | Output only. Timestamp when the folder was requested to be deleted. |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this folder. Each item in the map must be expressed as " : ". For example: "123/environment" : "production", "123/costCenter" : "marketing" Note: Currently this field is in Preview. |

***

### folders.getBoundaryConfig

`resourceManager.folders.getBoundaryConfig`

Retrieves the BoundaryConfig identified by the specified `name` (for example, `folders/123456789/boundaryConfig`)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.getBoundaryConfig({ name: 'folders/345678901234/boundaryConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the BoundaryConfig to retrieve. Format: `organizations/{organization}/boundaryConfig` or `folders/{folder}/boundaryConfig` Example: `folders/123456789/boundaryConfig` Format: `folders/<id>/boundaryConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | Output only. The most recent time this BoundaryConfig was modified. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
| `name` | `string \| null` | No | Identifier. The unique resource name of the BoundaryConfig. Format: - `organizations/{organization}/boundaryConfig` - `folders/{folder}/boundaryConfig` Example: `folders/123456789/boundaryConfig` |
| `tagKey` | `string \| null` | No | Optional. The namespaced name of the tag key. Format: `{parent_id}/{tag_key_short_name}` Example: `123456789012/env` (where 123456789012 is the organization ID). |

***

### folders.getIamPolicy

`resourceManager.folders.getIamPolicy`

Gets the access control policy for a folder. The returned policy may be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.getIamPolicy({ resource: 'folders/345678901234' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `folders/<id>`. |
| `options` | `object` | No | Encapsulates settings provided to GetIamPolicy. |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   requestedPolicyVersion?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### folders.list

`resourceManager.folders.list`

Lists the folders that are direct descendants of supplied parent resource. `list()` provides a strongly consistent view of the folders underneath the specified parent resource. `list()` returns folders sorted based upon the (ascending) lexical ordering of their display\_name. The caller must have `resourcemanager.folders.list` permission on the identified parent (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.list({ parent: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of folders to return in the response. The server can return fewer folders than requested. If unspecified, server picks an appropriate default. |
| `parent` | `string` | No | Required. The name of the parent resource whose folders are being listed. Only children of this parent resource are listed; descendants are not listed. If the parent is a folder, use the value `folders/{folder_id}`. If the parent is an organization, use the value `organizations/{org_id}`. Access to this method is controlled by checking the `resourcemanager.folders.list` permission on the `parent`. |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to `ListFolders` that indicates where this listing should continue from. |
| `showDeleted` | `boolean` | No | Optional. Controls whether folders in the DELETE\_REQUESTED state should be returned. Defaults to false. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `folders` | `object[] \| null` | No | A possibly paginated list of folders that are direct descendants of the specified parent resource. |
| `nextPageToken` | `string \| null` | No | A pagination token returned from a previous call to `ListFolders` that indicates from where listing should continue. |

> [accordion] folders full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   state?: string | null,
>   name?: string | null,
>   updateTime?: string | null,
>   managementProject?: string | null,
>   etag?: string | null,
>   configuredCapabilities?: string[] | null,
>   parent?: string | null,
>   createTime?: string | null,
>   deleteTime?: string | null,
>   tags?: Record<string, string> | null
> }[] | null
> ```

***

### folders.move

`resourceManager.folders.move`

Moves a folder under a new resource parent. Returns an `Operation` which can be used to track the progress of the folder move workflow

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.move({ name: 'folders/345678901234', destinationParent: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the Folder to move. Must be of the form folders/\{folder\_id} Format: `folders/<id>`. |
| `destinationParent` | `string` | No | Required. The resource name of the folder or organization which should be the folder's new parent. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.patch

`resourceManager.folders.patch`

Updates a folder, changing its `display_name`. Changes to the folder `display_name` will be rejected if they violate either the `display_name` formatting rules or the naming constraints described in the CreateFolder documentation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.patch({ name: 'folders/345678901234', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Required. Fields to be updated. Only the `display_name` can be updated. |
| `name` | `string` | Yes | Identifier. The resource name of the folder. Its format is `folders/{folder_id}`, for example: "folders/1234". Format: `folders/<id>`. |
| `displayName` | `string` | No | The folder's display name. A folder's display name must be unique amongst its siblings. For example, no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: `\\p{L}\\p{N}?`. |
| `body_name` | `string` | No | Identifier. The resource name of the folder. Its format is `folders/{folder_id}`, for example: "folders/1234". |
| `parent` | `string` | No | Required. The folder's parent's resource name. Updates to the folder's parent must be performed using MoveFolder. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this folder. Each item in the map must be expressed as " : ". For example: "123/environment" : "production", "123/costCenter" : "marketing" Note: Currently this field is in Preview. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.search

`resourceManager.folders.search`

Searches for folders that match specific filter criteria. `search()` provides an eventually consistent view of the folders a user has access to which meet the specified filter criteria. This will only return folders on which the caller has the permission `resourcemanager.folders.get` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to `SearchFolders` that indicates from where search should continue. |
| `query` | `string` | No | Optional. Search criteria used to select the folders to return. If no search criteria is specified then all accessible folders will be returned. Query expressions can be used to restrict results based upon displayName, state and parent, where the operators `=` (`:`) `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. The `displayName` field in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. |
| `pageSize` | `number` | No | Optional. The maximum number of folders to return in the response. The server can return fewer folders than requested. If unspecified, server picks an appropriate default. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `folders` | `object[] \| null` | No | A possibly paginated folder search results. the specified parent resource. |
| `nextPageToken` | `string \| null` | No | A pagination token returned from a previous call to `SearchFolders` that indicates from where searching should continue. |

> [accordion] folders full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   state?: string | null,
>   name?: string | null,
>   updateTime?: string | null,
>   managementProject?: string | null,
>   etag?: string | null,
>   configuredCapabilities?: string[] | null,
>   parent?: string | null,
>   createTime?: string | null,
>   deleteTime?: string | null,
>   tags?: Record<string, string> | null
> }[] | null
> ```

***

### folders.setIamPolicy

`resourceManager.folders.setIamPolicy`

Sets the access control policy on a folder, replacing any existing policy. The `resource` field should be the folder's resource name, for example: "folders/1234"

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.setIamPolicy({
	resource: 'folders/345678901234',
	policy: {
		bindings: [{
			role: 'roles/resourcemanager.folderViewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `folders/<id>`. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[],
>   bindings?: {
>     role?: string,
>     condition?: {
>       location?: string,
>       expression?: string,
>       description?: string,
>       title?: string
>     },
>     members?: string[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### folders.testIamPermissions

`resourceManager.folders.testIamPermissions`

Returns permissions that a caller has on the specified folder. The `resource` field should be the folder's resource name, for example: "folders/1234"

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.testIamPermissions({
	resource: 'folders/345678901234',
	permissions: ['resourcemanager.folders.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `folders/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### folders.undelete

`resourceManager.folders.undelete`

Cancels the deletion request for a folder. This method may be called on a folder in any state

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.undelete({ name: 'folders/345678901234' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the folder to undelete. Must be of the form `folders/{folder_id}`. Format: `folders/<id>`. |
| `body` | `object` | No | The UndeleteFolder request message. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### folders.updateBoundaryConfig

`resourceManager.folders.updateBoundaryConfig`

Updates the BoundaryConfig identified by the specified `name` (for example, `folders/123456789/boundaryConfig`)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.folders.updateBoundaryConfig({ name: 'folders/345678901234/boundaryConfig', updateMask: 'tagKey', tagKey: 'tagKeys/281476203380001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The unique resource name of the BoundaryConfig. Format: - `organizations/{organization}/boundaryConfig` - `folders/{folder}/boundaryConfig` Example: `folders/123456789/boundaryConfig` Format: `folders/<id>/boundaryConfig`. |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
| `body_name` | `string` | No | Identifier. The unique resource name of the BoundaryConfig. Format: - `organizations/{organization}/boundaryConfig` - `folders/{folder}/boundaryConfig` Example: `folders/123456789/boundaryConfig` |
| `tagKey` | `string` | No | Optional. The namespaced name of the tag key. Format: `{parent_id}/{tag_key_short_name}` Example: `123456789012/env` (where 123456789012 is the organization ID). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### liens.create

`resourceManager.liens.create`

Creates a Lien which applies to the resource denoted by the `parent` field. Callers of this method will require permission on the `parent` resource

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.liens.create({
	parent: 'projects/demo-project',
	reason: 'Production project',
	origin: 'ops',
	restrictions: ['resourcemanager.projects.delete'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `createTime` | `string` | No | The creation time of this Lien. |
| `reason` | `string` | No | Concise user-visible strings indicating why an action cannot be performed on a resource. Maximum length of 200 characters. Example: 'Holds production API key' |
| `restrictions` | `string[]` | No | The types of operations which should be blocked as a result of this Lien. Each value should correspond to an IAM permission. The server will validate the permissions against those for which Liens are supported. An empty list is meaningless and will be rejected. Example: \['resourcemanager.projects.delete'] |
| `name` | `string` | No | A system-generated unique identifier for this Lien. Example: `liens/1234abcd` |
| `parent` | `string` | No | A reference to the resource this Lien is attached to. The server will validate the parent against those for which Liens are supported. Example: `projects/1234` |
| `origin` | `string` | No | A stable, user-visible/meaningful string identifying the origin of the Lien, intended to be inspected programmatically. Maximum length of 200 characters. Example: 'compute.googleapis.com' |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createTime` | `string \| null` | No | The creation time of this Lien. |
| `reason` | `string \| null` | No | Concise user-visible strings indicating why an action cannot be performed on a resource. Maximum length of 200 characters. Example: 'Holds production API key' |
| `restrictions` | `string[] \| null` | No | The types of operations which should be blocked as a result of this Lien. Each value should correspond to an IAM permission. The server will validate the permissions against those for which Liens are supported. An empty list is meaningless and will be rejected. Example: \['resourcemanager.projects.delete'] |
| `name` | `string \| null` | No | A system-generated unique identifier for this Lien. Example: `liens/1234abcd` |
| `parent` | `string \| null` | No | A reference to the resource this Lien is attached to. The server will validate the parent against those for which Liens are supported. Example: `projects/1234` |
| `origin` | `string \| null` | No | A stable, user-visible/meaningful string identifying the origin of the Lien, intended to be inspected programmatically. Maximum length of 200 characters. Example: 'compute.googleapis.com' |

***

### liens.delete

`resourceManager.liens.delete`

Deletes a Lien by `name`. Callers of this method will require permission on the `parent` resource

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.liens.delete({ name: 'liens/p1-lien' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name/identifier of the Lien to delete. Format: `liens/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### liens.get

`resourceManager.liens.get`

Retrieves a Lien by `name`. Callers of this method will require permission on the `parent` resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.liens.get({ name: 'liens/p1-lien' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name/identifier of the Lien. Format: `liens/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createTime` | `string \| null` | No | The creation time of this Lien. |
| `reason` | `string \| null` | No | Concise user-visible strings indicating why an action cannot be performed on a resource. Maximum length of 200 characters. Example: 'Holds production API key' |
| `restrictions` | `string[] \| null` | No | The types of operations which should be blocked as a result of this Lien. Each value should correspond to an IAM permission. The server will validate the permissions against those for which Liens are supported. An empty list is meaningless and will be rejected. Example: \['resourcemanager.projects.delete'] |
| `name` | `string \| null` | No | A system-generated unique identifier for this Lien. Example: `liens/1234abcd` |
| `parent` | `string \| null` | No | A reference to the resource this Lien is attached to. The server will validate the parent against those for which Liens are supported. Example: `projects/1234` |
| `origin` | `string \| null` | No | A stable, user-visible/meaningful string identifying the origin of the Lien, intended to be inspected programmatically. Maximum length of 200 characters. Example: 'compute.googleapis.com' |

***

### liens.list

`resourceManager.liens.list`

Lists all Liens applied to the `parent` resource. Callers of this method will require permission on the `parent` resource (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.liens.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | No | Required. The name of the resource to list all attached Liens. For example, `projects/1234`. (google.api.field\_policy).resource\_type annotation is not set since the parent depends on the meta api implementation. This field could be a project or other sub project resources. |
| `pageSize` | `number` | No | The maximum number of items to return. This is a suggestion for the server. The server can return fewer liens than requested. If unspecified, server picks an appropriate default. |
| `pageToken` | `string` | No | The `next_page_token` value returned from a previous List request, if any. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `liens` | `object[] \| null` | No | A list of Liens. |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |

> [accordion] liens full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   reason?: string | null,
>   restrictions?: string[] | null,
>   name?: string | null,
>   parent?: string | null,
>   origin?: string | null
> }[] | null
> ```

***

### locations.effectiveTagBindingCollections.get

`resourceManager.locations.effectiveTagBindingCollections.get`

Returns effective tag bindings on a GCP resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.locations.effectiveTagBindingCollections.get({ name: 'locations/global/effectiveTagBindingCollections/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the EffectiveTagBindingCollection in format: `locations/{location}/effectiveTagBindingCollections/{encoded-full-resource-name}` where the encoded-full-resource-name is the UTF-8 encoded name of the resource the TagBindings are bound to. E.g. "locations/global/effectiveTagBindingCollections/%2f%2fcloudresourcemanager.googleapis.com%2fprojects%2f123" Format: `locations/<id>/effectiveTagBindingCollections/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `fullResourceName` | `string \| null` | No | The full resource name of the resource the TagBindings are bound to. E.g. `//cloudresourcemanager.googleapis.com/projects/123` |
| `effectiveTags` | `Record<string, string> \| null` | No | Tag keys/values effectively bound to this resource, specified in namespaced format. For example: "123/environment": "production" |
| `name` | `string \| null` | No | Identifier. The name of the EffectiveTagBindingCollection, following the convention: `locations/{location}/effectiveTagBindingCollections/{encoded-full-resource-name}` where the encoded-full-resource-name is the UTF-8 encoded name of the GCP resource the TagBindings are bound to. E.g. "locations/global/effectiveTagBindingCollections/%2f%2fcloudresourcemanager.googleapis.com%2fprojects%2f123" |

***

### locations.tagBindingCollections.get

`resourceManager.locations.tagBindingCollections.get`

Returns tag bindings directly attached to a GCP resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.locations.tagBindingCollections.get({ name: 'locations/global/tagBindingCollections/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the TagBindingCollection in format: `locations/{location}/tagBindingCollections/{encoded-full-resource-name}` where the enoded-full-resource-name is the UTF-8 encoded name of the resource the TagBindings are bound to. E.g. "locations/global/tagBindingCollections/%2f%2fcloudresourcemanager.googleapis.com%2fprojects%2f123" Format: `locations/<id>/tagBindingCollections/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The name of the TagBindingCollection, following the convention: `locations/{location}/tagBindingCollections/{encoded-full-resource-name}` where the encoded-full-resource-name is the UTF-8 encoded name of the GCP resource the TagBindings are bound to. "locations/global/tagBindingCollections/%2f%2fcloudresourcemanager.googleapis.com%2fprojects%2f123" |
| `etag` | `string \| null` | No | Optional. A checksum based on the current bindings which can be passed to prevent race conditions. This field is always set in server responses. |
| `tags` | `Record<string, string> \| null` | No | Tag keys/values directly bound to this resource, specified in namespaced format. For example: "123/environment": "production" |
| `fullResourceName` | `string \| null` | No | The full resource name of the resource the TagBindings are bound to. E.g. `//cloudresourcemanager.googleapis.com/projects/123` |

***

### locations.tagBindingCollections.patch

`resourceManager.locations.tagBindingCollections.patch`

Updates tag bindings directly attached to a GCP resource. Update\_mask can be kept empty or "\*"

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.locations.tagBindingCollections.patch({
	name: 'locations/global/tagBindingCollections/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123456789012',
	updateMask: 'tags',
	tags: { '123456789012/env': 'prod' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. An update mask to selectively update fields. |
| `name` | `string` | Yes | Identifier. The name of the TagBindingCollection, following the convention: `locations/{location}/tagBindingCollections/{encoded-full-resource-name}` where the encoded-full-resource-name is the UTF-8 encoded name of the GCP resource the TagBindings are bound to. "locations/global/tagBindingCollections/%2f%2fcloudresourcemanager.googleapis.com%2fprojects%2f123" Format: `locations/<id>/tagBindingCollections/<id>`. |
| `body_name` | `string` | No | Identifier. The name of the TagBindingCollection, following the convention: `locations/{location}/tagBindingCollections/{encoded-full-resource-name}` where the encoded-full-resource-name is the UTF-8 encoded name of the GCP resource the TagBindings are bound to. "locations/global/tagBindingCollections/%2f%2fcloudresourcemanager.googleapis.com%2fprojects%2f123" |
| `etag` | `string` | No | Optional. A checksum based on the current bindings which can be passed to prevent race conditions. This field is always set in server responses. |
| `tags` | `Record<string, string>` | No | Tag keys/values directly bound to this resource, specified in namespaced format. For example: "123/environment": "production" |
| `fullResourceName` | `string` | No | The full resource name of the resource the TagBindings are bound to. E.g. `//cloudresourcemanager.googleapis.com/projects/123` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### operations.get

`resourceManager.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.operations.get({ name: 'operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `operations/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### organizations.boundaries.create

`resourceManager.organizations.boundaries.create`

Creates a Boundary under a parent Folder or Organization. Creating a Boundary triggers the creation of a Management Project if one is not supplied

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.boundaries.create({ parent: 'organizations/123456789012', boundaryId: 'prod', displayName: 'Production' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource under which the Boundary will be created. Format: `organizations/{organization_id}` or `folders/{folder_id}` Format: `organizations/<id>`. |
| `boundaryId` | `string` | No | Required. The user-assigned ID for the Boundary, which will become the final component of the Boundary's resource name. Must be unique within the parent resource. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `my-boundary-123` |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `resourceFilter` | `object` | No | Filter to define the criteria for including projects in the Boundary. |
| `name` | `string` | No | Identifier. The unique resource name of the Boundary. Format: - `organizations/{organization_id}/boundaries/{boundary_id}` - `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` |
| `displayName` | `string` | No | Optional. Human-readable display name of the Boundary. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Production Boundary` |

> [accordion] resourceFilter full type
>
> ```ts theme={null}
> {
>   tagFilter?: {
>     tagValue?: string,
>     tagKey?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### organizations.boundaries.delete

`resourceManager.organizations.boundaries.delete`

Deletes the Boundary identified by the specified `name` (for example, `folders/123456789/boundaries/my-boundary`)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.boundaries.delete({ name: 'organizations/123456789012/boundaries/prod' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Boundary to delete. Format: `organizations/{organization_id}/boundaries/{boundary_id}` or `folders/{folder_id}/boundaries/{boundary_id}` Format: `organizations/<id>/boundaries/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### organizations.boundaries.get

`resourceManager.organizations.boundaries.get`

Retrieves the Boundary identified by the specified `name` (for example, `folders/123456789/boundaries/my-boundary`)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.boundaries.get({ name: 'organizations/123456789012/boundaries/prod' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Boundary to retrieve. Format: `organizations/{organization_id}/boundaries/{boundary_id}` or `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` Format: `organizations/<id>/boundaries/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | Output only. The most recent time this Boundary was modified. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the Boundary. |
| `managementProject` | `string \| null` | No | Output only. The Management Project of the CapabilityConfig this Boundary is associated with. Will be empty if the Boundary is not associated with any CapabilityConfig. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `resourceFilter` | `object \| null` | No | Filter to define the criteria for including projects in the Boundary. |
| `name` | `string \| null` | No | Identifier. The unique resource name of the Boundary. Format: - `organizations/{organization_id}/boundaries/{boundary_id}` - `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` |
| `displayName` | `string \| null` | No | Optional. Human-readable display name of the Boundary. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Production Boundary` |
| `createTime` | `string \| null` | No | Output only. The creation time of the Boundary. |

> [accordion] resourceFilter full type
>
> ```ts theme={null}
> {
>   tagFilter?: {
>     tagValue?: string | null,
>     tagKey?: string | null
>   } | null
> } | null
> ```

***

### organizations.boundaries.list

`resourceManager.organizations.boundaries.list`

Lists Boundaries that are direct children of the specified organization or folder resource (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.boundaries.list({ parent: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. A pagination token received from a previous call to `ListBoundaries` that indicates from where listing should continue. Provide this to retrieve the subsequent page. |
| `pageSize` | `number` | No | Optional. The maximum number of Boundaries to return in the response. The service may return fewer Boundaries than requested. If unspecified, at most 100 Boundaries will be returned. The maximum value is 100; values above 100 will be coerced to 100. |
| `parent` | `string` | Yes | Required. The name of the parent resource whose Boundaries are being listed. Format: `organizations/{organization_id}` or `folders/{folder_id}` Format: `organizations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. |
| `boundaries` | `object[] \| null` | No | The list of Boundaries under the parent. This list can be paginated. |

> [accordion] boundaries full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   state?: string | null,
>   managementProject?: string | null,
>   etag?: string | null,
>   resourceFilter?: {
>     tagFilter?: {
>       tagValue?: string | null,
>       tagKey?: string | null
>     } | null
>   } | null,
>   name?: string | null,
>   displayName?: string | null,
>   createTime?: string | null
> }[] | null
> ```

***

### organizations.boundaries.patch

`resourceManager.organizations.boundaries.patch`

Updates the `display_name` and `resource_filter.tag_filter.tag_value` of the Boundary identified by the specified `name` (for example, `folders/123456789/boundaries/my-boundary`)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.boundaries.patch({ name: 'organizations/123456789012/boundaries/prod', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The unique resource name of the Boundary. Format: - `organizations/{organization_id}/boundaries/{boundary_id}` - `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` Format: `organizations/<id>/boundaries/<id>`. |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `resourceFilter` | `object` | No | Filter to define the criteria for including projects in the Boundary. |
| `body_name` | `string` | No | Identifier. The unique resource name of the Boundary. Format: - `organizations/{organization_id}/boundaries/{boundary_id}` - `folders/{folder_id}/boundaries/{boundary_id}` Example: `folders/123456789/boundaries/my-boundary` |
| `displayName` | `string` | No | Optional. Human-readable display name of the Boundary. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Production Boundary` |

> [accordion] resourceFilter full type
>
> ```ts theme={null}
> {
>   tagFilter?: {
>     tagValue?: string,
>     tagKey?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### organizations.capabilityConfigs.create

`resourceManager.organizations.capabilityConfigs.create`

Creates a CapabilityConfig under a parent Organization, Folder or Project. Creating a CapabilityConfig triggers the creation of a Management Project if one is not supplied

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.capabilityConfigs.create({
	parent: 'organizations/123456789012',
	capabilityConfigId: 'config',
	displayName: 'App management',
	types: ['APP_MANAGEMENT'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `capabilityConfigId` | `string` | No | Required. The user-assigned ID for the CapabilityConfig, which will become the final component of the CapabilityConfig's resource name. Must be unique within the parent resource. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `my-capability-config-123` |
| `parent` | `string` | Yes | Required. The parent resource under which the CapabilityConfig will be created. Format: `organizations/{organization_id}` or `folders/{folder_id}` or `projects/{project_number}` Format: `organizations/<id>`. |
| `displayName` | `string` | No | Optional. Human-readable non-unique display name of the CapabilityConfig. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My CapabilityConfig` |
| `types` | `(TYPE_UNSPECIFIED \| APP_MANAGEMENT \| AGENT_MANAGEMENT)[]` | No | Required. The CapabilityConfig types. |
| `name` | `string` | No | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` |
| `boundaries` | `string[]` | No | Optional. The list of Boundaries associated with this CapabilityConfig. Format: `organizations/{organization}/boundaries/{boundary}` or, `folders/{folder}/boundaries/{boundary}` or, `projects/{project}/boundaries/{boundary}` |
| `managementProject` | `string` | No | Optional. Immutable. The Management Project associated with this CapabilityConfig. If not provided during creation, a management project will be automatically created. Cannot be modified after creation. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### organizations.capabilityConfigs.delete

`resourceManager.organizations.capabilityConfigs.delete`

Deletes the CapabilityConfig identified by the specified `name` (for example, `folders/123456789/capabilityConfigs/my-capability-config`)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.capabilityConfigs.delete({ name: 'organizations/123456789012/capabilityConfigs/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the CapabilityConfig to delete. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` Format: `organizations/<id>/capabilityConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### organizations.capabilityConfigs.get

`resourceManager.organizations.capabilityConfigs.get`

Retrieves the CapabilityConfig identified by the specified `name` (for example, `folders/123456789/capabilityConfigs/my-capability-config`)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.capabilityConfigs.get({ name: 'organizations/123456789012/capabilityConfigs/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the CapabilityConfig to retrieve. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` Example: `folders/123456789/capabilityConfigs/my-capability-config` Format: `organizations/<id>/capabilityConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Optional. Human-readable non-unique display name of the CapabilityConfig. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My CapabilityConfig` |
| `types` | `string[] \| null` | No | Required. The CapabilityConfig types. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the CapabilityConfig. |
| `name` | `string \| null` | No | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` |
| `createTime` | `string \| null` | No | Output only. The creation time of the CapabilityConfig. |
| `boundaries` | `string[] \| null` | No | Optional. The list of Boundaries associated with this CapabilityConfig. Format: `organizations/{organization}/boundaries/{boundary}` or, `folders/{folder}/boundaries/{boundary}` or, `projects/{project}/boundaries/{boundary}` |
| `updateTime` | `string \| null` | No | Output only. The most recent time this CapabilityConfig was modified. |
| `managementProject` | `string \| null` | No | Optional. Immutable. The Management Project associated with this CapabilityConfig. If not provided during creation, a management project will be automatically created. Cannot be modified after creation. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

***

### organizations.capabilityConfigs.list

`resourceManager.organizations.capabilityConfigs.list`

Lists CapabilityConfigs that are direct children of the specified organization, folder or project resource (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.capabilityConfigs.list({ parent: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of CapabilityConfigs to return in the response. The service may return fewer CapabilityConfigs than requested. If unspecified, at most 100 CapabilityConfigs will be returned. The maximum value is 100; values above 100 will be coerced to 100. |
| `pageToken` | `string` | No | Optional. A pagination token received from a previous call to `ListCapabilityConfigs` that indicates from where listing should continue. Provide this to retrieve the subsequent page. |
| `parent` | `string` | Yes | Required. The name of the parent resource whose CapabilityConfigs are being listed. Format: `organizations/{organization_id}` or `folders/{folder_id}` Format: `organizations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `capabilityConfigs` | `object[] \| null` | No | The list of CapabilityConfigs under the parent. This list can be paginated. |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. |

> [accordion] capabilityConfigs full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   types?: string[] | null,
>   state?: string | null,
>   name?: string | null,
>   createTime?: string | null,
>   boundaries?: string[] | null,
>   updateTime?: string | null,
>   managementProject?: string | null,
>   etag?: string | null
> }[] | null
> ```

***

### organizations.capabilityConfigs.patch

`resourceManager.organizations.capabilityConfigs.patch`

Updates the `display_name`, `types` and `boundaries` of the CapabilityConfig identified by the specified `name` (for example, `folders/123456789/capabilityConfigs/my-capability-config`)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.capabilityConfigs.patch({ name: 'organizations/123456789012/capabilityConfigs/config', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` Format: `organizations/<id>/capabilityConfigs/<id>`. |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `displayName` | `string` | No | Optional. Human-readable non-unique display name of the CapabilityConfig. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My CapabilityConfig` |
| `types` | `(TYPE_UNSPECIFIED \| APP_MANAGEMENT \| AGENT_MANAGEMENT)[]` | No | Required. The CapabilityConfig types. |
| `body_name` | `string` | No | Identifier. The unique resource name of the CapabilityConfig. Format: `organizations/{organization}/capabilityConfigs/{capabilityConfig}` or, `folders/{folder}/capabilityConfigs/{capabilityConfig}` or, `projects/{project}/capabilityConfigs/{capabilityConfig}` |
| `boundaries` | `string[]` | No | Optional. The list of Boundaries associated with this CapabilityConfig. Format: `organizations/{organization}/boundaries/{boundary}` or, `folders/{folder}/boundaries/{boundary}` or, `projects/{project}/boundaries/{boundary}` |
| `managementProject` | `string` | No | Optional. Immutable. The Management Project associated with this CapabilityConfig. If not provided during creation, a management project will be automatically created. Cannot be modified after creation. Format: `projects/{project_number}` Example: `projects/123456789012` |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### organizations.get

`resourceManager.organizations.get`

Fetches an organization resource identified by the specified resource name

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.get({ name: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/\[organizationId]". For example, "organizations/1234". Format: `organizations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createTime` | `string \| null` | No | Output only. Timestamp when the Organization was created. |
| `directoryCustomerId` | `string \| null` | No | Immutable. The G Suite / Workspace customer id used in the Directory API. |
| `displayName` | `string \| null` | No | Output only. A human-readable string that refers to the organization in the Google Cloud Console. This string is set by the server and cannot be changed. The string will be set to the primary domain (for example, "google.com") of the Google Workspace customer that owns the organization. |
| `state` | `string \| null` | No | Output only. The organization's current lifecycle state. |
| `etag` | `string \| null` | No | Output only. A checksum computed by the server based on the current value of the Organization resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `updateTime` | `string \| null` | No | Output only. Timestamp when the Organization was last modified. |
| `name` | `string \| null` | No | Output only. The resource name of the organization. This is the organization's relative path in the API. Its format is "organizations/\[organization\_id]". For example, "organizations/1234". |
| `deleteTime` | `string \| null` | No | Output only. Timestamp when the Organization was requested for deletion. |

***

### organizations.getBoundaryConfig

`resourceManager.organizations.getBoundaryConfig`

Retrieves the BoundaryConfig identified by the specified `name` (for example, `folders/123456789/boundaryConfig`)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.getBoundaryConfig({ name: 'organizations/123456789012/boundaryConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the BoundaryConfig to retrieve. Format: `organizations/{organization}/boundaryConfig` or `folders/{folder}/boundaryConfig` Example: `folders/123456789/boundaryConfig` Format: `organizations/<id>/boundaryConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | Output only. The most recent time this BoundaryConfig was modified. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
| `name` | `string \| null` | No | Identifier. The unique resource name of the BoundaryConfig. Format: - `organizations/{organization}/boundaryConfig` - `folders/{folder}/boundaryConfig` Example: `folders/123456789/boundaryConfig` |
| `tagKey` | `string \| null` | No | Optional. The namespaced name of the tag key. Format: `{parent_id}/{tag_key_short_name}` Example: `123456789012/env` (where 123456789012 is the organization ID). |

***

### organizations.getIamPolicy

`resourceManager.organizations.getIamPolicy`

Gets the access control policy for an organization resource. The policy may be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.getIamPolicy({ resource: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `organizations/<id>`. |
| `options` | `object` | No | Encapsulates settings provided to GetIamPolicy. |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   requestedPolicyVersion?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### organizations.search

`resourceManager.organizations.search`

Searches organization resources that are visible to the user and satisfy the specified filter. This method returns organizations in an unspecified order (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | No | Optional. An optional query string used to filter the Organizations to return in the response. Query rules are case-insensitive. `\| Field \| Description \| \|------------------\|--------------------------------------------\| \| directoryCustomerId, owner.directoryCustomerId \| Filters by directory customer id. \| \| domain \| Filters by domain. \|` Organizations may be queried by `directoryCustomerId` or by `domain`, where the domain is a G Suite domain, for example: \* Query `directorycustomerid:123456789` returns Organization resources with `owner.directory_customer_id` equal to `123456789`. |
| `pageSize` | `number` | No | Optional. The maximum number of organizations to return in the response. The server can return fewer organizations than requested. If unspecified, server picks an appropriate default. |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to `SearchOrganizations` that indicates from where listing should continue. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `organizations` | `object[] \| null` | No | The list of Organizations that matched the search query, possibly paginated. |
| `nextPageToken` | `string \| null` | No | A pagination token to be used to retrieve the next page of results. If the result is too large to fit within the page size specified in the request, this field will be set with a token that can be used to fetch the next page of results. If this field is empty, it indicates that this response contains the last page of results. |

> [accordion] organizations full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   directoryCustomerId?: string | null,
>   displayName?: string | null,
>   state?: string | null,
>   etag?: string | null,
>   updateTime?: string | null,
>   name?: string | null,
>   deleteTime?: string | null
> }[] | null
> ```

***

### organizations.setIamPolicy

`resourceManager.organizations.setIamPolicy`

Sets the access control policy on an organization resource. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.setIamPolicy({
	resource: 'organizations/123456789012',
	policy: {
		bindings: [{
			role: 'roles/resourcemanager.organizationViewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `organizations/<id>`. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[],
>   bindings?: {
>     role?: string,
>     condition?: {
>       location?: string,
>       expression?: string,
>       description?: string,
>       title?: string
>     },
>     members?: string[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### organizations.testIamPermissions

`resourceManager.organizations.testIamPermissions`

Returns the permissions that a caller has on the specified organization. The `resource` field should be the organization's resource name, for example: "organizations/123"

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.testIamPermissions({
	resource: 'organizations/123456789012',
	permissions: ['resourcemanager.organizations.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `organizations/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### organizations.updateBoundaryConfig

`resourceManager.organizations.updateBoundaryConfig`

Updates the BoundaryConfig identified by the specified `name` (for example, `folders/123456789/boundaryConfig`)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.organizations.updateBoundaryConfig({ name: 'organizations/123456789012/boundaryConfig', updateMask: 'tagKey', tagKey: 'tagKeys/281476203380001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The unique resource name of the BoundaryConfig. Format: - `organizations/{organization}/boundaryConfig` - `folders/{folder}/boundaryConfig` Example: `folders/123456789/boundaryConfig` Format: `organizations/<id>/boundaryConfig`. |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
| `body_name` | `string` | No | Identifier. The unique resource name of the BoundaryConfig. Format: - `organizations/{organization}/boundaryConfig` - `folders/{folder}/boundaryConfig` Example: `folders/123456789/boundaryConfig` |
| `tagKey` | `string` | No | Optional. The namespaced name of the tag key. Format: `{parent_id}/{tag_key_short_name}` Example: `123456789012/env` (where 123456789012 is the organization ID). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### projects.create

`resourceManager.projects.create`

Requests that a new project be created. The result is an `Operation` which can be used to track the creation process

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.create({ projectId: 'demo-project-2', displayName: 'Demo 2', parent: 'folders/345678901234' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `labels` | `Record<string, string>` | No | Optional. The labels associated with this project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \a-z\\?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\a-z\\?)?. No more than 64 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: `"myBusinessDimension" : "businessValue"` |
| `projectId` | `string` | No | Immutable. The unique, user-assigned id of the project. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `tokyo-rain-123` |
| `parent` | `string` | No | Optional. A reference to a parent Resource. eg., `organizations/123` or `folders/876`. |
| `displayName` | `string` | No | Optional. A user-assigned display name of the project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Project` |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this project. Each item in the map must be expressed as " : ". For example: "123/environment" : "production", "123/costCenter" : "marketing" Note: Currently this field is in Preview. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### projects.delete

`resourceManager.projects.delete`

Marks the project identified by the specified `name` (for example, `projects/415104041262`) for deletion. This method will only affect the project if it has a lifecycle state of ACTIVE

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.delete({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Project (for example, `projects/415104041262`). Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### projects.get

`resourceManager.projects.get`

Retrieves the project identified by the specified `name` (for example, `projects/415104041262`). The caller must have `resourcemanager.projects.get` permission for this project

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.get({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the project (for example, `projects/415104041262`). Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `labels` | `Record<string, string> \| null` | No | Optional. The labels associated with this project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \a-z\\?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\a-z\\?)?. No more than 64 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: `"myBusinessDimension" : "businessValue"` |
| `etag` | `string \| null` | No | Output only. A checksum computed by the server based on the current value of the Project resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `projectId` | `string \| null` | No | Immutable. The unique, user-assigned id of the project. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `tokyo-rain-123` |
| `configuredCapabilities` | `string[] \| null` | No | Output only. If this project is a Management Project, list of capabilities configured on the parent folder. Note, presence of any capability implies that this is a Management Project. Example: `folders/123/capabilities/app-management`. OUTPUT ONLY. |
| `updateTime` | `string \| null` | No | Output only. The most recent time this resource was modified. |
| `parent` | `string \| null` | No | Optional. A reference to a parent Resource. eg., `organizations/123` or `folders/876`. |
| `displayName` | `string \| null` | No | Optional. A user-assigned display name of the project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Project` |
| `deleteTime` | `string \| null` | No | Output only. The time at which this resource was requested for deletion. |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this project. Each item in the map must be expressed as " : ". For example: "123/environment" : "production", "123/costCenter" : "marketing" Note: Currently this field is in Preview. |
| `managementType` | `string \| null` | No | Output only. The type of Management Project. This field is only populated if `is_management_project` is `true`. |
| `createTime` | `string \| null` | No | Output only. Creation time. |
| `name` | `string \| null` | No | Output only. The unique resource name of the project. It is an int64 generated number prefixed by "projects/". Example: `projects/415104041262` |
| `state` | `string \| null` | No | Output only. The project lifecycle state. |
| `isManagementProject` | `boolean \| null` | No | Output only. If `true`, this project is a Management Project. A Management Project manages dedicated project groups for specific purposes (e.g., agent management or app management). |

***

### projects.getIamPolicy

`resourceManager.projects.getIamPolicy`

Read a project's IAM policy: who has which role

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.getIamPolicy({ resource: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>`. |
| `options` | `object` | No | Encapsulates settings provided to GetIamPolicy. |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   requestedPolicyVersion?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### projects.list

`resourceManager.projects.list`

Lists projects that are direct children of the specified folder or organization resource. `list()` provides a strongly consistent view of the projects underneath the specified parent resource. `list()` returns projects sorted based upon the (ascending) lexical ordering of their `display_name`. The caller must have `resourcemanager.projects.list` permission on the identified parent (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.list({ parent: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of projects to return in the response. The server can return fewer projects than requested. If unspecified, server picks an appropriate default. |
| `showDeleted` | `boolean` | No | Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be returned. Normally only `ACTIVE` projects are returned. |
| `parent` | `string` | No | Required. The name of the parent resource whose projects are being listed. Only children of this parent resource are listed; descendants are not listed. If the parent is a folder, use the value `folders/{folder_id}`. If the parent is an organization, use the value `organizations/{org_id}`. |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to ListProjects that indicates from where listing should continue. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projects` | `object[] \| null` | No | The list of Projects under the parent. This list can be paginated. |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime. |

> [accordion] projects full type
>
> ```ts theme={null}
> {
>   labels?: Record<string, string> | null,
>   etag?: string | null,
>   projectId?: string | null,
>   configuredCapabilities?: string[] | null,
>   updateTime?: string | null,
>   parent?: string | null,
>   displayName?: string | null,
>   deleteTime?: string | null,
>   tags?: Record<string, string> | null,
>   managementType?: string | null,
>   createTime?: string | null,
>   name?: string | null,
>   state?: string | null,
>   isManagementProject?: boolean | null
> }[] | null
> ```

***

### projects.move

`resourceManager.projects.move`

Moves a project to another place in your resource hierarchy, under a new resource parent. Returns an operation which can be used to track the process of the project move workflow

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.move({ name: 'projects/demo-project', destinationParent: 'folders/345678901234' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the project to move. Format: `projects/<id>`. |
| `destinationParent` | `string` | No | Required. The new parent to move the Project under. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### projects.patch

`resourceManager.projects.patch`

Updates the `display_name` and labels of the project identified by the specified `name` (for example, `projects/415104041262`). Deleting all labels requires an update mask for labels field

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.patch({ name: 'projects/demo-project', displayName: 'Production', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. An update mask to selectively update fields. |
| `name` | `string` | Yes | Output only. The unique resource name of the project. It is an int64 generated number prefixed by "projects/". Example: `projects/415104041262` Format: `projects/<id>`. |
| `labels` | `Record<string, string>` | No | Optional. The labels associated with this project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \a-z\\?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\a-z\\?)?. No more than 64 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: `"myBusinessDimension" : "businessValue"` |
| `projectId` | `string` | No | Immutable. The unique, user-assigned id of the project. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `tokyo-rain-123` |
| `parent` | `string` | No | Optional. A reference to a parent Resource. eg., `organizations/123` or `folders/876`. |
| `displayName` | `string` | No | Optional. A user-assigned display name of the project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Project` |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this project. Each item in the map must be expressed as " : ". For example: "123/environment" : "production", "123/costCenter" : "marketing" Note: Currently this field is in Preview. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### projects.search

`resourceManager.projects.search`

Searches for projects on which the caller has the `resourcemanager.projects.get` permission and that match the specified query. This method returns projects in an unspecified order (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.search({ query: 'state:ACTIVE', pageSize: 20 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of projects to return in the response. The server can return fewer projects than requested. If unspecified, server picks an appropriate default. |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to ListProjects that indicates from where listing should continue. |
| `query` | `string` | No | Optional. A query string for searching for projects that the caller has `resourcemanager.projects.get` permission to. If multiple fields are included in the query, then it will return results that match any of the fields. Some eligible fields are: \`\`\` \| Field \| Description \| \|-------------------------\|----------------------------------------------\| \| displayName, name \| Filters by displayName. \| \| parent \| Project's parent (for example: folders/123, organizations/\*). Prefer parent field over parent.type and parent.id.\| \| parent.type \| Parent's type: `folder` or `organization`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projects` | `object[] \| null` | No | The list of Projects that matched the list filter query. This list can be paginated. |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime. |

> [accordion] projects full type
>
> ```ts theme={null}
> {
>   labels?: Record<string, string> | null,
>   etag?: string | null,
>   projectId?: string | null,
>   configuredCapabilities?: string[] | null,
>   updateTime?: string | null,
>   parent?: string | null,
>   displayName?: string | null,
>   deleteTime?: string | null,
>   tags?: Record<string, string> | null,
>   managementType?: string | null,
>   createTime?: string | null,
>   name?: string | null,
>   state?: string | null,
>   isManagementProject?: boolean | null
> }[] | null
> ```

***

### projects.setIamPolicy

`resourceManager.projects.setIamPolicy`

Replace a project's IAM policy (read it first and send it back with its etag, or you may drop other people's roles)

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.setIamPolicy({
	resource: 'projects/demo-project',
	policy: {
		bindings: [{
			role: 'roles/viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>`. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[],
>   bindings?: {
>     role?: string,
>     condition?: {
>       location?: string,
>       expression?: string,
>       description?: string,
>       title?: string
>     },
>     members?: string[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### projects.testIamPermissions

`resourceManager.projects.testIamPermissions`

Returns permissions that a caller has on the specified project, in the format `projects/{ProjectIdOrNumber}`, for example, `projects/123`

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.testIamPermissions({
	resource: 'projects/demo-project',
	permissions: ['resourcemanager.projects.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### projects.undelete

`resourceManager.projects.undelete`

Restores the project identified by the specified `name` (for example, `projects/415104041262`). You can only use this method for a project that has a lifecycle state of DELETE\_REQUESTED

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.projects.undelete({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the project (for example, `projects/415104041262`). Required. Format: `projects/<id>`. |
| `body` | `object` | No | The request sent to the UndeleteProject method. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagBindings.create

`resourceManager.tagBindings.create`

Creates a TagBinding between a TagValue and a Google Cloud resource

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagBindings.create({ parent: '//cloudresourcemanager.googleapis.com/projects/demo-project', tagValue: 'tagValues/281476203380002' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. Set to true to perform the validations necessary for creating the resource, but not actually perform the action. |
| `tagValueNamespacedName` | `string` | No | Optional. The namespaced name for the TagValue of the TagBinding. Must be in the format `{parent_id}/{tag_key_short_name}/{short_name}`. For methods that support TagValue namespaced name, only one of tag\_value\_namespaced\_name or tag\_value may be filled. Requests with both fields will be rejected. |
| `parent` | `string` | No | The full resource name of the resource the TagValue is bound to. E.g. `//cloudresourcemanager.googleapis.com/projects/123` |
| `tagValue` | `string` | No | The TagValue of the TagBinding. Must be of the form `tagValues/456`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagBindings.delete

`resourceManager.tagBindings.delete`

Deletes a TagBinding

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagBindings.delete({ name: 'tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123456789012/tagValues/281476203380002' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the TagBinding. This is a String of the form: `tagBindings/{id}` (e.g. `tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456`). Format: `tagBindings/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagBindings.list

`resourceManager.tagBindings.list`

Lists the TagBindings for the given Google Cloud resource, as specified with `parent`. NOTE: The `parent` field is expected to be a full resource name: [https://cloud.google.com/apis/design/resource\_names#full\_resource\_name](https://cloud.google.com/apis/design/resource_names#full_resource_name) (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagBindings.list({ parent: '//cloudresourcemanager.googleapis.com/projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of TagBindings to return in the response. The server allows a maximum of 300 TagBindings to return. If unspecified, the server will use 100 as the default. |
| `parent` | `string` | No | Required. The full resource name of a resource for which you want to list existing TagBindings. E.g. "//cloudresourcemanager.googleapis.com/projects/123" |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to `ListTagBindings` that indicates where this listing should continue from. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime. |
| `tagBindings` | `object[] \| null` | No | A possibly paginated list of TagBindings for the specified resource. |

> [accordion] tagBindings full type
>
> ```ts theme={null}
> {
>   tagValueNamespacedName?: string | null,
>   parent?: string | null,
>   tagValue?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### tagKeys.create

`resourceManager.tagKeys.create`

Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagKeys.create({ parent: 'organizations/123456789012', shortName: 'env', description: 'Environment' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. Set to true to perform validations necessary for creating the resource, but not actually perform the action. |
| `name` | `string` | No | Immutable. The resource name for a TagKey. Must be in the format `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for the TagKey. |
| `purpose` | `PURPOSE_UNSPECIFIED \| GCE_FIREWALL \| DATA_GOVERNANCE` | No | Optional. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. A purpose does not grant a policy engine exclusive rights to the Tag, and it may be referenced by other policy engines. A purpose cannot be changed once set. |
| `description` | `string` | No | Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write. |
| `parent` | `string` | No | Immutable. The resource name of the TagKey's parent. A TagKey can be parented by an Organization or a Project. For a TagKey parented by an Organization, its parent must be in the form `organizations/{org_id}`. For a TagKey parented by a Project, its parent can be in the form `projects/{project_id}` or `projects/{project_number}`. |
| `purposeData` | `Record<string, string>` | No | Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for `Purpose` for formatting of this field. Purpose data cannot be changed once set. |
| `etag` | `string` | No | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details. |
| `allowedValuesRegex` | `string` | No | Optional. Regular expression constraint for freeform tag values. If present, it implicitly allows freeform values (constrained by the regex). |
| `shortName` | `string` | No | Required. Immutable. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name must be 1-256 characters, beginning and ending with an alphanumeric character (\[a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagKeys.delete

`resourceManager.tagKeys.delete`

Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagKeys.delete({ name: 'tagKeys/281476203380001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. Set as true to perform validations necessary for deletion, but not actually perform the action. |
| `etag` | `string` | No | Optional. The etag known to the client for the expected state of the TagKey. This is to be used for optimistic concurrency. |
| `name` | `string` | Yes | Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or it will not be deleted successfully. Format: `tagKeys/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagKeys.get

`resourceManager.tagKeys.get`

Retrieves a TagKey. This method will return `PERMISSION_DENIED` if the key does not exist or the user does not have permission to view it

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagKeys.get({ name: 'tagKeys/281476203380001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A resource name in the format `tagKeys/{id}`, such as `tagKeys/123`. Format: `tagKeys/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Immutable. The resource name for a TagKey. Must be in the format `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for the TagKey. |
| `purpose` | `string \| null` | No | Optional. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. A purpose does not grant a policy engine exclusive rights to the Tag, and it may be referenced by other policy engines. A purpose cannot be changed once set. |
| `createTime` | `string \| null` | No | Output only. Creation time. |
| `description` | `string \| null` | No | Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write. |
| `parent` | `string \| null` | No | Immutable. The resource name of the TagKey's parent. A TagKey can be parented by an Organization or a Project. For a TagKey parented by an Organization, its parent must be in the form `organizations/{org_id}`. For a TagKey parented by a Project, its parent can be in the form `projects/{project_id}` or `projects/{project_number}`. |
| `purposeData` | `Record<string, string> \| null` | No | Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for `Purpose` for formatting of this field. Purpose data cannot be changed once set. |
| `namespacedName` | `string \| null` | No | Output only. Immutable. Namespaced name of the TagKey. |
| `etag` | `string \| null` | No | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details. |
| `updateTime` | `string \| null` | No | Output only. Update time. |
| `allowedValuesRegex` | `string \| null` | No | Optional. Regular expression constraint for freeform tag values. If present, it implicitly allows freeform values (constrained by the regex). |
| `shortName` | `string \| null` | No | Required. Immutable. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name must be 1-256 characters, beginning and ending with an alphanumeric character (\[a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between. |

***

### tagKeys.getIamPolicy

`resourceManager.tagKeys.getIamPolicy`

Gets the access control policy for a TagKey. The returned policy may be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagKeys.getIamPolicy({ resource: 'tagKeys/281476203380001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `tagKeys/<id>`. |
| `options` | `object` | No | Encapsulates settings provided to GetIamPolicy. |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   requestedPolicyVersion?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### tagKeys.getNamespaced

`resourceManager.tagKeys.getNamespaced`

Retrieves a TagKey by its namespaced name. This method will return `PERMISSION_DENIED` if the key does not exist or the user does not have permission to view it

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagKeys.getNamespaced({ name: '123456789012/env' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | Required. A namespaced tag key name in the format `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short name "bar" under the project `r2-d2`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Immutable. The resource name for a TagKey. Must be in the format `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for the TagKey. |
| `purpose` | `string \| null` | No | Optional. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. A purpose does not grant a policy engine exclusive rights to the Tag, and it may be referenced by other policy engines. A purpose cannot be changed once set. |
| `createTime` | `string \| null` | No | Output only. Creation time. |
| `description` | `string \| null` | No | Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write. |
| `parent` | `string \| null` | No | Immutable. The resource name of the TagKey's parent. A TagKey can be parented by an Organization or a Project. For a TagKey parented by an Organization, its parent must be in the form `organizations/{org_id}`. For a TagKey parented by a Project, its parent can be in the form `projects/{project_id}` or `projects/{project_number}`. |
| `purposeData` | `Record<string, string> \| null` | No | Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for `Purpose` for formatting of this field. Purpose data cannot be changed once set. |
| `namespacedName` | `string \| null` | No | Output only. Immutable. Namespaced name of the TagKey. |
| `etag` | `string \| null` | No | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details. |
| `updateTime` | `string \| null` | No | Output only. Update time. |
| `allowedValuesRegex` | `string \| null` | No | Optional. Regular expression constraint for freeform tag values. If present, it implicitly allows freeform values (constrained by the regex). |
| `shortName` | `string \| null` | No | Required. Immutable. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name must be 1-256 characters, beginning and ending with an alphanumeric character (\[a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between. |

***

### tagKeys.list

`resourceManager.tagKeys.list`

Lists all TagKeys for a parent resource (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagKeys.list({ parent: 'organizations/123456789012' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | No | Required. The resource name of the TagKey's parent. Must be of the form `organizations/{org_id}` or `projects/{project_id}` or `projects/{project_number}` |
| `pageSize` | `number` | No | Optional. The maximum number of TagKeys to return in the response. The server allows a maximum of 300 TagKeys to return. If unspecified, the server will use 100 as the default. |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to `ListTagKey` that indicates where this listing should continue from. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tagKeys` | `object[] \| null` | No | List of TagKeys that live under the specified parent in the request. |
| `nextPageToken` | `string \| null` | No | A pagination token returned from a previous call to `ListTagKeys` that indicates from where listing should continue. |

> [accordion] tagKeys full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   purpose?: string | null,
>   createTime?: string | null,
>   description?: string | null,
>   parent?: string | null,
>   purposeData?: Record<string, string> | null,
>   namespacedName?: string | null,
>   etag?: string | null,
>   updateTime?: string | null,
>   allowedValuesRegex?: string | null,
>   shortName?: string | null
> }[] | null
> ```

***

### tagKeys.patch

`resourceManager.tagKeys.patch`

Updates the attributes of the TagKey resource

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagKeys.patch({ name: 'tagKeys/281476203380001', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Set as true to perform validations necessary for updating the resource, but not actually perform the action. |
| `updateMask` | `string` | No | Fields to be updated. The mask may only contain `description` or `etag`. If omitted entirely, both `description` and `etag` are assumed to be significant. |
| `name` | `string` | Yes | Immutable. The resource name for a TagKey. Must be in the format `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for the TagKey. Format: `tagKeys/<id>`. |
| `body_name` | `string` | No | Immutable. The resource name for a TagKey. Must be in the format `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for the TagKey. |
| `purpose` | `PURPOSE_UNSPECIFIED \| GCE_FIREWALL \| DATA_GOVERNANCE` | No | Optional. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. A purpose does not grant a policy engine exclusive rights to the Tag, and it may be referenced by other policy engines. A purpose cannot be changed once set. |
| `description` | `string` | No | Optional. User-assigned description of the TagKey. Must not exceed 256 characters. Read-write. |
| `parent` | `string` | No | Immutable. The resource name of the TagKey's parent. A TagKey can be parented by an Organization or a Project. For a TagKey parented by an Organization, its parent must be in the form `organizations/{org_id}`. For a TagKey parented by a Project, its parent can be in the form `projects/{project_id}` or `projects/{project_number}`. |
| `purposeData` | `Record<string, string>` | No | Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for `Purpose` for formatting of this field. Purpose data cannot be changed once set. |
| `etag` | `string` | No | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details. |
| `allowedValuesRegex` | `string` | No | Optional. Regular expression constraint for freeform tag values. If present, it implicitly allows freeform values (constrained by the regex). |
| `shortName` | `string` | No | Required. Immutable. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name must be 1-256 characters, beginning and ending with an alphanumeric character (\[a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagKeys.setIamPolicy

`resourceManager.tagKeys.setIamPolicy`

Sets the access control policy on a TagKey, replacing any existing policy. The `resource` field should be the TagKey's resource name

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagKeys.setIamPolicy({
	resource: 'tagKeys/281476203380001',
	policy: {
		bindings: [{
			role: 'roles/resourcemanager.tagViewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `tagKeys/<id>`. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[],
>   bindings?: {
>     role?: string,
>     condition?: {
>       location?: string,
>       expression?: string,
>       description?: string,
>       title?: string
>     },
>     members?: string[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### tagKeys.testIamPermissions

`resourceManager.tagKeys.testIamPermissions`

Returns permissions that a caller has on the specified TagKey. The `resource` field should be the TagKey's resource name

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagKeys.testIamPermissions({
	resource: 'tagKeys/281476203380001',
	permissions: ['resourcemanager.tagKeys.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `tagKeys/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### tagValues.create

`resourceManager.tagValues.create`

Creates a TagValue as a child of the specified TagKey. If a another request with the same parameters is sent while the original request is in process the second request will receive an error

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.create({ parent: 'tagKeys/281476203380001', shortName: 'prod' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. Set as true to perform the validations necessary for creating the resource, but not actually perform the action. |
| `etag` | `string` | No | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagValueRequest for details. |
| `description` | `string` | No | Optional. User-assigned description of the TagValue. Must not exceed 256 characters. Read-write. |
| `name` | `string` | No | Immutable. Resource name for TagValue in the format `tagValues/456`. |
| `shortName` | `string` | No | Required. Immutable. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey. The short name must be 256 characters or less, beginning and ending with an alphanumeric character (\[a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between. |
| `parent` | `string` | No | Immutable. The resource name of the new TagValue's parent TagKey. Must be of the form `tagKeys/{tag_key_id}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagValues.delete

`resourceManager.tagValues.delete`

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.delete({ name: 'tagValues/281476203380002' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. Set as true to perform the validations necessary for deletion, but not actually perform the action. |
| `name` | `string` | Yes | Required. Resource name for TagValue to be deleted in the format tagValues/456. Format: `tagValues/<id>`. |
| `etag` | `string` | No | Optional. The etag known to the client for the expected state of the TagValue. This is to be used for optimistic concurrency. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagValues.get

`resourceManager.tagValues.get`

Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the value does not exist or the user does not have permission to view it

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.get({ name: 'tagValues/281476203380002' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name for TagValue to be fetched in the format `tagValues/456`. Format: `tagValues/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagValueRequest for details. |
| `updateTime` | `string \| null` | No | Output only. Update time. |
| `description` | `string \| null` | No | Optional. User-assigned description of the TagValue. Must not exceed 256 characters. Read-write. |
| `name` | `string \| null` | No | Immutable. Resource name for TagValue in the format `tagValues/456`. |
| `namespacedName` | `string \| null` | No | Output only. The namespaced name of the TagValue. Can be in the form `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or `{project_number}/{tag_key_short_name}/{tag_value_short_name}`. |
| `shortName` | `string \| null` | No | Required. Immutable. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey. The short name must be 256 characters or less, beginning and ending with an alphanumeric character (\[a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between. |
| `parent` | `string \| null` | No | Immutable. The resource name of the new TagValue's parent TagKey. Must be of the form `tagKeys/{tag_key_id}`. |
| `createTime` | `string \| null` | No | Output only. Creation time. |

***

### tagValues.getIamPolicy

`resourceManager.tagValues.getIamPolicy`

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.getIamPolicy({ resource: 'tagValues/281476203380002' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `tagValues/<id>`. |
| `options` | `object` | No | Encapsulates settings provided to GetIamPolicy. |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   requestedPolicyVersion?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### tagValues.getNamespaced

`resourceManager.tagValues.getNamespaced`

Retrieves a TagValue by its namespaced name. This method will return `PERMISSION_DENIED` if the value does not exist or the user does not have permission to view it

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.getNamespaced({ name: '123456789012/env/prod' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | Required. A namespaced tag value name in the following format: `{parentId}/{tagKeyShort}/{tagValueShort}` Examples: - `42/foo/abc` for a value with short name "abc" under the key with short name "foo" under the organization with ID 42 - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with short name "bar" under the project with ID "r2-d2" |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagValueRequest for details. |
| `updateTime` | `string \| null` | No | Output only. Update time. |
| `description` | `string \| null` | No | Optional. User-assigned description of the TagValue. Must not exceed 256 characters. Read-write. |
| `name` | `string \| null` | No | Immutable. Resource name for TagValue in the format `tagValues/456`. |
| `namespacedName` | `string \| null` | No | Output only. The namespaced name of the TagValue. Can be in the form `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or `{project_number}/{tag_key_short_name}/{tag_value_short_name}`. |
| `shortName` | `string \| null` | No | Required. Immutable. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey. The short name must be 256 characters or less, beginning and ending with an alphanumeric character (\[a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between. |
| `parent` | `string \| null` | No | Immutable. The resource name of the new TagValue's parent TagKey. Must be of the form `tagKeys/{tag_key_id}`. |
| `createTime` | `string \| null` | No | Output only. Creation time. |

***

### tagValues.list

`resourceManager.tagValues.list`

Lists all TagValues for a specific TagKey (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.list({ parent: 'tagKeys/281476203380001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of TagValues to return in the response. The server allows a maximum of 300 TagValues to return. If unspecified, the server will use 100 as the default. |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to `ListTagValues` that indicates where this listing should continue from. |
| `parent` | `string` | No | Required. Resource name for the parent of the TagValues to be listed, in the format `tagKeys/123` or `tagValues/123`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A pagination token returned from a previous call to `ListTagValues` that indicates from where listing should continue. |
| `tagValues` | `object[] \| null` | No | A possibly paginated list of TagValues that are direct descendants of the specified parent TagKey. |

> [accordion] tagValues full type
>
> ```ts theme={null}
> {
>   etag?: string | null,
>   updateTime?: string | null,
>   description?: string | null,
>   name?: string | null,
>   namespacedName?: string | null,
>   shortName?: string | null,
>   parent?: string | null,
>   createTime?: string | null
> }[] | null
> ```

***

### tagValues.patch

`resourceManager.tagValues.patch`

Updates the attributes of the TagValue resource

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.patch({ name: 'tagValues/281476203380002', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. True to perform validations necessary for updating the resource, but not actually perform the action. |
| `updateMask` | `string` | No | Optional. Fields to be updated. |
| `name` | `string` | Yes | Immutable. Resource name for TagValue in the format `tagValues/456`. Format: `tagValues/<id>`. |
| `etag` | `string` | No | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagValueRequest for details. |
| `description` | `string` | No | Optional. User-assigned description of the TagValue. Must not exceed 256 characters. Read-write. |
| `body_name` | `string` | No | Immutable. Resource name for TagValue in the format `tagValues/456`. |
| `shortName` | `string` | No | Required. Immutable. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey. The short name must be 256 characters or less, beginning and ending with an alphanumeric character (\[a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between. |
| `parent` | `string` | No | Immutable. The resource name of the new TagValue's parent TagKey. Must be of the form `tagKeys/{tag_key_id}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagValues.setIamPolicy

`resourceManager.tagValues.setIamPolicy`

Sets the access control policy on a TagValue, replacing any existing policy. The `resource` field should be the TagValue's resource name

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.setIamPolicy({
	resource: 'tagValues/281476203380002',
	policy: {
		bindings: [{
			role: 'roles/resourcemanager.tagUser',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `tagValues/<id>`. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[],
>   bindings?: {
>     role?: string,
>     condition?: {
>       location?: string,
>       expression?: string,
>       description?: string,
>       title?: string
>     },
>     members?: string[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   condition?: {
>     location?: string | null,
>     expression?: string | null,
>     description?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null
> }[] | null
> ```

***

### tagValues.tagHolds.create

`resourceManager.tagValues.tagHolds.create`

Creates a TagHold. Returns ALREADY\_EXISTS if a TagHold with the same resource and origin exists under the same TagValue

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.tagHolds.create({ parent: 'tagValues/281476203380002', holder: '//compute.googleapis.com/projects/demo-project/zones/us-central1-a/instances/web-1', origin: 'ops' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the TagHold's parent TagValue. Must be of the form: `tagValues/{tag-value-id}`. Format: `tagValues/<id>`. |
| `validateOnly` | `boolean` | No | Optional. Set to true to perform the validations necessary for creating the resource, but not actually perform the action. |
| `helpLink` | `string` | No | Optional. A URL where an end user can learn more about removing this hold. E.g. `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing` |
| `origin` | `string` | No | Optional. An optional string representing the origin of this request. This field should include human-understandable information to distinguish origins from each other. Must be less than 200 characters. E.g. `migs-35678234` |
| `holder` | `string` | No | Required. The name of the resource where the TagValue is being used. Must be less than 200 characters. E.g. `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagValues.tagHolds.delete

`resourceManager.tagValues.tagHolds.delete`

Deletes a TagHold

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.tagHolds.delete({ name: 'tagValues/281476203380002/tagHolds/hold-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. Set to true to perform the validations necessary for deleting the resource, but not actually perform the action. |
| `name` | `string` | Yes | Required. The resource name of the TagHold to delete. Must be of the form: `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`. Format: `tagValues/<id>/tagHolds/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### tagValues.tagHolds.list

`resourceManager.tagValues.tagHolds.list`

Lists TagHolds under a TagValue (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.tagHolds.list({ parent: 'tagValues/281476203380002' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the parent TagValue. Must be of the form: `tagValues/{tag-value-id}`. Format: `tagValues/<id>`. |
| `filter` | `string` | No | Optional. Criteria used to select a subset of TagHolds parented by the TagValue to return. This field follows the syntax defined by aip.dev/160; the `holder` and `origin` fields are supported for filtering. Currently only `AND` syntax is supported. Some example queries are: \* `holder = //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` \* `origin = 35678234` \* `holder = //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group AND origin = 35678234` |
| `pageToken` | `string` | No | Optional. A pagination token returned from a previous call to `ListTagHolds` that indicates where this listing should continue from. |
| `pageSize` | `number` | No | Optional. The maximum number of TagHolds to return in the response. The server allows a maximum of 300 TagHolds to return. If unspecified, the server will use 100 as the default. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tagHolds` | `object[] \| null` | No | A possibly paginated list of TagHolds. |
| `nextPageToken` | `string \| null` | No | Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime. |

> [accordion] tagHolds full type
>
> ```ts theme={null}
> {
>   helpLink?: string | null,
>   name?: string | null,
>   createTime?: string | null,
>   origin?: string | null,
>   holder?: string | null
> }[] | null
> ```

***

### tagValues.testIamPermissions

`resourceManager.tagValues.testIamPermissions`

Returns permissions that a caller has on the specified TagValue. The `resource` field should be the TagValue's resource name

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.resourceManager.tagValues.testIamPermissions({
	resource: 'tagValues/281476203380002',
	permissions: ['resourcemanager.tagValues.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `tagValues/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

## Run

### locations.builds.submit

`run.locations.builds.submit`

Submits a build in a given project

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.builds.submit({
	parent: 'projects/demo-project/locations/us-central1',
	storageSource: { bucket: 'demo-bucket', object: 'source.tgz' },
	imageUri: 'us-central1-docker.pkg.dev/demo-project/docker/api:v1',
	buildpackBuild: { functionTarget: 'resize' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project and location to build in. Location must be a region, e.g., 'us-central1' or 'global' if the global builder is to be used. Format: `projects/{project}/locations/{location}` Format: `projects/<id>/locations/<id>`. |
| `imageUri` | `string` | No | Required. Artifact Registry URI to store the built image. |
| `dockerBuild` | `object` | No | Build the source using Docker. This means the source has a Dockerfile. |
| `machineType` | `string` | No | Optional. The machine type from default pool to use for the build. If left blank, cloudbuild will use a sensible default. Currently only E2\_HIGHCPU\_8 is supported. If worker\_pool is set, this field will be ignored. |
| `workerPool` | `string` | No | Optional. Name of the Cloud Build private pool that should be used to build the function. The format of this field is `projects/{project}/locations/{region}/workerPools/{workerPool}` where `{project}` and `{region}` are the project id and region respectively where the worker pool is defined and `{workerPool}` is the short name of the worker pool. |
| `serviceAccount` | `string` | No | Optional. The service account to use for the build. If not set, the default Cloud Build service account for the project will be used. |
| `client` | `string` | No | Optional. The client that initiated the build request. |
| `storageSource` | `object` | No | Location of the source in an archive file in Google Cloud Storage. |
| `releaseTrack` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | Optional. The release track of the client that initiated the build request. |
| `buildpackBuild` | `object` | No | Build the source using Buildpacks. |
| `tags` | `string[]` | No | Optional. Additional tags to annotate the build. |

> [accordion] dockerBuild full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] storageSource full type
>
> ```ts theme={null}
> {
>   generation?: string | number,
>   bucket?: string,
>   object?: string
> }
> ```

> [accordion] buildpackBuild full type
>
> ```ts theme={null}
> {
>   environmentVariables?: Record<string, string>,
>   projectDescriptor?: string,
>   enableAutomaticUpdates?: boolean,
>   functionTarget?: string,
>   cacheImageUri?: string,
>   runtime?: string,
>   baseImage?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `baseImageUri` | `string \| null` | No | URI of the base builder image in Artifact Registry being used in the build. Used to opt into automatic base image updates. |
| `baseImageWarning` | `string \| null` | No | Warning message for the base image. |
| `buildOperation` | `object \| null` | No | This resource represents a long-running operation that is the result of a network API call. |

> [accordion] buildOperation full type
>
> ```ts theme={null}
> {
>   response?: Record<string, any> | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null,
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   done?: boolean | null
> } | null
> ```

***

### locations.exportImage

`run.locations.exportImage`

Export image for a given resource

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.exportImage({ name: 'projects/demo-project/locations/us-central1/services/api/revisions/api-00001-abc', destinationRepo: 'us-central1-docker.pkg.dev/demo-project/docker' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the resource of which image metadata should be exported. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution Format: `projects/<id>/locations/<id>/<path>`. |
| `destinationRepo` | `string` | No | Required. The export destination url (the Artifact Registry repo). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operationId` | `string \| null` | No | An operation ID used to track the status of image exports tied to the original pod ID in the request. |

***

### locations.exportImageMetadata

`run.locations.exportImageMetadata`

Export image metadata for a given resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.exportImageMetadata({ name: 'projects/demo-project/locations/us-central1/services/api/revisions/api-00001-abc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the resource of which image metadata should be exported. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution Format: `projects/<id>/locations/<id>/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `string \| null` | No | JSON encoded Google-generated Customer Metadata for a given resource/project. |

***

### locations.exportMetadata

`run.locations.exportMetadata`

Export generated customer metadata for a given resource

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.exportMetadata({ name: 'projects/demo-project/locations/us-central1/services/api' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the resource of which metadata should be exported. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}` for Service `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution \{project\_id\_or\_number} may contains domain-scoped project IDs Format: `projects/<id>/locations/<id>/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `string \| null` | No | JSON encoded Google-generated Customer Metadata for a given resource/project. |

***

### locations.exportProjectMetadata

`run.locations.exportProjectMetadata`

Export generated customer metadata for a given project

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.exportProjectMetadata({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the project of which metadata should be exported. Format: `projects/{project_id_or_number}/locations/{location}` for Project in a given location. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `string \| null` | No | JSON encoded Google-generated Customer Metadata for a given resource/project. |

***

### locations.instances.create

`run.locations.instances.create`

Creates an Instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.create({
	parent: 'projects/demo-project/locations/us-central1',
	instanceId: 'worker-1',
	containers: [{ image: 'us-central1-docker.pkg.dev/demo-project/docker/api:v1' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instanceId` | `string` | No | Optional. The unique identifier for the Instance. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the instance becomes \{parent}/instances/\{instance\_id}. If not provided, the server will generate a unique `instance_id`. |
| `validateOnly` | `boolean` | No | Optional. Indicates that the request should be validated and default values populated, without persisting the request or creating any resources. |
| `parent` | `string` | Yes | Required. The location and project in which this Instance should be created. Format: `projects/<id>/locations/<id>`. |
| `iapEnabled` | `boolean` | No | Optional. IAP settings on the Instance. |
| `invokerIamDisabled` | `boolean` | No | Optional. Disables IAM permission check for `run.routes.invoke` for callers of this Instance. For more information, visit [https://cloud.google.com/run/docs/securing/managing-access#invoker\_check](https://cloud.google.com/run/docs/securing/managing-access#invoker_check). |
| `encryptionKeyRevocationAction` | `ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED \| PREVENT_NEW \| SHUTDOWN` | No | The action to take if the encryption key is revoked. |
| `serviceAccount` | `string` | No | — |
| `encryptionKeyShutdownDuration` | `string` | No | If `encryption_key_revocation_action` is `SHUTDOWN`, the duration before shutting down all instances. The minimum increment is 1 hour. |
| `volumes` | `object[]` | No | A list of Volumes to make available to containers. |
| `name` | `string` | No | The fully qualified name of this Instance. In `CreateInstanceRequest`, this field is ignored, and instead composed from `CreateInstanceRequest.parent` and `CreateInstanceRequest.instance_id`. |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `labels` | `Record<string, string>` | No | — |
| `launchStage` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, `GA` is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if `ALPHA` is provided as input, but only `BETA` and `GA`-level features are used, this field will be `BETA` on output. |
| `client` | `string` | No | Arbitrary identifier for the API client. |
| `defaultUriDisabled` | `boolean` | No | Optional. Disables public resolution of the default URI of this Instance. |
| `containers` | `object[]` | No | Required. Holds the single container that defines the unit of execution for this Instance. |
| `description` | `string` | No | User-provided description of the Instance. This field currently has a 512-character limit. |
| `restartPolicy` | `RESTART_POLICY_UNSPECIFIED \| ALWAYS \| ON_FAILURE \| NEVER` | No | Optional. Restart policy for the Instance. |
| `ingress` | `INGRESS_TRAFFIC_UNSPECIFIED \| INGRESS_TRAFFIC_ALL \| INGRESS_TRAFFIC_INTERNAL_ONLY \| INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER \| INGRESS_TRAFFIC_NONE` | No | Optional. Provides the ingress settings for this Instance. On output, returns the currently observed ingress settings, or `INGRESS_TRAFFIC_UNSPECIFIED` if no revision is active. |
| `vpcAccess` | `object` | No | VPC Access settings. For more information on sending traffic to a VPC network, visit [https://cloud.google.com/run/docs/configuring/connecting-vpc](https://cloud.google.com/run/docs/configuring/connecting-vpc). |
| `encryptionKey` | `string` | No | A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to [https://cloud.google.com/run/docs/securing/using-cmek](https://cloud.google.com/run/docs/securing/using-cmek) |
| `clientVersion` | `string` | No | Arbitrary version identifier for the API client. |
| `sandboxes` | `object` | No | Configuration for sandboxes. |
| `sshEnabled` | `boolean` | No | Optional. Enables SSH access to the Instance. |
| `nodeSelector` | `object` | No | Hardware constraints configuration. |
| `annotations` | `Record<string, string>` | No | — |
| `binaryAuthorization` | `object` | No | Settings for Binary Authorization feature. |
| `gpuZonalRedundancyDisabled` | `boolean` | No | Optional. True if GPU zonal redundancy is disabled on this instance. |

> [accordion] volumes full type
>
> ```ts theme={null}
> {
>   secret?: {
>     items?: {
>       version?: string,
>       mode?: number,
>       path?: string
>     }[],
>     secret?: string,
>     defaultMode?: number
>   },
>   cloudSqlInstance?: {
>     instances?: string[]
>   },
>   name?: string,
>   nfs?: {
>     server?: string,
>     readOnly?: boolean,
>     path?: string
>   },
>   emptyDir?: {
>     medium?: MEDIUM_UNSPECIFIED | MEMORY | DISK,
>     sizeLimit?: string
>   },
>   gcs?: {
>     readOnly?: boolean,
>     bucket?: string,
>     mountOptions?: string[]
>   }
> }[]
> ```

> [accordion] containers full type
>
> ```ts theme={null}
> {
>   dependsOn?: string[],
>   resources?: {
>     limits?: Record<string, string>,
>     cpuIdle?: boolean,
>     startupCpuBoost?: boolean
>   },
>   command?: string[],
>   readinessProbe?: {
>     tcpSocket?: {
>       port?: number
>     },
>     grpc?: {
>       port?: number,
>       service?: string
>     },
>     failureThreshold?: number,
>     periodSeconds?: number,
>     initialDelaySeconds?: number,
>     timeoutSeconds?: number,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string,
>         name?: string
>       }[],
>       port?: number,
>       path?: string
>     }
>   },
>   startupProbe?: {
>     tcpSocket?: {
>       port?: number
>     },
>     grpc?: {
>       port?: number,
>       service?: string
>     },
>     failureThreshold?: number,
>     periodSeconds?: number,
>     initialDelaySeconds?: number,
>     timeoutSeconds?: number,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string,
>         name?: string
>       }[],
>       port?: number,
>       path?: string
>     }
>   },
>   args?: string[],
>   buildConfig?: {
>     dockerBuild?: {
>     },
>     serviceAccount?: string,
>     workerConfiguration?: {
>       cloudBuildWorkerConfiguration?: {
>         workerPool?: string,
>         machineType?: string
>       }
>     },
>     buildpacksBuild?: {
>       environmentVariables?: Record<string, string>,
>       cacheImageUri?: string,
>       buildBaseImageUri?: string
>     },
>     imageRepositoryUri?: string,
>     tags?: string[],
>     environmentVariables?: {
>       name?: string,
>       value?: string,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string,
>           version?: string
>         }
>       }
>     }[]
>   },
>   ports?: {
>     name?: string,
>     containerPort?: number
>   }[],
>   name?: string,
>   sourceCode?: {
>     inlinedSource?: {
>       sources?: {
>         filename?: string,
>         content?: string
>       }[]
>     },
>     cloudStorageSource?: {
>       bucket?: string,
>       object?: string,
>       generation?: string | number
>     }
>   },
>   image?: string,
>   workingDir?: string,
>   livenessProbe?: {
>     tcpSocket?: {
>       port?: number
>     },
>     grpc?: {
>       port?: number,
>       service?: string
>     },
>     failureThreshold?: number,
>     periodSeconds?: number,
>     initialDelaySeconds?: number,
>     timeoutSeconds?: number,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string,
>         name?: string
>       }[],
>       port?: number,
>       path?: string
>     }
>   },
>   env?: {
>     name?: string,
>     value?: string,
>     valueSource?: {
>       secretKeyRef?: {
>         secret?: string,
>         version?: string
>       }
>     }
>   }[],
>   volumeMounts?: {
>     subPath?: string,
>     mountPath?: string,
>     name?: string
>   }[],
>   sandboxLauncher?: boolean,
>   baseImageUri?: string
> }[]
> ```

> [accordion] vpcAccess full type
>
> ```ts theme={null}
> {
>   networkInterfaces?: {
>     network?: string,
>     tags?: string[],
>     subnetwork?: string
>   }[],
>   egress?: VPC_EGRESS_UNSPECIFIED | ALL_TRAFFIC | PRIVATE_RANGES_ONLY,
>   connector?: string
> }
> ```

> [accordion] sandboxes full type
>
> ```ts theme={null}
> {
>   templates?: {
>     args?: string[],
>     image?: string,
>     command?: string[],
>     workingDir?: string,
>     volumeMounts?: {
>       subPath?: string,
>       mountPath?: string,
>       name?: string
>     }[],
>     name?: string,
>     env?: {
>       name?: string,
>       value?: string,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string,
>           version?: string
>         }
>       }
>     }[]
>   }[]
> }
> ```

> [accordion] nodeSelector full type
>
> ```ts theme={null}
> {
>   accelerator?: string
> }
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean,
>   policy?: string,
>   breakglassJustification?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.instances.delete

`run.locations.instances.delete`

Deletes an Instance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.delete({ name: 'projects/demo-project/locations/us-central1/instances/worker-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `validateOnly` | `boolean` | No | Optional. Indicates that the request should be validated without actually deleting any resources. |
| `name` | `string` | Yes | Required. The name of the Instance to delete. Format: `projects/<id>/locations/<id>/instances/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.instances.get

`run.locations.instances.get`

Gets an Instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.get({ name: 'projects/demo-project/locations/us-central1/instances/worker-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Instance to retrieve. Format: `projects/<id>/locations/<id>/instances/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `deleteTime` | `string \| null` | No | Output only. The deletion time. |
| `iapEnabled` | `boolean \| null` | No | Optional. IAP settings on the Instance. |
| `creator` | `string \| null` | No | Output only. Email address of the authenticated creator. |
| `updateTime` | `string \| null` | No | Output only. The last-modified time. |
| `invokerIamDisabled` | `boolean \| null` | No | Optional. Disables IAM permission check for `run.routes.invoke` for callers of this Instance. For more information, visit [https://cloud.google.com/run/docs/securing/managing-access#invoker\_check](https://cloud.google.com/run/docs/securing/managing-access#invoker_check). |
| `containerStatuses` | `object[] \| null` | No | Output only. Status information for each of the specified containers. The status includes the resolved digest for specified images. |
| `createTime` | `string \| null` | No | Output only. The creation time. |
| `expireTime` | `string \| null` | No | Output only. For a deleted resource, the time after which it will be permamently deleted. |
| `observedGeneration` | `string \| number \| null` | No | Output only. The generation of this Instance currently serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an `int64` value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. |
| `encryptionKeyRevocationAction` | `string \| null` | No | The action to take if the encryption key is revoked. |
| `serviceAccount` | `string \| null` | No | — |
| `uid` | `string \| null` | No | Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. |
| `encryptionKeyShutdownDuration` | `string \| null` | No | If `encryption_key_revocation_action` is `SHUTDOWN`, the duration before shutting down all instances. The minimum increment is 1 hour. |
| `urls` | `string[] \| null` | No | Output only. All URLs serving traffic for this Instance. |
| `volumes` | `object[] \| null` | No | A list of Volumes to make available to containers. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `name` | `string \| null` | No | The fully qualified name of this Instance. In `CreateInstanceRequest`, this field is ignored, and instead composed from `CreateInstanceRequest.parent` and `CreateInstanceRequest.instance_id`. |
| `etag` | `string \| null` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `labels` | `Record<string, string> \| null` | No | — |
| `launchStage` | `string \| null` | No | The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, `GA` is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if `ALPHA` is provided as input, but only `BETA` and `GA`-level features are used, this field will be `BETA` on output. |
| `client` | `string \| null` | No | Arbitrary identifier for the API client. |
| `defaultUriDisabled` | `boolean \| null` | No | Optional. Disables public resolution of the default URI of this Instance. |
| `containers` | `object[] \| null` | No | Required. Holds the single container that defines the unit of execution for this Instance. |
| `logUri` | `string \| null` | No | Output only. The Google Console URI to obtain logs for the Instance. |
| `description` | `string \| null` | No | User-provided description of the Instance. This field currently has a 512-character limit. |
| `restartPolicy` | `string \| null` | No | Optional. Restart policy for the Instance. |
| `ingress` | `string \| null` | No | Optional. Provides the ingress settings for this Instance. On output, returns the currently observed ingress settings, or `INGRESS_TRAFFIC_UNSPECIFIED` if no revision is active. |
| `vpcAccess` | `object \| null` | No | VPC Access settings. For more information on sending traffic to a VPC network, visit [https://cloud.google.com/run/docs/configuring/connecting-vpc](https://cloud.google.com/run/docs/configuring/connecting-vpc). |
| `encryptionKey` | `string \| null` | No | A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to [https://cloud.google.com/run/docs/securing/using-cmek](https://cloud.google.com/run/docs/securing/using-cmek) |
| `terminalCondition` | `object \| null` | No | Defines a status condition for a resource. |
| `clientVersion` | `string \| null` | No | Arbitrary version identifier for the API client. |
| `sandboxes` | `object \| null` | No | Configuration for sandboxes. |
| `sshEnabled` | `boolean \| null` | No | Optional. Enables SSH access to the Instance. |
| `nodeSelector` | `object \| null` | No | Hardware constraints configuration. |
| `lastModifier` | `string \| null` | No | Output only. Email address of the last authenticated modifier. |
| `conditions` | `object[] \| null` | No | Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Instance does not reach its Serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `annotations` | `Record<string, string> \| null` | No | — |
| `generation` | `string \| number \| null` | No | Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an `int64` value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. |
| `reconciling` | `boolean \| null` | No | Output only. Returns `true` if the Instance is currently being acted upon by the system to bring it into the desired state. When a new Instance is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Instance to the desired serving state. This process is called reconciliation. While reconciliation is in process, `observed_generation` will have a transient value that might mismatch the intended state. |
| `binaryAuthorization` | `object \| null` | No | Settings for Binary Authorization feature. |
| `gpuZonalRedundancyDisabled` | `boolean \| null` | No | Optional. True if GPU zonal redundancy is disabled on this instance. |

> [accordion] containerStatuses full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   imageDigest?: string | null,
>   buildStatus?: {
>     message?: string | null,
>     cloudBuildLogUrl?: string | null,
>     status?: string | null
>   } | null
> }[] | null
> ```

> [accordion] volumes full type
>
> ```ts theme={null}
> {
>   secret?: {
>     items?: {
>       version?: string | null,
>       mode?: number | null,
>       path?: string | null
>     }[] | null,
>     secret?: string | null,
>     defaultMode?: number | null
>   } | null,
>   cloudSqlInstance?: {
>     instances?: string[] | null
>   } | null,
>   name?: string | null,
>   nfs?: {
>     server?: string | null,
>     readOnly?: boolean | null,
>     path?: string | null
>   } | null,
>   emptyDir?: {
>     medium?: string | null,
>     sizeLimit?: string | null
>   } | null,
>   gcs?: {
>     readOnly?: boolean | null,
>     bucket?: string | null,
>     mountOptions?: string[] | null
>   } | null
> }[] | null
> ```

> [accordion] containers full type
>
> ```ts theme={null}
> {
>   dependsOn?: string[] | null,
>   resources?: {
>     limits?: Record<string, string> | null,
>     cpuIdle?: boolean | null,
>     startupCpuBoost?: boolean | null
>   } | null,
>   buildInfo?: {
>     functionTarget?: string | null,
>     sourceLocation?: string | null
>   } | null,
>   command?: string[] | null,
>   readinessProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   startupProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   args?: string[] | null,
>   buildConfig?: {
>     dockerBuild?: {
>     } | null,
>     serviceAccount?: string | null,
>     workerConfiguration?: {
>       cloudBuildWorkerConfiguration?: {
>         workerPool?: string | null,
>         machineType?: string | null
>       } | null
>     } | null,
>     buildpacksBuild?: {
>       environmentVariables?: Record<string, string> | null,
>       cacheImageUri?: string | null,
>       buildBaseImageUri?: string | null
>     } | null,
>     imageRepositoryUri?: string | null,
>     tags?: string[] | null,
>     environmentVariables?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null
>   } | null,
>   ports?: {
>     name?: string | null,
>     containerPort?: number | null
>   }[] | null,
>   name?: string | null,
>   sourceCode?: {
>     inlinedSource?: {
>       sources?: {
>         filename?: string | null,
>         content?: string | null
>       }[] | null
>     } | null,
>     cloudStorageSource?: {
>       bucket?: string | null,
>       object?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   image?: string | null,
>   workingDir?: string | null,
>   livenessProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   env?: {
>     name?: string | null,
>     value?: string | null,
>     valueSource?: {
>       secretKeyRef?: {
>         secret?: string | null,
>         version?: string | null
>       } | null
>     } | null
>   }[] | null,
>   volumeMounts?: {
>     subPath?: string | null,
>     mountPath?: string | null,
>     name?: string | null
>   }[] | null,
>   sandboxLauncher?: boolean | null,
>   baseImageUri?: string | null
> }[] | null
> ```

> [accordion] vpcAccess full type
>
> ```ts theme={null}
> {
>   networkInterfaces?: {
>     network?: string | null,
>     tags?: string[] | null,
>     subnetwork?: string | null
>   }[] | null,
>   egress?: string | null,
>   connector?: string | null
> } | null
> ```

> [accordion] terminalCondition full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] sandboxes full type
>
> ```ts theme={null}
> {
>   templates?: {
>     args?: string[] | null,
>     image?: string | null,
>     command?: string[] | null,
>     workingDir?: string | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     name?: string | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] nodeSelector full type
>
> ```ts theme={null}
> {
>   accelerator?: string | null
> } | null
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean | null,
>   policy?: string | null,
>   breakglassJustification?: string | null
> } | null
> ```

***

### locations.instances.getIamPolicy

`run.locations.instances.getIamPolicy`

Gets the IAM Access Control policy currently in effect for the given Instance. This result does not include any inherited policies

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.getIamPolicy({ resource: 'projects/demo-project/locations/us-central1/instances/worker-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/instances/<id>`. |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   role?: string | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

***

### locations.instances.list

`run.locations.instances.list`

Lists Instances. Results are sorted by creation time, descending (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The location and project to list resources on. Format: `projects/<id>/locations/<id>`. |
| `pageSize` | `number` | No | Optional. Maximum number of Instances to return in this call. |
| `pageToken` | `string` | No | Optional. A page token received from a previous call to ListInstances. All other parameters must match. |
| `showDeleted` | `boolean` | No | Optional. If true, returns deleted (but unexpired) resources along with active ones. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token indicating there are more items than page\_size. Use it in the next ListInstances request to continue. |
| `instances` | `object[] \| null` | No | The resulting list of Instances. |

> [accordion] instances full type
>
> ```ts theme={null}
> {
>   deleteTime?: string | null,
>   iapEnabled?: boolean | null,
>   creator?: string | null,
>   updateTime?: string | null,
>   invokerIamDisabled?: boolean | null,
>   containerStatuses?: {
>     name?: string | null,
>     imageDigest?: string | null,
>     buildStatus?: {
>       message?: string | null,
>       cloudBuildLogUrl?: string | null,
>       status?: string | null
>     } | null
>   }[] | null,
>   createTime?: string | null,
>   expireTime?: string | null,
>   observedGeneration?: string | number | null,
>   encryptionKeyRevocationAction?: string | null,
>   serviceAccount?: string | null,
>   uid?: string | null,
>   encryptionKeyShutdownDuration?: string | null,
>   urls?: string[] | null,
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string | null,
>         mode?: number | null,
>         path?: string | null
>       }[] | null,
>       secret?: string | null,
>       defaultMode?: number | null
>     } | null,
>     cloudSqlInstance?: {
>       instances?: string[] | null
>     } | null,
>     name?: string | null,
>     nfs?: {
>       server?: string | null,
>       readOnly?: boolean | null,
>       path?: string | null
>     } | null,
>     emptyDir?: {
>       medium?: string | null,
>       sizeLimit?: string | null
>     } | null,
>     gcs?: {
>       readOnly?: boolean | null,
>       bucket?: string | null,
>       mountOptions?: string[] | null
>     } | null
>   }[] | null,
>   satisfiesPzs?: boolean | null,
>   name?: string | null,
>   etag?: string | null,
>   labels?: Record<string, string> | null,
>   launchStage?: string | null,
>   client?: string | null,
>   defaultUriDisabled?: boolean | null,
>   containers?: {
>     dependsOn?: string[] | null,
>     resources?: {
>       limits?: Record<string, string> | null,
>       cpuIdle?: boolean | null,
>       startupCpuBoost?: boolean | null
>     } | null,
>     buildInfo?: {
>       functionTarget?: string | null,
>       sourceLocation?: string | null
>     } | null,
>     command?: string[] | null,
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     args?: string[] | null,
>     buildConfig?: {
>       dockerBuild?: {
>       } | null,
>       serviceAccount?: string | null,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string | null,
>           machineType?: string | null
>         } | null
>       } | null,
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string> | null,
>         cacheImageUri?: string | null,
>         buildBaseImageUri?: string | null
>       } | null,
>       imageRepositoryUri?: string | null,
>       tags?: string[] | null,
>       environmentVariables?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     } | null,
>     ports?: {
>       name?: string | null,
>       containerPort?: number | null
>     }[] | null,
>     name?: string | null,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string | null,
>           content?: string | null
>         }[] | null
>       } | null,
>       cloudStorageSource?: {
>         bucket?: string | null,
>         object?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     image?: string | null,
>     workingDir?: string | null,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     sandboxLauncher?: boolean | null,
>     baseImageUri?: string | null
>   }[] | null,
>   logUri?: string | null,
>   description?: string | null,
>   restartPolicy?: string | null,
>   ingress?: string | null,
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string | null,
>       tags?: string[] | null,
>       subnetwork?: string | null
>     }[] | null,
>     egress?: string | null,
>     connector?: string | null
>   } | null,
>   encryptionKey?: string | null,
>   terminalCondition?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   } | null,
>   clientVersion?: string | null,
>   sandboxes?: {
>     templates?: {
>       args?: string[] | null,
>       image?: string | null,
>       command?: string[] | null,
>       workingDir?: string | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       name?: string | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   sshEnabled?: boolean | null,
>   nodeSelector?: {
>     accelerator?: string | null
>   } | null,
>   lastModifier?: string | null,
>   conditions?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   }[] | null,
>   annotations?: Record<string, string> | null,
>   generation?: string | number | null,
>   reconciling?: boolean | null,
>   binaryAuthorization?: {
>     useDefault?: boolean | null,
>     policy?: string | null,
>     breakglassJustification?: string | null
>   } | null,
>   gpuZonalRedundancyDisabled?: boolean | null
> }[] | null
> ```

***

### locations.instances.patch

`run.locations.instances.patch`

Updates an Instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.patch({ name: 'projects/demo-project/locations/us-central1/instances/worker-1', description: 'Managed by Corsair', updateMask: 'description' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowMissing` | `boolean` | No | Optional. If set to `true`, and if the Instance does not exist, it will create a new one. The caller must have `run.instances.create` permissions if this is set to `true` and the Instance does not exist. |
| `name` | `string` | Yes | The fully qualified name of this Instance. In `CreateInstanceRequest`, this field is ignored, and instead composed from `CreateInstanceRequest.parent` and `CreateInstanceRequest.instance_id`. Format: `projects/<id>/locations/<id>/instances/<id>`. |
| `validateOnly` | `boolean` | No | Optional. Indicates that the request should be validated and default values populated, without persisting the request or updating any resources. |
| `updateMask` | `string` | No | Optional. The list of fields to be updated. |
| `iapEnabled` | `boolean` | No | Optional. IAP settings on the Instance. |
| `invokerIamDisabled` | `boolean` | No | Optional. Disables IAM permission check for `run.routes.invoke` for callers of this Instance. For more information, visit [https://cloud.google.com/run/docs/securing/managing-access#invoker\_check](https://cloud.google.com/run/docs/securing/managing-access#invoker_check). |
| `encryptionKeyRevocationAction` | `ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED \| PREVENT_NEW \| SHUTDOWN` | No | The action to take if the encryption key is revoked. |
| `serviceAccount` | `string` | No | — |
| `encryptionKeyShutdownDuration` | `string` | No | If `encryption_key_revocation_action` is `SHUTDOWN`, the duration before shutting down all instances. The minimum increment is 1 hour. |
| `volumes` | `object[]` | No | A list of Volumes to make available to containers. |
| `body_name` | `string` | No | The fully qualified name of this Instance. In `CreateInstanceRequest`, this field is ignored, and instead composed from `CreateInstanceRequest.parent` and `CreateInstanceRequest.instance_id`. |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `labels` | `Record<string, string>` | No | — |
| `launchStage` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, `GA` is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if `ALPHA` is provided as input, but only `BETA` and `GA`-level features are used, this field will be `BETA` on output. |
| `client` | `string` | No | Arbitrary identifier for the API client. |
| `defaultUriDisabled` | `boolean` | No | Optional. Disables public resolution of the default URI of this Instance. |
| `containers` | `object[]` | No | Required. Holds the single container that defines the unit of execution for this Instance. |
| `description` | `string` | No | User-provided description of the Instance. This field currently has a 512-character limit. |
| `restartPolicy` | `RESTART_POLICY_UNSPECIFIED \| ALWAYS \| ON_FAILURE \| NEVER` | No | Optional. Restart policy for the Instance. |
| `ingress` | `INGRESS_TRAFFIC_UNSPECIFIED \| INGRESS_TRAFFIC_ALL \| INGRESS_TRAFFIC_INTERNAL_ONLY \| INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER \| INGRESS_TRAFFIC_NONE` | No | Optional. Provides the ingress settings for this Instance. On output, returns the currently observed ingress settings, or `INGRESS_TRAFFIC_UNSPECIFIED` if no revision is active. |
| `vpcAccess` | `object` | No | VPC Access settings. For more information on sending traffic to a VPC network, visit [https://cloud.google.com/run/docs/configuring/connecting-vpc](https://cloud.google.com/run/docs/configuring/connecting-vpc). |
| `encryptionKey` | `string` | No | A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to [https://cloud.google.com/run/docs/securing/using-cmek](https://cloud.google.com/run/docs/securing/using-cmek) |
| `clientVersion` | `string` | No | Arbitrary version identifier for the API client. |
| `sandboxes` | `object` | No | Configuration for sandboxes. |
| `sshEnabled` | `boolean` | No | Optional. Enables SSH access to the Instance. |
| `nodeSelector` | `object` | No | Hardware constraints configuration. |
| `annotations` | `Record<string, string>` | No | — |
| `binaryAuthorization` | `object` | No | Settings for Binary Authorization feature. |
| `gpuZonalRedundancyDisabled` | `boolean` | No | Optional. True if GPU zonal redundancy is disabled on this instance. |

> [accordion] volumes full type
>
> ```ts theme={null}
> {
>   secret?: {
>     items?: {
>       version?: string,
>       mode?: number,
>       path?: string
>     }[],
>     secret?: string,
>     defaultMode?: number
>   },
>   cloudSqlInstance?: {
>     instances?: string[]
>   },
>   name?: string,
>   nfs?: {
>     server?: string,
>     readOnly?: boolean,
>     path?: string
>   },
>   emptyDir?: {
>     medium?: MEDIUM_UNSPECIFIED | MEMORY | DISK,
>     sizeLimit?: string
>   },
>   gcs?: {
>     readOnly?: boolean,
>     bucket?: string,
>     mountOptions?: string[]
>   }
> }[]
> ```

> [accordion] containers full type
>
> ```ts theme={null}
> {
>   dependsOn?: string[],
>   resources?: {
>     limits?: Record<string, string>,
>     cpuIdle?: boolean,
>     startupCpuBoost?: boolean
>   },
>   command?: string[],
>   readinessProbe?: {
>     tcpSocket?: {
>       port?: number
>     },
>     grpc?: {
>       port?: number,
>       service?: string
>     },
>     failureThreshold?: number,
>     periodSeconds?: number,
>     initialDelaySeconds?: number,
>     timeoutSeconds?: number,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string,
>         name?: string
>       }[],
>       port?: number,
>       path?: string
>     }
>   },
>   startupProbe?: {
>     tcpSocket?: {
>       port?: number
>     },
>     grpc?: {
>       port?: number,
>       service?: string
>     },
>     failureThreshold?: number,
>     periodSeconds?: number,
>     initialDelaySeconds?: number,
>     timeoutSeconds?: number,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string,
>         name?: string
>       }[],
>       port?: number,
>       path?: string
>     }
>   },
>   args?: string[],
>   buildConfig?: {
>     dockerBuild?: {
>     },
>     serviceAccount?: string,
>     workerConfiguration?: {
>       cloudBuildWorkerConfiguration?: {
>         workerPool?: string,
>         machineType?: string
>       }
>     },
>     buildpacksBuild?: {
>       environmentVariables?: Record<string, string>,
>       cacheImageUri?: string,
>       buildBaseImageUri?: string
>     },
>     imageRepositoryUri?: string,
>     tags?: string[],
>     environmentVariables?: {
>       name?: string,
>       value?: string,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string,
>           version?: string
>         }
>       }
>     }[]
>   },
>   ports?: {
>     name?: string,
>     containerPort?: number
>   }[],
>   name?: string,
>   sourceCode?: {
>     inlinedSource?: {
>       sources?: {
>         filename?: string,
>         content?: string
>       }[]
>     },
>     cloudStorageSource?: {
>       bucket?: string,
>       object?: string,
>       generation?: string | number
>     }
>   },
>   image?: string,
>   workingDir?: string,
>   livenessProbe?: {
>     tcpSocket?: {
>       port?: number
>     },
>     grpc?: {
>       port?: number,
>       service?: string
>     },
>     failureThreshold?: number,
>     periodSeconds?: number,
>     initialDelaySeconds?: number,
>     timeoutSeconds?: number,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string,
>         name?: string
>       }[],
>       port?: number,
>       path?: string
>     }
>   },
>   env?: {
>     name?: string,
>     value?: string,
>     valueSource?: {
>       secretKeyRef?: {
>         secret?: string,
>         version?: string
>       }
>     }
>   }[],
>   volumeMounts?: {
>     subPath?: string,
>     mountPath?: string,
>     name?: string
>   }[],
>   sandboxLauncher?: boolean,
>   baseImageUri?: string
> }[]
> ```

> [accordion] vpcAccess full type
>
> ```ts theme={null}
> {
>   networkInterfaces?: {
>     network?: string,
>     tags?: string[],
>     subnetwork?: string
>   }[],
>   egress?: VPC_EGRESS_UNSPECIFIED | ALL_TRAFFIC | PRIVATE_RANGES_ONLY,
>   connector?: string
> }
> ```

> [accordion] sandboxes full type
>
> ```ts theme={null}
> {
>   templates?: {
>     args?: string[],
>     image?: string,
>     command?: string[],
>     workingDir?: string,
>     volumeMounts?: {
>       subPath?: string,
>       mountPath?: string,
>       name?: string
>     }[],
>     name?: string,
>     env?: {
>       name?: string,
>       value?: string,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string,
>           version?: string
>         }
>       }
>     }[]
>   }[]
> }
> ```

> [accordion] nodeSelector full type
>
> ```ts theme={null}
> {
>   accelerator?: string
> }
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean,
>   policy?: string,
>   breakglassJustification?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.instances.setIamPolicy

`run.locations.instances.setIamPolicy`

Sets the IAM Access control policy for the specified Instance. Overwrites any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.setIamPolicy({
	resource: 'projects/demo-project/locations/us-central1/instances/worker-1',
	policy: {
		bindings: [{
			role: 'roles/run.invoker',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/instances/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   bindings?: {
>     members?: string[],
>     role?: string,
>     condition?: {
>       title?: string,
>       location?: string,
>       description?: string,
>       expression?: string
>     }
>   }[],
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   role?: string | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

***

### locations.instances.start

`run.locations.instances.start`

Starts an Instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.start({ name: 'projects/demo-project/locations/us-central1/instances/worker-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Instance to start. Format: `projects/<id>/locations/<id>/instances/<id>`. |
| `validateOnly` | `boolean` | No | Optional. Indicates that the request should be validated without actually stopping any resources. |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.instances.stop

`run.locations.instances.stop`

Stops an Instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.stop({ name: 'projects/demo-project/locations/us-central1/instances/worker-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Instance to stop. Format: `projects/<id>/locations/<id>/instances/<id>`. |
| `validateOnly` | `boolean` | No | Optional. Indicates that the request should be validated without actually stopping any resources. |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.instances.testIamPermissions

`run.locations.instances.testIamPermissions`

Returns permissions that a caller has on the specified Instance. There are no permissions required for making this API call

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.instances.testIamPermissions({
	resource: 'projects/demo-project/locations/us-central1/instances/worker-1',
	permissions: ['run.instances.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/instances/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### locations.jobs.create

`run.locations.jobs.create`

Creates a Job

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.create({
	parent: 'projects/demo-project/locations/us-central1',
	jobId: 'nightly-report',
	template: {
		template: {
			containers: [{ image: 'us-central1-docker.pkg.dev/demo-project/docker/api:v1' }],
		},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `jobId` | `string` | No | Optional. The unique identifier for the Job. The name of the job becomes \{parent}/jobs/\{job\_id}. If not provided, the server will generate a unique `job_id`. |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated and default values populated, without persisting the request or creating any resources. |
| `parent` | `string` | Yes | Required. The location and project in which this Job should be created. Format: projects/\{project}/locations/\{location}, where \{project} can be project id or number. Format: `projects/<id>/locations/<id>`. |
| `annotations` | `Record<string, string>` | No | Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected on new resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes annotations' namespacing, limits, and rules. |
| `launchStage` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `startExecutionToken` | `string` | No | A unique string used as a suffix creating a new execution. The Job will become ready when the execution is successfully started. The sum of job name and token length must be fewer than 63 characters. |
| `client` | `string` | No | Arbitrary identifier for the API client. |
| `binaryAuthorization` | `object` | No | Settings for Binary Authorization feature. |
| `template` | `object` | No | ExecutionTemplate describes the data an execution should have when created from a template. |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `runExecutionToken` | `string` | No | A unique string used as a suffix for creating a new execution. The Job will become ready when the execution is successfully completed. The sum of job name and token length must be fewer than 63 characters. |
| `name` | `string` | No | The fully qualified name of this Job. Format: projects/\{project}/locations/\{location}/jobs/\{job} |
| `labels` | `Record<string, string>` | No | Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. |
| `functionalType` | `FUNCTIONAL_TYPE_UNSPECIFIED \| FUNCTIONAL_TYPE_AGENT \| FUNCTIONAL_TYPE_MCP_SERVER` | No | Optional. The functional type of the Job. |
| `clientVersion` | `string` | No | Arbitrary version identifier for the API client. |

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean,
>   policy?: string,
>   breakglassJustification?: string
> }
> ```

> [accordion] template full type
>
> ```ts theme={null}
> {
>   parallelism?: number,
>   taskCount?: number,
>   clientVersion?: string,
>   template?: {
>     encryptionKey?: string,
>     timeout?: string,
>     gpuZonalRedundancyDisabled?: boolean,
>     executionEnvironment?: EXECUTION_ENVIRONMENT_UNSPECIFIED | EXECUTION_ENVIRONMENT_GEN1 | EXECUTION_ENVIRONMENT_GEN2,
>     vpcAccess?: {
>       networkInterfaces?: {
>         network?: string,
>         tags?: string[],
>         subnetwork?: string
>       }[],
>       egress?: VPC_EGRESS_UNSPECIFIED | ALL_TRAFFIC | PRIVATE_RANGES_ONLY,
>       connector?: string
>     },
>     volumes?: {
>       secret?: {
>         items?: {
>           version?: string,
>           mode?: number,
>           path?: string
>         }[],
>         secret?: string,
>         defaultMode?: number
>       },
>       cloudSqlInstance?: {
>         instances?: string[]
>       },
>       name?: string,
>       nfs?: {
>         server?: string,
>         readOnly?: boolean,
>         path?: string
>       },
>       emptyDir?: {
>         medium?: MEDIUM_UNSPECIFIED | MEMORY | DISK,
>         sizeLimit?: string
>       },
>       gcs?: {
>         readOnly?: boolean,
>         bucket?: string,
>         mountOptions?: string[]
>       }
>     }[],
>     serviceAccount?: string,
>     containers?: {
>       dependsOn?: string[],
>       resources?: {
>         limits?: Record<string, string>,
>         cpuIdle?: boolean,
>         startupCpuBoost?: boolean
>       },
>       command?: string[],
>       readinessProbe?: {
>         tcpSocket?: {
>           port?: number
>         },
>         grpc?: {
>           port?: number,
>           service?: string
>         },
>         failureThreshold?: number,
>         periodSeconds?: number,
>         initialDelaySeconds?: number,
>         timeoutSeconds?: number,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string,
>             name?: string
>           }[],
>           port?: number,
>           path?: string
>         }
>       },
>       startupProbe?: {
>         tcpSocket?: {
>           port?: number
>         },
>         grpc?: {
>           port?: number,
>           service?: string
>         },
>         failureThreshold?: number,
>         periodSeconds?: number,
>         initialDelaySeconds?: number,
>         timeoutSeconds?: number,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string,
>             name?: string
>           }[],
>           port?: number,
>           path?: string
>         }
>       },
>       args?: string[],
>       buildConfig?: {
>         dockerBuild?: {
>         },
>         serviceAccount?: string,
>         workerConfiguration?: {
>           cloudBuildWorkerConfiguration?: {
>             workerPool?: string,
>             machineType?: string
>           }
>         },
>         buildpacksBuild?: {
>           environmentVariables?: Record<string, string>,
>           cacheImageUri?: string,
>           buildBaseImageUri?: string
>         },
>         imageRepositoryUri?: string,
>         tags?: string[],
>         environmentVariables?: {
>           name?: string,
>           value?: string,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string,
>               version?: string
>             }
>           }
>         }[]
>       },
>       ports?: {
>         name?: string,
>         containerPort?: number
>       }[],
>       name?: string,
>       sourceCode?: {
>         inlinedSource?: {
>           sources?: {
>             filename?: string,
>             content?: string
>           }[]
>         },
>         cloudStorageSource?: {
>           bucket?: string,
>           object?: string,
>           generation?: string | number
>         }
>       },
>       image?: string,
>       workingDir?: string,
>       livenessProbe?: {
>         tcpSocket?: {
>           port?: number
>         },
>         grpc?: {
>           port?: number,
>           service?: string
>         },
>         failureThreshold?: number,
>         periodSeconds?: number,
>         initialDelaySeconds?: number,
>         timeoutSeconds?: number,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string,
>             name?: string
>           }[],
>           port?: number,
>           path?: string
>         }
>       },
>       env?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[],
>       volumeMounts?: {
>         subPath?: string,
>         mountPath?: string,
>         name?: string
>       }[],
>       sandboxLauncher?: boolean,
>       baseImageUri?: string
>     }[],
>     maxRetries?: number,
>     sandboxes?: {
>       templates?: {
>         args?: string[],
>         image?: string,
>         command?: string[],
>         workingDir?: string,
>         volumeMounts?: {
>           subPath?: string,
>           mountPath?: string,
>           name?: string
>         }[],
>         name?: string,
>         env?: {
>           name?: string,
>           value?: string,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string,
>               version?: string
>             }
>           }
>         }[]
>       }[]
>     },
>     workloadIdentityConfig?: {
>       identityType?: IDENTITY_TYPE_UNSPECIFIED | IDENTITY_TYPE_SERVICE_ACCOUNT | IDENTITY_TYPE_AGENT_IDENTITY,
>       identity?: string,
>       identityCertificateEnabled?: boolean
>     },
>     nodeSelector?: {
>       accelerator?: string
>     }
>   },
>   delayExecution?: boolean,
>   annotations?: Record<string, string>,
>   client?: string,
>   labels?: Record<string, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.jobs.delete

`run.locations.jobs.delete`

Deletes a Job

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.delete({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated without actually deleting any resources. |
| `etag` | `string` | No | A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `name` | `string` | Yes | Required. The full name of the Job. Format: projects/\{project}/locations/\{location}/jobs/\{job}, where \{project} can be project id or number. Format: `projects/<id>/locations/<id>/jobs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.jobs.executions.cancel

`run.locations.jobs.executions.cancel`

Cancels an Execution

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.executions.cancel({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report/executions/nightly-report-abc12' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Execution to cancel. Format: `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, where `{project}` can be project id or number. Format: `projects/<id>/locations/<id>/jobs/<id>/executions/<id>`. |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated without actually cancelling any resources. |
| `etag` | `string` | No | A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.jobs.executions.delete

`run.locations.jobs.executions.delete`

Deletes an Execution

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.executions.delete({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report/executions/nightly-report-abc12' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the Execution to delete. Format: `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, where `{project}` can be project id or number. Format: `projects/<id>/locations/<id>/jobs/<id>/executions/<id>`. |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated without actually deleting any resources. |
| `etag` | `string` | No | A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.jobs.executions.exportStatus

`run.locations.jobs.executions.exportStatus`

Read the status of an image export operation

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.executions.exportStatus({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report/executions/nightly-report-abc12', operationId: 'operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the resource of which image export operation status has to be fetched. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution Format: `projects/<id>/locations/<id>/jobs/<id>/executions/<id>`. |
| `operationId` | `string` | Yes | Required. The operation id returned from ExportImage. Format: `<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `imageExportStatuses` | `object[] \| null` | No | The status of each image export job. |
| `operationId` | `string \| null` | No | The operation id. |
| `operationState` | `string \| null` | No | Output only. The state of the overall export operation. |

> [accordion] imageExportStatuses full type
>
> ```ts theme={null}
> {
>   exportJobState?: string | null,
>   exportedImageDigest?: string | null,
>   tag?: string | null,
>   status?: {
>     messageSet?: {
>     } | null,
>     code?: number | null,
>     canonicalCode?: number | null,
>     message?: string | null,
>     space?: string | null
>   } | null
> }[] | null
> ```

***

### locations.jobs.executions.get

`run.locations.jobs.executions.get`

Gets information about an Execution

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.executions.get({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report/executions/nightly-report-abc12' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the Execution. Format: `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, where `{project}` can be project id or number. Format: `projects/<id>/locations/<id>/jobs/<id>/executions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `labels` | `Record<string, string> \| null` | No | Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels) |
| `updateTime` | `string \| null` | No | Output only. The last-modified time. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `createTime` | `string \| null` | No | Output only. Represents time when the execution was acknowledged by the execution controller. It is not guaranteed to be set in happens-before order across separate operations. |
| `expireTime` | `string \| null` | No | Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request. |
| `deleteTime` | `string \| null` | No | Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request. |
| `observedGeneration` | `string \| number \| null` | No | Output only. The generation of this Execution. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `completionTime` | `string \| null` | No | Output only. Represents time when the execution was completed. It is not guaranteed to be set in happens-before order across separate operations. |
| `uid` | `string \| null` | No | Output only. Server assigned unique identifier for the Execution. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. |
| `cancelledCount` | `number \| null` | No | Output only. The number of tasks which reached phase Cancelled. |
| `template` | `object \| null` | No | TaskTemplate describes the data a task should have when created from a template. |
| `succeededCount` | `number \| null` | No | Output only. The number of tasks which reached phase Succeeded. |
| `clientVersion` | `string \| null` | No | Output only. Arbitrary version identifier for the API client. |
| `taskCount` | `number \| null` | No | Output only. Specifies the desired number of tasks the execution should run. Setting to 1 means that parallelism is limited to 1 and the success of that task signals the success of the execution. |
| `name` | `string \| null` | No | Output only. The unique name of this Execution. |
| `startTime` | `string \| null` | No | Output only. Represents time when the execution started to run. It is not guaranteed to be set in happens-before order across separate operations. |
| `failedCount` | `number \| null` | No | Output only. The number of tasks which reached phase Failed. |
| `launchStage` | `string \| null` | No | The least stable launch stage needed to create this resource, as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are used, this field will be BETA. |
| `retriedCount` | `number \| null` | No | Output only. The number of tasks which have retried at least once. |
| `parallelism` | `number \| null` | No | Output only. Specifies the maximum desired number of tasks the execution should run at any given time. Must be \<= task\_count. The actual number of tasks running in steady state will be less than this number when ((.spec.task\_count - .status.successful) \< .spec.parallelism), i.e. when the work left to do is less than max parallelism. |
| `etag` | `string \| null` | No | Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `creator` | `string \| null` | No | Output only. Email address of the authenticated creator. |
| `generation` | `string \| number \| null` | No | Output only. A number that monotonically increases every time the user modifies the desired state. |
| `job` | `string \| null` | No | Output only. The name of the parent Job. |
| `reconciling` | `boolean \| null` | No | Output only. Indicates whether the resource's reconciliation is still in progress. See comments in `Job.reconciling` for additional information on reconciliation process in Cloud Run. |
| `client` | `string \| null` | No | Output only. Arbitrary identifier for the API client. |
| `runningCount` | `number \| null` | No | Output only. The number of actively running tasks. |
| `logUri` | `string \| null` | No | Output only. URI where logs for this execution can be found in Cloud Console. |
| `annotations` | `Record<string, string> \| null` | No | Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. |
| `conditions` | `object[] \| null` | No | Output only. The Condition of this Execution, containing its readiness status, and detailed error information in case it did not reach the desired state. |

> [accordion] template full type
>
> ```ts theme={null}
> {
>   encryptionKey?: string | null,
>   timeout?: string | null,
>   gpuZonalRedundancyDisabled?: boolean | null,
>   executionEnvironment?: string | null,
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string | null,
>       tags?: string[] | null,
>       subnetwork?: string | null
>     }[] | null,
>     egress?: string | null,
>     connector?: string | null
>   } | null,
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string | null,
>         mode?: number | null,
>         path?: string | null
>       }[] | null,
>       secret?: string | null,
>       defaultMode?: number | null
>     } | null,
>     cloudSqlInstance?: {
>       instances?: string[] | null
>     } | null,
>     name?: string | null,
>     nfs?: {
>       server?: string | null,
>       readOnly?: boolean | null,
>       path?: string | null
>     } | null,
>     emptyDir?: {
>       medium?: string | null,
>       sizeLimit?: string | null
>     } | null,
>     gcs?: {
>       readOnly?: boolean | null,
>       bucket?: string | null,
>       mountOptions?: string[] | null
>     } | null
>   }[] | null,
>   serviceAccount?: string | null,
>   containers?: {
>     dependsOn?: string[] | null,
>     resources?: {
>       limits?: Record<string, string> | null,
>       cpuIdle?: boolean | null,
>       startupCpuBoost?: boolean | null
>     } | null,
>     buildInfo?: {
>       functionTarget?: string | null,
>       sourceLocation?: string | null
>     } | null,
>     command?: string[] | null,
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     args?: string[] | null,
>     buildConfig?: {
>       dockerBuild?: {
>       } | null,
>       serviceAccount?: string | null,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string | null,
>           machineType?: string | null
>         } | null
>       } | null,
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string> | null,
>         cacheImageUri?: string | null,
>         buildBaseImageUri?: string | null
>       } | null,
>       imageRepositoryUri?: string | null,
>       tags?: string[] | null,
>       environmentVariables?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     } | null,
>     ports?: {
>       name?: string | null,
>       containerPort?: number | null
>     }[] | null,
>     name?: string | null,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string | null,
>           content?: string | null
>         }[] | null
>       } | null,
>       cloudStorageSource?: {
>         bucket?: string | null,
>         object?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     image?: string | null,
>     workingDir?: string | null,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     sandboxLauncher?: boolean | null,
>     baseImageUri?: string | null
>   }[] | null,
>   maxRetries?: number | null,
>   sandboxes?: {
>     templates?: {
>       args?: string[] | null,
>       image?: string | null,
>       command?: string[] | null,
>       workingDir?: string | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       name?: string | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   workloadIdentityConfig?: {
>     identityType?: string | null,
>     identity?: string | null,
>     identityCertificateEnabled?: boolean | null
>   } | null,
>   nodeSelector?: {
>     accelerator?: string | null
>   } | null
> } | null
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> }[] | null
> ```

***

### locations.jobs.executions.list

`run.locations.jobs.executions.list`

Lists Executions from a Job. Results are sorted by creation time, descending (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.executions.list({ parent: 'projects/demo-project/locations/us-central1/jobs/nightly-report' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `showDeleted` | `boolean` | No | If true, returns deleted (but unexpired) resources along with active ones. |
| `pageToken` | `string` | No | A page token received from a previous call to ListExecutions. All other parameters must match. |
| `pageSize` | `number` | No | Maximum number of Executions to return in this call. |
| `parent` | `string` | Yes | Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use "-" instead of Job name. Format: `projects/{project}/locations/{location}/jobs/{job}`, where `{project}` can be project id or number. Format: `projects/<id>/locations/<id>/jobs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `executions` | `object[] \| null` | No | The resulting list of Executions. |
| `nextPageToken` | `string \| null` | No | A token indicating there are more items than page\_size. Use it in the next ListExecutions request to continue. |

> [accordion] executions full type
>
> ```ts theme={null}
> {
>   labels?: Record<string, string> | null,
>   updateTime?: string | null,
>   satisfiesPzs?: boolean | null,
>   createTime?: string | null,
>   expireTime?: string | null,
>   deleteTime?: string | null,
>   observedGeneration?: string | number | null,
>   completionTime?: string | null,
>   uid?: string | null,
>   cancelledCount?: number | null,
>   template?: {
>     encryptionKey?: string | null,
>     timeout?: string | null,
>     gpuZonalRedundancyDisabled?: boolean | null,
>     executionEnvironment?: string | null,
>     vpcAccess?: {
>       networkInterfaces?: {
>         network?: string | null,
>         tags?: string[] | null,
>         subnetwork?: string | null
>       }[] | null,
>       egress?: string | null,
>       connector?: string | null
>     } | null,
>     volumes?: {
>       secret?: {
>         items?: {
>           version?: string | null,
>           mode?: number | null,
>           path?: string | null
>         }[] | null,
>         secret?: string | null,
>         defaultMode?: number | null
>       } | null,
>       cloudSqlInstance?: {
>         instances?: string[] | null
>       } | null,
>       name?: string | null,
>       nfs?: {
>         server?: string | null,
>         readOnly?: boolean | null,
>         path?: string | null
>       } | null,
>       emptyDir?: {
>         medium?: string | null,
>         sizeLimit?: string | null
>       } | null,
>       gcs?: {
>         readOnly?: boolean | null,
>         bucket?: string | null,
>         mountOptions?: string[] | null
>       } | null
>     }[] | null,
>     serviceAccount?: string | null,
>     containers?: {
>       dependsOn?: string[] | null,
>       resources?: {
>         limits?: Record<string, string> | null,
>         cpuIdle?: boolean | null,
>         startupCpuBoost?: boolean | null
>       } | null,
>       buildInfo?: {
>         functionTarget?: string | null,
>         sourceLocation?: string | null
>       } | null,
>       command?: string[] | null,
>       readinessProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       startupProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       args?: string[] | null,
>       buildConfig?: {
>         dockerBuild?: {
>         } | null,
>         serviceAccount?: string | null,
>         workerConfiguration?: {
>           cloudBuildWorkerConfiguration?: {
>             workerPool?: string | null,
>             machineType?: string | null
>           } | null
>         } | null,
>         buildpacksBuild?: {
>           environmentVariables?: Record<string, string> | null,
>           cacheImageUri?: string | null,
>           buildBaseImageUri?: string | null
>         } | null,
>         imageRepositoryUri?: string | null,
>         tags?: string[] | null,
>         environmentVariables?: {
>           name?: string | null,
>           value?: string | null,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string | null,
>               version?: string | null
>             } | null
>           } | null
>         }[] | null
>       } | null,
>       ports?: {
>         name?: string | null,
>         containerPort?: number | null
>       }[] | null,
>       name?: string | null,
>       sourceCode?: {
>         inlinedSource?: {
>           sources?: {
>             filename?: string | null,
>             content?: string | null
>           }[] | null
>         } | null,
>         cloudStorageSource?: {
>           bucket?: string | null,
>           object?: string | null,
>           generation?: string | number | null
>         } | null
>       } | null,
>       image?: string | null,
>       workingDir?: string | null,
>       livenessProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       sandboxLauncher?: boolean | null,
>       baseImageUri?: string | null
>     }[] | null,
>     maxRetries?: number | null,
>     sandboxes?: {
>       templates?: {
>         args?: string[] | null,
>         image?: string | null,
>         command?: string[] | null,
>         workingDir?: string | null,
>         volumeMounts?: {
>           subPath?: string | null,
>           mountPath?: string | null,
>           name?: string | null
>         }[] | null,
>         name?: string | null,
>         env?: {
>           name?: string | null,
>           value?: string | null,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string | null,
>               version?: string | null
>             } | null
>           } | null
>         }[] | null
>       }[] | null
>     } | null,
>     workloadIdentityConfig?: {
>       identityType?: string | null,
>       identity?: string | null,
>       identityCertificateEnabled?: boolean | null
>     } | null,
>     nodeSelector?: {
>       accelerator?: string | null
>     } | null
>   } | null,
>   succeededCount?: number | null,
>   clientVersion?: string | null,
>   taskCount?: number | null,
>   name?: string | null,
>   startTime?: string | null,
>   failedCount?: number | null,
>   launchStage?: string | null,
>   retriedCount?: number | null,
>   parallelism?: number | null,
>   etag?: string | null,
>   creator?: string | null,
>   generation?: string | number | null,
>   job?: string | null,
>   reconciling?: boolean | null,
>   client?: string | null,
>   runningCount?: number | null,
>   logUri?: string | null,
>   annotations?: Record<string, string> | null,
>   conditions?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   }[] | null
> }[] | null
> ```

***

### locations.jobs.executions.tasks.get

`run.locations.jobs.executions.tasks.get`

Gets information about a Task

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.executions.tasks.get({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report/executions/nightly-report-abc12/tasks/task-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the Task. Format: projects/\{project}/locations/\{location}/jobs/\{job}/executions/\{execution}/tasks/\{task} Format: `projects/<id>/locations/<id>/jobs/<id>/executions/<id>/tasks/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job` | `string \| null` | No | Output only. The name of the parent Job. |
| `volumes` | `object[] \| null` | No | A list of Volumes to make available to containers. |
| `observedGeneration` | `string \| number \| null` | No | Output only. The generation of this Task. See comments in `Job.reconciling` for additional information on reconciliation process in Cloud Run. |
| `updateTime` | `string \| null` | No | Output only. The last-modified time. |
| `createTime` | `string \| null` | No | Output only. Represents time when the task was created by the system. It is not guaranteed to be set in happens-before order across separate operations. |
| `expireTime` | `string \| null` | No | Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request. |
| `nodeSelector` | `object \| null` | No | Hardware constraints configuration. |
| `deleteTime` | `string \| null` | No | Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request. |
| `labels` | `Record<string, string> \| null` | No | Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels) |
| `executionEnvironment` | `string \| null` | No | The execution environment being used to host this Task. |
| `logUri` | `string \| null` | No | Output only. URI where logs for this execution can be found in Cloud Console. |
| `annotations` | `Record<string, string> \| null` | No | Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. |
| `vpcAccess` | `object \| null` | No | VPC Access settings. For more information on sending traffic to a VPC network, visit [https://cloud.google.com/run/docs/configuring/connecting-vpc](https://cloud.google.com/run/docs/configuring/connecting-vpc). |
| `uid` | `string \| null` | No | Output only. Server assigned unique identifier for the Task. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. |
| `timeout` | `string \| null` | No | Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout. |
| `generation` | `string \| number \| null` | No | Output only. A number that monotonically increases every time the user modifies the desired state. |
| `index` | `number \| null` | No | Output only. Index of the Task, unique per execution, and beginning at 0. |
| `reconciling` | `boolean \| null` | No | Output only. Indicates whether the resource's reconciliation is still in progress. See comments in `Job.reconciling` for additional information on reconciliation process in Cloud Run. |
| `scheduledTime` | `string \| null` | No | Output only. Represents time when the task was scheduled to run by the system. It is not guaranteed to be set in happens-before order across separate operations. |
| `conditions` | `object[] \| null` | No | Output only. The Condition of this Task, containing its readiness status, and detailed error information in case it did not reach the desired state. |
| `maxRetries` | `number \| null` | No | Number of retries allowed per Task, before marking this Task failed. |
| `gpuZonalRedundancyDisabled` | `boolean \| null` | No | Optional. Output only. True if GPU zonal redundancy is disabled on this task. |
| `completionTime` | `string \| null` | No | Output only. Represents time when the Task was completed. It is not guaranteed to be set in happens-before order across separate operations. |
| `execution` | `string \| null` | No | Output only. The name of the parent Execution. |
| `serviceAccount` | `string \| null` | No | Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account. |
| `encryptionKey` | `string \| null` | No | Output only. A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to [https://cloud.google.com/run/docs/securing/using-cmek](https://cloud.google.com/run/docs/securing/using-cmek) |
| `name` | `string \| null` | No | Output only. The unique name of this Task. |
| `sandboxes` | `object \| null` | No | Configuration for sandboxes. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `retried` | `number \| null` | No | Output only. The number of times this Task was retried. Tasks are retried when they fail up to the maxRetries limit. |
| `etag` | `string \| null` | No | Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `startTime` | `string \| null` | No | Output only. Represents time when the task started to run. It is not guaranteed to be set in happens-before order across separate operations. |
| `containers` | `object[] \| null` | No | Holds the single container that defines the unit of execution for this task. |
| `lastAttemptResult` | `object \| null` | No | Result of a task attempt. |
| `workloadIdentityConfig` | `object \| null` | No | Workload identity settings. |

> [accordion] volumes full type
>
> ```ts theme={null}
> {
>   secret?: {
>     items?: {
>       version?: string | null,
>       mode?: number | null,
>       path?: string | null
>     }[] | null,
>     secret?: string | null,
>     defaultMode?: number | null
>   } | null,
>   cloudSqlInstance?: {
>     instances?: string[] | null
>   } | null,
>   name?: string | null,
>   nfs?: {
>     server?: string | null,
>     readOnly?: boolean | null,
>     path?: string | null
>   } | null,
>   emptyDir?: {
>     medium?: string | null,
>     sizeLimit?: string | null
>   } | null,
>   gcs?: {
>     readOnly?: boolean | null,
>     bucket?: string | null,
>     mountOptions?: string[] | null
>   } | null
> }[] | null
> ```

> [accordion] nodeSelector full type
>
> ```ts theme={null}
> {
>   accelerator?: string | null
> } | null
> ```

> [accordion] vpcAccess full type
>
> ```ts theme={null}
> {
>   networkInterfaces?: {
>     network?: string | null,
>     tags?: string[] | null,
>     subnetwork?: string | null
>   }[] | null,
>   egress?: string | null,
>   connector?: string | null
> } | null
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] sandboxes full type
>
> ```ts theme={null}
> {
>   templates?: {
>     args?: string[] | null,
>     image?: string | null,
>     command?: string[] | null,
>     workingDir?: string | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     name?: string | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] containers full type
>
> ```ts theme={null}
> {
>   dependsOn?: string[] | null,
>   resources?: {
>     limits?: Record<string, string> | null,
>     cpuIdle?: boolean | null,
>     startupCpuBoost?: boolean | null
>   } | null,
>   buildInfo?: {
>     functionTarget?: string | null,
>     sourceLocation?: string | null
>   } | null,
>   command?: string[] | null,
>   readinessProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   startupProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   args?: string[] | null,
>   buildConfig?: {
>     dockerBuild?: {
>     } | null,
>     serviceAccount?: string | null,
>     workerConfiguration?: {
>       cloudBuildWorkerConfiguration?: {
>         workerPool?: string | null,
>         machineType?: string | null
>       } | null
>     } | null,
>     buildpacksBuild?: {
>       environmentVariables?: Record<string, string> | null,
>       cacheImageUri?: string | null,
>       buildBaseImageUri?: string | null
>     } | null,
>     imageRepositoryUri?: string | null,
>     tags?: string[] | null,
>     environmentVariables?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null
>   } | null,
>   ports?: {
>     name?: string | null,
>     containerPort?: number | null
>   }[] | null,
>   name?: string | null,
>   sourceCode?: {
>     inlinedSource?: {
>       sources?: {
>         filename?: string | null,
>         content?: string | null
>       }[] | null
>     } | null,
>     cloudStorageSource?: {
>       bucket?: string | null,
>       object?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   image?: string | null,
>   workingDir?: string | null,
>   livenessProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   env?: {
>     name?: string | null,
>     value?: string | null,
>     valueSource?: {
>       secretKeyRef?: {
>         secret?: string | null,
>         version?: string | null
>       } | null
>     } | null
>   }[] | null,
>   volumeMounts?: {
>     subPath?: string | null,
>     mountPath?: string | null,
>     name?: string | null
>   }[] | null,
>   sandboxLauncher?: boolean | null,
>   baseImageUri?: string | null
> }[] | null
> ```

> [accordion] lastAttemptResult full type
>
> ```ts theme={null}
> {
>   termSignal?: number | null,
>   status?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   exitCode?: number | null
> } | null
> ```

> [accordion] workloadIdentityConfig full type
>
> ```ts theme={null}
> {
>   identityType?: string | null,
>   identity?: string | null,
>   identityCertificateEnabled?: boolean | null
> } | null
> ```

***

### locations.jobs.executions.tasks.list

`run.locations.jobs.executions.tasks.list`

Lists Tasks from an Execution of a Job (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.executions.tasks.list({ parent: 'projects/demo-project/locations/us-central1/jobs/nightly-report/executions/nightly-report-abc12' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A page token received from a previous call to ListTasks. All other parameters must match. |
| `parent` | `string` | Yes | Required. The Execution from which the Tasks should be listed. To list all Tasks across Executions of a Job, use "-" instead of Execution name. To list all Tasks across Jobs, use "-" instead of Job name. Format: projects/\{project}/locations/\{location}/jobs/\{job}/executions/\{execution} Format: `projects/<id>/locations/<id>/jobs/<id>/executions/<id>`. |
| `showDeleted` | `boolean` | No | If true, returns deleted (but unexpired) resources along with active ones. |
| `pageSize` | `number` | No | Maximum number of Tasks to return in this call. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token indicating there are more items than page\_size. Use it in the next ListTasks request to continue. |
| `tasks` | `object[] \| null` | No | The resulting list of Tasks. |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   job?: string | null,
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string | null,
>         mode?: number | null,
>         path?: string | null
>       }[] | null,
>       secret?: string | null,
>       defaultMode?: number | null
>     } | null,
>     cloudSqlInstance?: {
>       instances?: string[] | null
>     } | null,
>     name?: string | null,
>     nfs?: {
>       server?: string | null,
>       readOnly?: boolean | null,
>       path?: string | null
>     } | null,
>     emptyDir?: {
>       medium?: string | null,
>       sizeLimit?: string | null
>     } | null,
>     gcs?: {
>       readOnly?: boolean | null,
>       bucket?: string | null,
>       mountOptions?: string[] | null
>     } | null
>   }[] | null,
>   observedGeneration?: string | number | null,
>   updateTime?: string | null,
>   createTime?: string | null,
>   expireTime?: string | null,
>   nodeSelector?: {
>     accelerator?: string | null
>   } | null,
>   deleteTime?: string | null,
>   labels?: Record<string, string> | null,
>   executionEnvironment?: string | null,
>   logUri?: string | null,
>   annotations?: Record<string, string> | null,
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string | null,
>       tags?: string[] | null,
>       subnetwork?: string | null
>     }[] | null,
>     egress?: string | null,
>     connector?: string | null
>   } | null,
>   uid?: string | null,
>   timeout?: string | null,
>   generation?: string | number | null,
>   index?: number | null,
>   reconciling?: boolean | null,
>   scheduledTime?: string | null,
>   conditions?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   }[] | null,
>   maxRetries?: number | null,
>   gpuZonalRedundancyDisabled?: boolean | null,
>   completionTime?: string | null,
>   execution?: string | null,
>   serviceAccount?: string | null,
>   encryptionKey?: string | null,
>   name?: string | null,
>   sandboxes?: {
>     templates?: {
>       args?: string[] | null,
>       image?: string | null,
>       command?: string[] | null,
>       workingDir?: string | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       name?: string | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   satisfiesPzs?: boolean | null,
>   retried?: number | null,
>   etag?: string | null,
>   startTime?: string | null,
>   containers?: {
>     dependsOn?: string[] | null,
>     resources?: {
>       limits?: Record<string, string> | null,
>       cpuIdle?: boolean | null,
>       startupCpuBoost?: boolean | null
>     } | null,
>     buildInfo?: {
>       functionTarget?: string | null,
>       sourceLocation?: string | null
>     } | null,
>     command?: string[] | null,
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     args?: string[] | null,
>     buildConfig?: {
>       dockerBuild?: {
>       } | null,
>       serviceAccount?: string | null,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string | null,
>           machineType?: string | null
>         } | null
>       } | null,
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string> | null,
>         cacheImageUri?: string | null,
>         buildBaseImageUri?: string | null
>       } | null,
>       imageRepositoryUri?: string | null,
>       tags?: string[] | null,
>       environmentVariables?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     } | null,
>     ports?: {
>       name?: string | null,
>       containerPort?: number | null
>     }[] | null,
>     name?: string | null,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string | null,
>           content?: string | null
>         }[] | null
>       } | null,
>       cloudStorageSource?: {
>         bucket?: string | null,
>         object?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     image?: string | null,
>     workingDir?: string | null,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     sandboxLauncher?: boolean | null,
>     baseImageUri?: string | null
>   }[] | null,
>   lastAttemptResult?: {
>     termSignal?: number | null,
>     status?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null,
>     exitCode?: number | null
>   } | null,
>   workloadIdentityConfig?: {
>     identityType?: string | null,
>     identity?: string | null,
>     identityCertificateEnabled?: boolean | null
>   } | null
> }[] | null
> ```

***

### locations.jobs.get

`run.locations.jobs.get`

Gets information about a Job

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.get({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the Job. Format: projects/\{project}/locations/\{location}/jobs/\{job}, where \{project} can be project id or number. Format: `projects/<id>/locations/<id>/jobs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string \| null` | No | Output only. Server assigned unique identifier for the Execution. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. |
| `annotations` | `Record<string, string> \| null` | No | Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected on new resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes annotations' namespacing, limits, and rules. |
| `reconciling` | `boolean \| null` | No | Output only. Returns true if the Job is currently being acted upon by the system to bring it into the desired state. When a new Job is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Job to the desired state. This process is called reconciliation. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `launchStage` | `string \| null` | No | The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `startExecutionToken` | `string \| null` | No | A unique string used as a suffix creating a new execution. The Job will become ready when the execution is successfully started. The sum of job name and token length must be fewer than 63 characters. |
| `conditions` | `object[] \| null` | No | Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Job does not reach its desired state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `client` | `string \| null` | No | Arbitrary identifier for the API client. |
| `generation` | `string \| number \| null` | No | Output only. A number that monotonically increases every time the user modifies the desired state. |
| `binaryAuthorization` | `object \| null` | No | Settings for Binary Authorization feature. |
| `template` | `object \| null` | No | ExecutionTemplate describes the data an execution should have when created from a template. |
| `deleteTime` | `string \| null` | No | Output only. The deletion time. It is only populated as a response to a Delete request. |
| `etag` | `string \| null` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `runExecutionToken` | `string \| null` | No | A unique string used as a suffix for creating a new execution. The Job will become ready when the execution is successfully completed. The sum of job name and token length must be fewer than 63 characters. |
| `createTime` | `string \| null` | No | Output only. The creation time. |
| `expireTime` | `string \| null` | No | Output only. For a deleted resource, the time after which it will be permamently deleted. |
| `updateTime` | `string \| null` | No | Output only. The last-modified time. |
| `name` | `string \| null` | No | The fully qualified name of this Job. Format: projects/\{project}/locations/\{location}/jobs/\{job} |
| `observedGeneration` | `string \| number \| null` | No | Output only. The generation of this Job. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `labels` | `Record<string, string> \| null` | No | Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. |
| `executionCount` | `number \| null` | No | Output only. Number of executions created for this job. |
| `functionalType` | `string \| null` | No | Optional. The functional type of the Job. |
| `lastModifier` | `string \| null` | No | Output only. Email address of the last authenticated modifier. |
| `clientVersion` | `string \| null` | No | Arbitrary version identifier for the API client. |
| `creator` | `string \| null` | No | Output only. Email address of the authenticated creator. |
| `terminalCondition` | `object \| null` | No | Defines a status condition for a resource. |
| `latestCreatedExecution` | `object \| null` | No | Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean | null,
>   policy?: string | null,
>   breakglassJustification?: string | null
> } | null
> ```

> [accordion] template full type
>
> ```ts theme={null}
> {
>   parallelism?: number | null,
>   taskCount?: number | null,
>   clientVersion?: string | null,
>   template?: {
>     encryptionKey?: string | null,
>     timeout?: string | null,
>     gpuZonalRedundancyDisabled?: boolean | null,
>     executionEnvironment?: string | null,
>     vpcAccess?: {
>       networkInterfaces?: {
>         network?: string | null,
>         tags?: string[] | null,
>         subnetwork?: string | null
>       }[] | null,
>       egress?: string | null,
>       connector?: string | null
>     } | null,
>     volumes?: {
>       secret?: {
>         items?: {
>           version?: string | null,
>           mode?: number | null,
>           path?: string | null
>         }[] | null,
>         secret?: string | null,
>         defaultMode?: number | null
>       } | null,
>       cloudSqlInstance?: {
>         instances?: string[] | null
>       } | null,
>       name?: string | null,
>       nfs?: {
>         server?: string | null,
>         readOnly?: boolean | null,
>         path?: string | null
>       } | null,
>       emptyDir?: {
>         medium?: string | null,
>         sizeLimit?: string | null
>       } | null,
>       gcs?: {
>         readOnly?: boolean | null,
>         bucket?: string | null,
>         mountOptions?: string[] | null
>       } | null
>     }[] | null,
>     serviceAccount?: string | null,
>     containers?: {
>       dependsOn?: string[] | null,
>       resources?: {
>         limits?: Record<string, string> | null,
>         cpuIdle?: boolean | null,
>         startupCpuBoost?: boolean | null
>       } | null,
>       buildInfo?: {
>         functionTarget?: string | null,
>         sourceLocation?: string | null
>       } | null,
>       command?: string[] | null,
>       readinessProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       startupProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       args?: string[] | null,
>       buildConfig?: {
>         dockerBuild?: {
>         } | null,
>         serviceAccount?: string | null,
>         workerConfiguration?: {
>           cloudBuildWorkerConfiguration?: {
>             workerPool?: string | null,
>             machineType?: string | null
>           } | null
>         } | null,
>         buildpacksBuild?: {
>           environmentVariables?: Record<string, string> | null,
>           cacheImageUri?: string | null,
>           buildBaseImageUri?: string | null
>         } | null,
>         imageRepositoryUri?: string | null,
>         tags?: string[] | null,
>         environmentVariables?: {
>           name?: string | null,
>           value?: string | null,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string | null,
>               version?: string | null
>             } | null
>           } | null
>         }[] | null
>       } | null,
>       ports?: {
>         name?: string | null,
>         containerPort?: number | null
>       }[] | null,
>       name?: string | null,
>       sourceCode?: {
>         inlinedSource?: {
>           sources?: {
>             filename?: string | null,
>             content?: string | null
>           }[] | null
>         } | null,
>         cloudStorageSource?: {
>           bucket?: string | null,
>           object?: string | null,
>           generation?: string | number | null
>         } | null
>       } | null,
>       image?: string | null,
>       workingDir?: string | null,
>       livenessProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       sandboxLauncher?: boolean | null,
>       baseImageUri?: string | null
>     }[] | null,
>     maxRetries?: number | null,
>     sandboxes?: {
>       templates?: {
>         args?: string[] | null,
>         image?: string | null,
>         command?: string[] | null,
>         workingDir?: string | null,
>         volumeMounts?: {
>           subPath?: string | null,
>           mountPath?: string | null,
>           name?: string | null
>         }[] | null,
>         name?: string | null,
>         env?: {
>           name?: string | null,
>           value?: string | null,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string | null,
>               version?: string | null
>             } | null
>           } | null
>         }[] | null
>       }[] | null
>     } | null,
>     workloadIdentityConfig?: {
>       identityType?: string | null,
>       identity?: string | null,
>       identityCertificateEnabled?: boolean | null
>     } | null,
>     nodeSelector?: {
>       accelerator?: string | null
>     } | null
>   } | null,
>   delayExecution?: boolean | null,
>   annotations?: Record<string, string> | null,
>   client?: string | null,
>   labels?: Record<string, string> | null
> } | null
> ```

> [accordion] terminalCondition full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] latestCreatedExecution full type
>
> ```ts theme={null}
> {
>   completionTime?: string | null,
>   deleteTime?: string | null,
>   completionStatus?: string | null,
>   createTime?: string | null,
>   name?: string | null
> } | null
> ```

***

### locations.jobs.getIamPolicy

`run.locations.jobs.getIamPolicy`

Gets the IAM Access Control policy currently in effect for the given Job. This result does not include any inherited policies

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.getIamPolicy({ resource: 'projects/demo-project/locations/us-central1/jobs/nightly-report' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/jobs/<id>`. |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   role?: string | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

***

### locations.jobs.list

`run.locations.jobs.list`

Lists Jobs. Results are sorted by creation time, descending (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `showDeleted` | `boolean` | No | If true, returns deleted (but unexpired) resources along with active ones. |
| `pageToken` | `string` | No | A page token received from a previous call to ListJobs. All other parameters must match. |
| `pageSize` | `number` | No | Maximum number of Jobs to return in this call. |
| `parent` | `string` | Yes | Required. The location and project to list resources on. Format: projects/\{project}/locations/\{location}, where \{project} can be project id or number. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `jobs` | `object[] \| null` | No | The resulting list of Jobs. |
| `nextPageToken` | `string \| null` | No | A token indicating there are more items than page\_size. Use it in the next ListJobs request to continue. |

> [accordion] jobs full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   annotations?: Record<string, string> | null,
>   reconciling?: boolean | null,
>   satisfiesPzs?: boolean | null,
>   launchStage?: string | null,
>   startExecutionToken?: string | null,
>   conditions?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   }[] | null,
>   client?: string | null,
>   generation?: string | number | null,
>   binaryAuthorization?: {
>     useDefault?: boolean | null,
>     policy?: string | null,
>     breakglassJustification?: string | null
>   } | null,
>   template?: {
>     parallelism?: number | null,
>     taskCount?: number | null,
>     clientVersion?: string | null,
>     template?: {
>       encryptionKey?: string | null,
>       timeout?: string | null,
>       gpuZonalRedundancyDisabled?: boolean | null,
>       executionEnvironment?: string | null,
>       vpcAccess?: {
>         networkInterfaces?: {
>           network?: string | null,
>           tags?: string[] | null,
>           subnetwork?: string | null
>         }[] | null,
>         egress?: string | null,
>         connector?: string | null
>       } | null,
>       volumes?: {
>         secret?: {
>           items?: {
>             version?: string | null,
>             mode?: number | null,
>             path?: string | null
>           }[] | null,
>           secret?: string | null,
>           defaultMode?: number | null
>         } | null,
>         cloudSqlInstance?: {
>           instances?: string[] | null
>         } | null,
>         name?: string | null,
>         nfs?: {
>           server?: string | null,
>           readOnly?: boolean | null,
>           path?: string | null
>         } | null,
>         emptyDir?: {
>           medium?: string | null,
>           sizeLimit?: string | null
>         } | null,
>         gcs?: {
>           readOnly?: boolean | null,
>           bucket?: string | null,
>           mountOptions?: string[] | null
>         } | null
>       }[] | null,
>       serviceAccount?: string | null,
>       containers?: {
>         dependsOn?: string[] | null,
>         resources?: {
>           limits?: Record<string, string> | null,
>           cpuIdle?: boolean | null,
>           startupCpuBoost?: boolean | null
>         } | null,
>         buildInfo?: {
>           functionTarget?: string | null,
>           sourceLocation?: string | null
>         } | null,
>         command?: string[] | null,
>         readinessProbe?: {
>           tcpSocket?: {
>             port?: number | null
>           } | null,
>           grpc?: {
>             port?: number | null,
>             service?: string | null
>           } | null,
>           failureThreshold?: number | null,
>           periodSeconds?: number | null,
>           initialDelaySeconds?: number | null,
>           timeoutSeconds?: number | null,
>           httpGet?: {
>             httpHeaders?: {
>               value?: string | null,
>               name?: string | null
>             }[] | null,
>             port?: number | null,
>             path?: string | null
>           } | null
>         } | null,
>         startupProbe?: {
>           tcpSocket?: {
>             port?: number | null
>           } | null,
>           grpc?: {
>             port?: number | null,
>             service?: string | null
>           } | null,
>           failureThreshold?: number | null,
>           periodSeconds?: number | null,
>           initialDelaySeconds?: number | null,
>           timeoutSeconds?: number | null,
>           httpGet?: {
>             httpHeaders?: {
>               value?: string | null,
>               name?: string | null
>             }[] | null,
>             port?: number | null,
>             path?: string | null
>           } | null
>         } | null,
>         args?: string[] | null,
>         buildConfig?: {
>           dockerBuild?: {
>           } | null,
>           serviceAccount?: string | null,
>           workerConfiguration?: {
>             cloudBuildWorkerConfiguration?: {
>               workerPool?: string | null,
>               machineType?: string | null
>             } | null
>           } | null,
>           buildpacksBuild?: {
>             environmentVariables?: Record<string, string> | null,
>             cacheImageUri?: string | null,
>             buildBaseImageUri?: string | null
>           } | null,
>           imageRepositoryUri?: string | null,
>           tags?: string[] | null,
>           environmentVariables?: {
>             name?: string | null,
>             value?: string | null,
>             valueSource?: {
>               secretKeyRef?: {
>                 secret?: string | null,
>                 version?: string | null
>               } | null
>             } | null
>           }[] | null
>         } | null,
>         ports?: {
>           name?: string | null,
>           containerPort?: number | null
>         }[] | null,
>         name?: string | null,
>         sourceCode?: {
>           inlinedSource?: {
>             sources?: {
>               filename?: string | null,
>               content?: string | null
>             }[] | null
>           } | null,
>           cloudStorageSource?: {
>             bucket?: string | null,
>             object?: string | null,
>             generation?: string | number | null
>           } | null
>         } | null,
>         image?: string | null,
>         workingDir?: string | null,
>         livenessProbe?: {
>           tcpSocket?: {
>             port?: number | null
>           } | null,
>           grpc?: {
>             port?: number | null,
>             service?: string | null
>           } | null,
>           failureThreshold?: number | null,
>           periodSeconds?: number | null,
>           initialDelaySeconds?: number | null,
>           timeoutSeconds?: number | null,
>           httpGet?: {
>             httpHeaders?: {
>               value?: string | null,
>               name?: string | null
>             }[] | null,
>             port?: number | null,
>             path?: string | null
>           } | null
>         } | null,
>         env?: {
>           name?: string | null,
>           value?: string | null,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string | null,
>               version?: string | null
>             } | null
>           } | null
>         }[] | null,
>         volumeMounts?: {
>           subPath?: string | null,
>           mountPath?: string | null,
>           name?: string | null
>         }[] | null,
>         sandboxLauncher?: boolean | null,
>         baseImageUri?: string | null
>       }[] | null,
>       maxRetries?: number | null,
>       sandboxes?: {
>         templates?: {
>           args?: string[] | null,
>           image?: string | null,
>           command?: string[] | null,
>           workingDir?: string | null,
>           volumeMounts?: {
>             subPath?: string | null,
>             mountPath?: string | null,
>             name?: string | null
>           }[] | null,
>           name?: string | null,
>           env?: {
>             name?: string | null,
>             value?: string | null,
>             valueSource?: {
>               secretKeyRef?: {
>                 secret?: string | null,
>                 version?: string | null
>               } | null
>             } | null
>           }[] | null
>         }[] | null
>       } | null,
>       workloadIdentityConfig?: {
>         identityType?: string | null,
>         identity?: string | null,
>         identityCertificateEnabled?: boolean | null
>       } | null,
>       nodeSelector?: {
>         accelerator?: string | null
>       } | null
>     } | null,
>     delayExecution?: boolean | null,
>     annotations?: Record<string, string> | null,
>     client?: string | null,
>     labels?: Record<string, string> | null
>   } | null,
>   deleteTime?: string | null,
>   etag?: string | null,
>   runExecutionToken?: string | null,
>   createTime?: string | null,
>   expireTime?: string | null,
>   updateTime?: string | null,
>   name?: string | null,
>   observedGeneration?: string | number | null,
>   labels?: Record<string, string> | null,
>   executionCount?: number | null,
>   functionalType?: string | null,
>   lastModifier?: string | null,
>   clientVersion?: string | null,
>   creator?: string | null,
>   terminalCondition?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   } | null,
>   latestCreatedExecution?: {
>     completionTime?: string | null,
>     deleteTime?: string | null,
>     completionStatus?: string | null,
>     createTime?: string | null,
>     name?: string | null
>   } | null
> }[] | null
> ```

***

### locations.jobs.patch

`run.locations.jobs.patch`

Updates a Job

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.patch({
	name: 'projects/demo-project/locations/us-central1/jobs/nightly-report',
	template: {
		template: {
			containers: [{ image: 'us-central1-docker.pkg.dev/demo-project/docker/api:v2' }],
		},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated and default values populated, without persisting the request or updating any resources. |
| `name` | `string` | Yes | The fully qualified name of this Job. Format: projects/\{project}/locations/\{location}/jobs/\{job} Format: `projects/<id>/locations/<id>/jobs/<id>`. |
| `allowMissing` | `boolean` | No | Optional. If set to true, and if the Job does not exist, it will create a new one. Caller must have both create and update permissions for this call if this is set to true. |
| `annotations` | `Record<string, string>` | No | Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected on new resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes annotations' namespacing, limits, and rules. |
| `launchStage` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `startExecutionToken` | `string` | No | A unique string used as a suffix creating a new execution. The Job will become ready when the execution is successfully started. The sum of job name and token length must be fewer than 63 characters. |
| `client` | `string` | No | Arbitrary identifier for the API client. |
| `binaryAuthorization` | `object` | No | Settings for Binary Authorization feature. |
| `template` | `object` | No | ExecutionTemplate describes the data an execution should have when created from a template. |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `runExecutionToken` | `string` | No | A unique string used as a suffix for creating a new execution. The Job will become ready when the execution is successfully completed. The sum of job name and token length must be fewer than 63 characters. |
| `body_name` | `string` | No | The fully qualified name of this Job. Format: projects/\{project}/locations/\{location}/jobs/\{job} |
| `labels` | `Record<string, string>` | No | Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. |
| `functionalType` | `FUNCTIONAL_TYPE_UNSPECIFIED \| FUNCTIONAL_TYPE_AGENT \| FUNCTIONAL_TYPE_MCP_SERVER` | No | Optional. The functional type of the Job. |
| `clientVersion` | `string` | No | Arbitrary version identifier for the API client. |

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean,
>   policy?: string,
>   breakglassJustification?: string
> }
> ```

> [accordion] template full type
>
> ```ts theme={null}
> {
>   parallelism?: number,
>   taskCount?: number,
>   clientVersion?: string,
>   template?: {
>     encryptionKey?: string,
>     timeout?: string,
>     gpuZonalRedundancyDisabled?: boolean,
>     executionEnvironment?: EXECUTION_ENVIRONMENT_UNSPECIFIED | EXECUTION_ENVIRONMENT_GEN1 | EXECUTION_ENVIRONMENT_GEN2,
>     vpcAccess?: {
>       networkInterfaces?: {
>         network?: string,
>         tags?: string[],
>         subnetwork?: string
>       }[],
>       egress?: VPC_EGRESS_UNSPECIFIED | ALL_TRAFFIC | PRIVATE_RANGES_ONLY,
>       connector?: string
>     },
>     volumes?: {
>       secret?: {
>         items?: {
>           version?: string,
>           mode?: number,
>           path?: string
>         }[],
>         secret?: string,
>         defaultMode?: number
>       },
>       cloudSqlInstance?: {
>         instances?: string[]
>       },
>       name?: string,
>       nfs?: {
>         server?: string,
>         readOnly?: boolean,
>         path?: string
>       },
>       emptyDir?: {
>         medium?: MEDIUM_UNSPECIFIED | MEMORY | DISK,
>         sizeLimit?: string
>       },
>       gcs?: {
>         readOnly?: boolean,
>         bucket?: string,
>         mountOptions?: string[]
>       }
>     }[],
>     serviceAccount?: string,
>     containers?: {
>       dependsOn?: string[],
>       resources?: {
>         limits?: Record<string, string>,
>         cpuIdle?: boolean,
>         startupCpuBoost?: boolean
>       },
>       command?: string[],
>       readinessProbe?: {
>         tcpSocket?: {
>           port?: number
>         },
>         grpc?: {
>           port?: number,
>           service?: string
>         },
>         failureThreshold?: number,
>         periodSeconds?: number,
>         initialDelaySeconds?: number,
>         timeoutSeconds?: number,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string,
>             name?: string
>           }[],
>           port?: number,
>           path?: string
>         }
>       },
>       startupProbe?: {
>         tcpSocket?: {
>           port?: number
>         },
>         grpc?: {
>           port?: number,
>           service?: string
>         },
>         failureThreshold?: number,
>         periodSeconds?: number,
>         initialDelaySeconds?: number,
>         timeoutSeconds?: number,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string,
>             name?: string
>           }[],
>           port?: number,
>           path?: string
>         }
>       },
>       args?: string[],
>       buildConfig?: {
>         dockerBuild?: {
>         },
>         serviceAccount?: string,
>         workerConfiguration?: {
>           cloudBuildWorkerConfiguration?: {
>             workerPool?: string,
>             machineType?: string
>           }
>         },
>         buildpacksBuild?: {
>           environmentVariables?: Record<string, string>,
>           cacheImageUri?: string,
>           buildBaseImageUri?: string
>         },
>         imageRepositoryUri?: string,
>         tags?: string[],
>         environmentVariables?: {
>           name?: string,
>           value?: string,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string,
>               version?: string
>             }
>           }
>         }[]
>       },
>       ports?: {
>         name?: string,
>         containerPort?: number
>       }[],
>       name?: string,
>       sourceCode?: {
>         inlinedSource?: {
>           sources?: {
>             filename?: string,
>             content?: string
>           }[]
>         },
>         cloudStorageSource?: {
>           bucket?: string,
>           object?: string,
>           generation?: string | number
>         }
>       },
>       image?: string,
>       workingDir?: string,
>       livenessProbe?: {
>         tcpSocket?: {
>           port?: number
>         },
>         grpc?: {
>           port?: number,
>           service?: string
>         },
>         failureThreshold?: number,
>         periodSeconds?: number,
>         initialDelaySeconds?: number,
>         timeoutSeconds?: number,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string,
>             name?: string
>           }[],
>           port?: number,
>           path?: string
>         }
>       },
>       env?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[],
>       volumeMounts?: {
>         subPath?: string,
>         mountPath?: string,
>         name?: string
>       }[],
>       sandboxLauncher?: boolean,
>       baseImageUri?: string
>     }[],
>     maxRetries?: number,
>     sandboxes?: {
>       templates?: {
>         args?: string[],
>         image?: string,
>         command?: string[],
>         workingDir?: string,
>         volumeMounts?: {
>           subPath?: string,
>           mountPath?: string,
>           name?: string
>         }[],
>         name?: string,
>         env?: {
>           name?: string,
>           value?: string,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string,
>               version?: string
>             }
>           }
>         }[]
>       }[]
>     },
>     workloadIdentityConfig?: {
>       identityType?: IDENTITY_TYPE_UNSPECIFIED | IDENTITY_TYPE_SERVICE_ACCOUNT | IDENTITY_TYPE_AGENT_IDENTITY,
>       identity?: string,
>       identityCertificateEnabled?: boolean
>     },
>     nodeSelector?: {
>       accelerator?: string
>     }
>   },
>   delayExecution?: boolean,
>   annotations?: Record<string, string>,
>   client?: string,
>   labels?: Record<string, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.jobs.run

`run.locations.jobs.run`

Triggers creation of a new Execution of this Job

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.run({
	name: 'projects/demo-project/locations/us-central1/jobs/nightly-report',
	overrides: {
		containerOverrides: [{
			env: [{ name: 'DAY', value: '2026-12-02' }],
		}],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the Job. Format: projects/\{project}/locations/\{location}/jobs/\{job}, where \{project} can be project id or number. Format: `projects/<id>/locations/<id>/jobs/<id>`. |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated without actually deleting any resources. |
| `etag` | `string` | No | A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `overrides` | `object` | No | RunJob Overrides that contains Execution fields to be overridden. |

> [accordion] overrides full type
>
> ```ts theme={null}
> {
>   delayExecution?: boolean,
>   containerOverrides?: {
>     name?: string,
>     clearArgs?: boolean,
>     args?: string[],
>     env?: {
>       name?: string,
>       value?: string,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string,
>           version?: string
>         }
>       }
>     }[]
>   }[],
>   taskCount?: number,
>   timeout?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.jobs.setIamPolicy

`run.locations.jobs.setIamPolicy`

Sets the IAM Access control policy for the specified Job. Overwrites any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.setIamPolicy({
	resource: 'projects/demo-project/locations/us-central1/jobs/nightly-report',
	policy: {
		bindings: [{
			role: 'roles/run.invoker',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/jobs/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   bindings?: {
>     members?: string[],
>     role?: string,
>     condition?: {
>       title?: string,
>       location?: string,
>       description?: string,
>       expression?: string
>     }
>   }[],
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   role?: string | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

***

### locations.jobs.testIamPermissions

`run.locations.jobs.testIamPermissions`

Returns permissions that a caller has on the specified Project. There are no permissions required for making this API call

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.jobs.testIamPermissions({
	resource: 'projects/demo-project/locations/us-central1/jobs/nightly-report',
	permissions: ['run.jobs.run'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/jobs/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### locations.operations.delete

`run.locations.operations.delete`

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.run.locations.operations.delete({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be deleted. Format: `projects/<id>/locations/<id>/operations/<id>`. |

**Output:** *empty object*

***

### locations.operations.get

`run.locations.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.operations.get({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.operations.list

`run.locations.operations.list`

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.operations.list({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `returnPartialSuccess` | `boolean` | No | When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation. |
| `pageSize` | `number` | No | The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set or set to less than or equal to 0, the default page size is 100. . |
| `pageToken` | `string` | No | Token identifying which result to start with, which is returned by a previous list call. |
| `filter` | `string` | No | Optional. A filter for matching the completed or in-progress operations. The supported formats of *filter* are: To query for only completed operations: done:true To query for only ongoing operations: done:false Must be empty to query for all of the latest operations for the given parent project. |
| `name` | `string` | Yes | Required. To query for all of the operations for a project. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |
| `unreachable` | `string[] \| null` | No | Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   response?: Record<string, any> | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null,
>   error?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   done?: boolean | null
> }[] | null
> ```

***

### locations.operations.wait

`run.locations.operations.wait`

Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.operations.wait({ name: 'projects/demo-project/locations/us-central1/operations/operation-123', timeout: '30s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to wait on. Format: `projects/<id>/locations/<id>/operations/<id>`. |
| `timeout` | `string` | No | The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.services.create

`run.locations.services.create`

Creates a new Service in a given project and location

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.create({
	parent: 'projects/demo-project/locations/us-central1',
	serviceId: 'api',
	template: {
		containers: [{ image: 'us-central1-docker.pkg.dev/demo-project/docker/api:v1' }],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The location and project in which this service should be created. Format: projects/\{project}/locations/\{location}, where \{project} can be project id or number. Only lowercase characters, digits, and hyphens. Format: `projects/<id>/locations/<id>`. |
| `serviceId` | `string` | No | Optional. The unique identifier for the Service. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the service becomes \{parent}/services/\{service\_id}. If not provided, the server will generate a unique `service_id`. |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated and default values populated, without persisting the request or creating any resources. |
| `buildConfig` | `object` | No | Describes the Build step of the function that builds a container from the given source. |
| `sshEnabled` | `boolean` | No | Optional. Enables SSH access to the Service. |
| `defaultUriDisabled` | `boolean` | No | Optional. Disables public resolution of the default URI of this service. |
| `template` | `object` | No | RevisionTemplate describes the data a revision should have when created from a template. |
| `multiRegionSettings` | `object` | No | Settings for multi-region deployment. |
| `labels` | `Record<string, string>` | No | Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. |
| `traffic` | `object[]` | No | Optional. Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest `Ready` Revision. |
| `invokerIamDisabled` | `boolean` | No | Optional. Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit [https://cloud.google.com/run/docs/securing/managing-access#invoker\_check](https://cloud.google.com/run/docs/securing/managing-access#invoker_check). |
| `client` | `string` | No | Arbitrary identifier for the API client. |
| `binaryAuthorization` | `object` | No | Settings for Binary Authorization feature. |
| `name` | `string` | No | Identifier. The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service\_id. Format: projects/\{project}/locations/\{location}/services/\{service\_id} |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `annotations` | `Record<string, string>` | No | Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. |
| `scaling` | `object` | No | Scaling settings applied at the service level rather than at the revision level. |
| `clientVersion` | `string` | No | Arbitrary version identifier for the API client. |
| `customAudiences` | `string[]` | No | One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see [https://cloud.google.com/run/docs/configuring/custom-audiences](https://cloud.google.com/run/docs/configuring/custom-audiences). |
| `launchStage` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | Optional. The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `iapEnabled` | `boolean` | No | Optional. IAP settings on the Service. |
| `description` | `string` | No | User-provided description of the Service. This field currently has a 512-character limit. |
| `functionalType` | `FUNCTIONAL_TYPE_UNSPECIFIED \| FUNCTIONAL_TYPE_AGENT \| FUNCTIONAL_TYPE_MCP_SERVER` | No | Optional. The functional type of the Service. |
| `ingress` | `INGRESS_TRAFFIC_UNSPECIFIED \| INGRESS_TRAFFIC_ALL \| INGRESS_TRAFFIC_INTERNAL_ONLY \| INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER \| INGRESS_TRAFFIC_NONE` | No | Optional. Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS\_TRAFFIC\_UNSPECIFIED if no revision is active. |

> [accordion] buildConfig full type
>
> ```ts theme={null}
> {
>   imageUri?: string,
>   functionTarget?: string,
>   enableAutomaticUpdates?: boolean,
>   workerPool?: string,
>   sourceLocation?: string,
>   environmentVariables?: Record<string, string>,
>   baseImage?: string,
>   serviceAccount?: string
> }
> ```

> [accordion] template full type
>
> ```ts theme={null}
> {
>   encryptionKeyRevocationAction?: ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED | PREVENT_NEW | SHUTDOWN,
>   sandboxes?: {
>     templates?: {
>       args?: string[],
>       image?: string,
>       command?: string[],
>       workingDir?: string,
>       volumeMounts?: {
>         subPath?: string,
>         mountPath?: string,
>         name?: string
>       }[],
>       name?: string,
>       env?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[]
>     }[]
>   },
>   ambientNetworking?: {
>     ambientScope?: AMBIENT_SCOPE_UNSPECIFIED | AMBIENT_SCOPE_REGIONAL | AMBIENT_SCOPE_GLOBAL,
>     enabled?: boolean
>   },
>   nodeSelector?: {
>     accelerator?: string
>   },
>   clientVersion?: string,
>   healthCheckDisabled?: boolean,
>   labels?: Record<string, string>,
>   serviceAccount?: string,
>   gpuZonalRedundancyDisabled?: boolean,
>   executionEnvironment?: EXECUTION_ENVIRONMENT_UNSPECIFIED | EXECUTION_ENVIRONMENT_GEN1 | EXECUTION_ENVIRONMENT_GEN2,
>   containers?: {
>     dependsOn?: string[],
>     resources?: {
>       limits?: Record<string, string>,
>       cpuIdle?: boolean,
>       startupCpuBoost?: boolean
>     },
>     command?: string[],
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     args?: string[],
>     buildConfig?: {
>       dockerBuild?: {
>       },
>       serviceAccount?: string,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string,
>           machineType?: string
>         }
>       },
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string>,
>         cacheImageUri?: string,
>         buildBaseImageUri?: string
>       },
>       imageRepositoryUri?: string,
>       tags?: string[],
>       environmentVariables?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[]
>     },
>     ports?: {
>       name?: string,
>       containerPort?: number
>     }[],
>     name?: string,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string,
>           content?: string
>         }[]
>       },
>       cloudStorageSource?: {
>         bucket?: string,
>         object?: string,
>         generation?: string | number
>       }
>     },
>     image?: string,
>     workingDir?: string,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     env?: {
>       name?: string,
>       value?: string,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string,
>           version?: string
>         }
>       }
>     }[],
>     volumeMounts?: {
>       subPath?: string,
>       mountPath?: string,
>       name?: string
>     }[],
>     sandboxLauncher?: boolean,
>     baseImageUri?: string
>   }[],
>   revision?: string,
>   workloadIdentityConfig?: {
>     identityType?: IDENTITY_TYPE_UNSPECIFIED | IDENTITY_TYPE_SERVICE_ACCOUNT | IDENTITY_TYPE_AGENT_IDENTITY,
>     identity?: string,
>     identityCertificateEnabled?: boolean
>   },
>   client?: string,
>   scaling?: {
>     cpuUtilization?: number,
>     concurrencyUtilization?: number,
>     minInstanceCount?: number,
>     maxInstanceCount?: number
>   },
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string,
>         mode?: number,
>         path?: string
>       }[],
>       secret?: string,
>       defaultMode?: number
>     },
>     cloudSqlInstance?: {
>       instances?: string[]
>     },
>     name?: string,
>     nfs?: {
>       server?: string,
>       readOnly?: boolean,
>       path?: string
>     },
>     emptyDir?: {
>       medium?: MEDIUM_UNSPECIFIED | MEMORY | DISK,
>       sizeLimit?: string
>     },
>     gcs?: {
>       readOnly?: boolean,
>       bucket?: string,
>       mountOptions?: string[]
>     }
>   }[],
>   serviceMesh?: {
>     mesh?: string
>   },
>   maxInstanceRequestConcurrency?: number,
>   encryptionKey?: string,
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string,
>       tags?: string[],
>       subnetwork?: string
>     }[],
>     egress?: VPC_EGRESS_UNSPECIFIED | ALL_TRAFFIC | PRIVATE_RANGES_ONLY,
>     connector?: string
>   },
>   encryptionKeyShutdownDuration?: string,
>   sessionAffinity?: boolean,
>   timeout?: string,
>   annotations?: Record<string, string>
> }
> ```

> [accordion] multiRegionSettings full type
>
> ```ts theme={null}
> {
>   multiRegionId?: string,
>   regions?: string[]
> }
> ```

> [accordion] traffic full type
>
> ```ts theme={null}
> {
>   tag?: string,
>   percent?: number,
>   revision?: string,
>   type?: TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED | TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST | TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION
> }[]
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean,
>   policy?: string,
>   breakglassJustification?: string
> }
> ```

> [accordion] scaling full type
>
> ```ts theme={null}
> {
>   scalingMode?: SCALING_MODE_UNSPECIFIED | AUTOMATIC | MANUAL,
>   manualInstanceCount?: number,
>   minInstanceCount?: number,
>   maxInstanceCount?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.services.delete

`run.locations.services.delete`

Deletes a Service. This will cause the Service to stop serving traffic and will delete all revisions

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.delete({ name: 'projects/demo-project/locations/us-central1/services/api' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the Service. Format: projects/\{project}/locations/\{location}/services/\{service}, where \{project} can be project id or number. Format: `projects/<id>/locations/<id>/services/<id>`. |
| `etag` | `string` | No | A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated without actually deleting any resources. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.services.get

`run.locations.services.get`

Gets information about a Service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.get({ name: 'projects/demo-project/locations/us-central1/services/api' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the Service. Format: projects/\{project}/locations/\{location}/services/\{service}, where \{project} can be project id or number. Format: `projects/<id>/locations/<id>/services/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditions` | `object[] \| null` | No | Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `buildConfig` | `object \| null` | No | Describes the Build step of the function that builds a container from the given source. |
| `sshEnabled` | `boolean \| null` | No | Optional. Enables SSH access to the Service. |
| `defaultUriDisabled` | `boolean \| null` | No | Optional. Disables public resolution of the default URI of this service. |
| `template` | `object \| null` | No | RevisionTemplate describes the data a revision should have when created from a template. |
| `terminalCondition` | `object \| null` | No | Defines a status condition for a resource. |
| `generation` | `string \| number \| null` | No | Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. |
| `lastModifier` | `string \| null` | No | Output only. Email address of the last authenticated modifier. |
| `creator` | `string \| null` | No | Output only. Email address of the authenticated creator. |
| `multiRegionSettings` | `object \| null` | No | Settings for multi-region deployment. |
| `latestReadyRevision` | `string \| null` | No | Output only. Name of the latest revision that is serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `labels` | `Record<string, string> \| null` | No | Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. |
| `traffic` | `object[] \| null` | No | Optional. Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest `Ready` Revision. |
| `invokerIamDisabled` | `boolean \| null` | No | Optional. Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit [https://cloud.google.com/run/docs/securing/managing-access#invoker\_check](https://cloud.google.com/run/docs/securing/managing-access#invoker_check). |
| `observedGeneration` | `string \| number \| null` | No | Output only. The generation of this Service currently serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. |
| `urls` | `string[] \| null` | No | Output only. All URLs serving traffic for this Service. |
| `client` | `string \| null` | No | Arbitrary identifier for the API client. |
| `latestCreatedRevision` | `string \| null` | No | Output only. Name of the last created revision. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `binaryAuthorization` | `object \| null` | No | Settings for Binary Authorization feature. |
| `name` | `string \| null` | No | Identifier. The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service\_id. Format: projects/\{project}/locations/\{location}/services/\{service\_id} |
| `etag` | `string \| null` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `uid` | `string \| null` | No | Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. |
| `trafficStatuses` | `object[] \| null` | No | Output only. Detailed status information for corresponding traffic targets. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `reconciling` | `boolean \| null` | No | Output only. Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. |
| `scaling` | `object \| null` | No | Scaling settings applied at the service level rather than at the revision level. |
| `clientVersion` | `string \| null` | No | Arbitrary version identifier for the API client. |
| `customAudiences` | `string[] \| null` | No | One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see [https://cloud.google.com/run/docs/configuring/custom-audiences](https://cloud.google.com/run/docs/configuring/custom-audiences). |
| `launchStage` | `string \| null` | No | Optional. The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `uri` | `string \| null` | No | Output only. The main URI in which this Service is serving traffic. |
| `threatDetectionEnabled` | `boolean \| null` | No | Output only. True if Cloud Run Threat Detection monitoring is enabled for the parent project of this Service. |
| `iapEnabled` | `boolean \| null` | No | Optional. IAP settings on the Service. |
| `description` | `string \| null` | No | User-provided description of the Service. This field currently has a 512-character limit. |
| `functionalType` | `string \| null` | No | Optional. The functional type of the Service. |
| `deleteTime` | `string \| null` | No | Output only. The deletion time. It is only populated as a response to a Delete request. |
| `createTime` | `string \| null` | No | Output only. The creation time. |
| `expireTime` | `string \| null` | No | Output only. For a deleted resource, the time after which it will be permanently deleted. |
| `ingress` | `string \| null` | No | Optional. Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS\_TRAFFIC\_UNSPECIFIED if no revision is active. |
| `updateTime` | `string \| null` | No | Output only. The last-modified time. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] buildConfig full type
>
> ```ts theme={null}
> {
>   imageUri?: string | null,
>   functionTarget?: string | null,
>   name?: string | null,
>   enableAutomaticUpdates?: boolean | null,
>   workerPool?: string | null,
>   sourceLocation?: string | null,
>   environmentVariables?: Record<string, string> | null,
>   baseImage?: string | null,
>   serviceAccount?: string | null
> } | null
> ```

> [accordion] template full type
>
> ```ts theme={null}
> {
>   encryptionKeyRevocationAction?: string | null,
>   sandboxes?: {
>     templates?: {
>       args?: string[] | null,
>       image?: string | null,
>       command?: string[] | null,
>       workingDir?: string | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       name?: string | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   ambientNetworking?: {
>     ambientScope?: string | null,
>     enabled?: boolean | null
>   } | null,
>   nodeSelector?: {
>     accelerator?: string | null
>   } | null,
>   clientVersion?: string | null,
>   healthCheckDisabled?: boolean | null,
>   labels?: Record<string, string> | null,
>   serviceAccount?: string | null,
>   gpuZonalRedundancyDisabled?: boolean | null,
>   executionEnvironment?: string | null,
>   containers?: {
>     dependsOn?: string[] | null,
>     resources?: {
>       limits?: Record<string, string> | null,
>       cpuIdle?: boolean | null,
>       startupCpuBoost?: boolean | null
>     } | null,
>     buildInfo?: {
>       functionTarget?: string | null,
>       sourceLocation?: string | null
>     } | null,
>     command?: string[] | null,
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     args?: string[] | null,
>     buildConfig?: {
>       dockerBuild?: {
>       } | null,
>       serviceAccount?: string | null,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string | null,
>           machineType?: string | null
>         } | null
>       } | null,
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string> | null,
>         cacheImageUri?: string | null,
>         buildBaseImageUri?: string | null
>       } | null,
>       imageRepositoryUri?: string | null,
>       tags?: string[] | null,
>       environmentVariables?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     } | null,
>     ports?: {
>       name?: string | null,
>       containerPort?: number | null
>     }[] | null,
>     name?: string | null,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string | null,
>           content?: string | null
>         }[] | null
>       } | null,
>       cloudStorageSource?: {
>         bucket?: string | null,
>         object?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     image?: string | null,
>     workingDir?: string | null,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     sandboxLauncher?: boolean | null,
>     baseImageUri?: string | null
>   }[] | null,
>   revision?: string | null,
>   workloadIdentityConfig?: {
>     identityType?: string | null,
>     identity?: string | null,
>     identityCertificateEnabled?: boolean | null
>   } | null,
>   client?: string | null,
>   scaling?: {
>     cpuUtilization?: number | null,
>     concurrencyUtilization?: number | null,
>     minInstanceCount?: number | null,
>     maxInstanceCount?: number | null
>   } | null,
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string | null,
>         mode?: number | null,
>         path?: string | null
>       }[] | null,
>       secret?: string | null,
>       defaultMode?: number | null
>     } | null,
>     cloudSqlInstance?: {
>       instances?: string[] | null
>     } | null,
>     name?: string | null,
>     nfs?: {
>       server?: string | null,
>       readOnly?: boolean | null,
>       path?: string | null
>     } | null,
>     emptyDir?: {
>       medium?: string | null,
>       sizeLimit?: string | null
>     } | null,
>     gcs?: {
>       readOnly?: boolean | null,
>       bucket?: string | null,
>       mountOptions?: string[] | null
>     } | null
>   }[] | null,
>   serviceMesh?: {
>     mesh?: string | null
>   } | null,
>   maxInstanceRequestConcurrency?: number | null,
>   encryptionKey?: string | null,
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string | null,
>       tags?: string[] | null,
>       subnetwork?: string | null
>     }[] | null,
>     egress?: string | null,
>     connector?: string | null
>   } | null,
>   encryptionKeyShutdownDuration?: string | null,
>   sessionAffinity?: boolean | null,
>   timeout?: string | null,
>   annotations?: Record<string, string> | null
> } | null
> ```

> [accordion] terminalCondition full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] multiRegionSettings full type
>
> ```ts theme={null}
> {
>   multiRegionId?: string | null,
>   regions?: string[] | null
> } | null
> ```

> [accordion] traffic full type
>
> ```ts theme={null}
> {
>   tag?: string | null,
>   percent?: number | null,
>   revision?: string | null,
>   type?: string | null
> }[] | null
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean | null,
>   policy?: string | null,
>   breakglassJustification?: string | null
> } | null
> ```

> [accordion] trafficStatuses full type
>
> ```ts theme={null}
> {
>   tag?: string | null,
>   uri?: string | null,
>   revision?: string | null,
>   percent?: number | null,
>   type?: string | null
> }[] | null
> ```

> [accordion] scaling full type
>
> ```ts theme={null}
> {
>   scalingMode?: string | null,
>   manualInstanceCount?: number | null,
>   minInstanceCount?: number | null,
>   maxInstanceCount?: number | null
> } | null
> ```

***

### locations.services.getIamPolicy

`run.locations.services.getIamPolicy`

Gets the IAM Access Control policy currently in effect for the given Cloud Run Service. This result does not include any inherited policies

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.getIamPolicy({ resource: 'projects/demo-project/locations/us-central1/services/api' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/services/<id>`. |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   role?: string | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

***

### locations.services.list

`run.locations.services.list`

Lists Services. Results are sorted by creation time, descending (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Maximum number of Services to return in this call. |
| `showDeleted` | `boolean` | No | If true, returns deleted (but unexpired) resources along with active ones. |
| `parent` | `string` | Yes | Required. The location and project to list resources on. Location must be a valid Google Cloud region, and cannot be the "-" wildcard. Format: projects/\{project}/locations/\{location}, where \{project} can be project id or number. Format: `projects/<id>/locations/<id>`. |
| `pageToken` | `string` | No | A page token received from a previous call to ListServices. All other parameters must match. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token indicating there are more items than page\_size. Use it in the next ListServices request to continue. |
| `unreachable` | `string[] \| null` | No | Output only. For global requests, returns the list of regions that could not be reached within the deadline. |
| `services` | `object[] \| null` | No | The resulting list of Services. |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   conditions?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   }[] | null,
>   buildConfig?: {
>     imageUri?: string | null,
>     functionTarget?: string | null,
>     name?: string | null,
>     enableAutomaticUpdates?: boolean | null,
>     workerPool?: string | null,
>     sourceLocation?: string | null,
>     environmentVariables?: Record<string, string> | null,
>     baseImage?: string | null,
>     serviceAccount?: string | null
>   } | null,
>   sshEnabled?: boolean | null,
>   defaultUriDisabled?: boolean | null,
>   template?: {
>     encryptionKeyRevocationAction?: string | null,
>     sandboxes?: {
>       templates?: {
>         args?: string[] | null,
>         image?: string | null,
>         command?: string[] | null,
>         workingDir?: string | null,
>         volumeMounts?: {
>           subPath?: string | null,
>           mountPath?: string | null,
>           name?: string | null
>         }[] | null,
>         name?: string | null,
>         env?: {
>           name?: string | null,
>           value?: string | null,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string | null,
>               version?: string | null
>             } | null
>           } | null
>         }[] | null
>       }[] | null
>     } | null,
>     ambientNetworking?: {
>       ambientScope?: string | null,
>       enabled?: boolean | null
>     } | null,
>     nodeSelector?: {
>       accelerator?: string | null
>     } | null,
>     clientVersion?: string | null,
>     healthCheckDisabled?: boolean | null,
>     labels?: Record<string, string> | null,
>     serviceAccount?: string | null,
>     gpuZonalRedundancyDisabled?: boolean | null,
>     executionEnvironment?: string | null,
>     containers?: {
>       dependsOn?: string[] | null,
>       resources?: {
>         limits?: Record<string, string> | null,
>         cpuIdle?: boolean | null,
>         startupCpuBoost?: boolean | null
>       } | null,
>       buildInfo?: {
>         functionTarget?: string | null,
>         sourceLocation?: string | null
>       } | null,
>       command?: string[] | null,
>       readinessProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       startupProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       args?: string[] | null,
>       buildConfig?: {
>         dockerBuild?: {
>         } | null,
>         serviceAccount?: string | null,
>         workerConfiguration?: {
>           cloudBuildWorkerConfiguration?: {
>             workerPool?: string | null,
>             machineType?: string | null
>           } | null
>         } | null,
>         buildpacksBuild?: {
>           environmentVariables?: Record<string, string> | null,
>           cacheImageUri?: string | null,
>           buildBaseImageUri?: string | null
>         } | null,
>         imageRepositoryUri?: string | null,
>         tags?: string[] | null,
>         environmentVariables?: {
>           name?: string | null,
>           value?: string | null,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string | null,
>               version?: string | null
>             } | null
>           } | null
>         }[] | null
>       } | null,
>       ports?: {
>         name?: string | null,
>         containerPort?: number | null
>       }[] | null,
>       name?: string | null,
>       sourceCode?: {
>         inlinedSource?: {
>           sources?: {
>             filename?: string | null,
>             content?: string | null
>           }[] | null
>         } | null,
>         cloudStorageSource?: {
>           bucket?: string | null,
>           object?: string | null,
>           generation?: string | number | null
>         } | null
>       } | null,
>       image?: string | null,
>       workingDir?: string | null,
>       livenessProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       sandboxLauncher?: boolean | null,
>       baseImageUri?: string | null
>     }[] | null,
>     revision?: string | null,
>     workloadIdentityConfig?: {
>       identityType?: string | null,
>       identity?: string | null,
>       identityCertificateEnabled?: boolean | null
>     } | null,
>     client?: string | null,
>     scaling?: {
>       cpuUtilization?: number | null,
>       concurrencyUtilization?: number | null,
>       minInstanceCount?: number | null,
>       maxInstanceCount?: number | null
>     } | null,
>     volumes?: {
>       secret?: {
>         items?: {
>           version?: string | null,
>           mode?: number | null,
>           path?: string | null
>         }[] | null,
>         secret?: string | null,
>         defaultMode?: number | null
>       } | null,
>       cloudSqlInstance?: {
>         instances?: string[] | null
>       } | null,
>       name?: string | null,
>       nfs?: {
>         server?: string | null,
>         readOnly?: boolean | null,
>         path?: string | null
>       } | null,
>       emptyDir?: {
>         medium?: string | null,
>         sizeLimit?: string | null
>       } | null,
>       gcs?: {
>         readOnly?: boolean | null,
>         bucket?: string | null,
>         mountOptions?: string[] | null
>       } | null
>     }[] | null,
>     serviceMesh?: {
>       mesh?: string | null
>     } | null,
>     maxInstanceRequestConcurrency?: number | null,
>     encryptionKey?: string | null,
>     vpcAccess?: {
>       networkInterfaces?: {
>         network?: string | null,
>         tags?: string[] | null,
>         subnetwork?: string | null
>       }[] | null,
>       egress?: string | null,
>       connector?: string | null
>     } | null,
>     encryptionKeyShutdownDuration?: string | null,
>     sessionAffinity?: boolean | null,
>     timeout?: string | null,
>     annotations?: Record<string, string> | null
>   } | null,
>   terminalCondition?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   } | null,
>   generation?: string | number | null,
>   lastModifier?: string | null,
>   creator?: string | null,
>   multiRegionSettings?: {
>     multiRegionId?: string | null,
>     regions?: string[] | null
>   } | null,
>   latestReadyRevision?: string | null,
>   labels?: Record<string, string> | null,
>   traffic?: {
>     tag?: string | null,
>     percent?: number | null,
>     revision?: string | null,
>     type?: string | null
>   }[] | null,
>   invokerIamDisabled?: boolean | null,
>   observedGeneration?: string | number | null,
>   urls?: string[] | null,
>   client?: string | null,
>   latestCreatedRevision?: string | null,
>   binaryAuthorization?: {
>     useDefault?: boolean | null,
>     policy?: string | null,
>     breakglassJustification?: string | null
>   } | null,
>   name?: string | null,
>   etag?: string | null,
>   uid?: string | null,
>   annotations?: Record<string, string> | null,
>   trafficStatuses?: {
>     tag?: string | null,
>     uri?: string | null,
>     revision?: string | null,
>     percent?: number | null,
>     type?: string | null
>   }[] | null,
>   reconciling?: boolean | null,
>   scaling?: {
>     scalingMode?: string | null,
>     manualInstanceCount?: number | null,
>     minInstanceCount?: number | null,
>     maxInstanceCount?: number | null
>   } | null,
>   clientVersion?: string | null,
>   customAudiences?: string[] | null,
>   launchStage?: string | null,
>   satisfiesPzs?: boolean | null,
>   uri?: string | null,
>   threatDetectionEnabled?: boolean | null,
>   iapEnabled?: boolean | null,
>   description?: string | null,
>   functionalType?: string | null,
>   deleteTime?: string | null,
>   createTime?: string | null,
>   expireTime?: string | null,
>   ingress?: string | null,
>   updateTime?: string | null
> }[] | null
> ```

***

### locations.services.patch

`run.locations.services.patch`

Updates a Service

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.patch({
	name: 'projects/demo-project/locations/us-central1/services/api',
	updateMask: 'template',
	template: {
		containers: [{ image: 'us-central1-docker.pkg.dev/demo-project/docker/api:v2' }],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. The list of fields to be updated. |
| `name` | `string` | Yes | Identifier. The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service\_id. Format: projects/\{project}/locations/\{location}/services/\{service\_id} Format: `projects/<id>/locations/<id>/services/<id>`. |
| `forceNewRevision` | `boolean` | No | Optional. If set to true, a new revision will be created from the template even if the system doesn't detect any changes from the previously deployed revision. This may be useful for cases where the underlying resources need to be recreated or reinitialized. For example if the image is specified by label, but the underlying image digest has changed) or if the container performs deployment initialization work that needs to be performed again. |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated and default values populated, without persisting the request or updating any resources. |
| `allowMissing` | `boolean` | No | Optional. If set to true, and if the Service does not exist, it will create a new one. The caller must have 'run.services.create' permissions if this is set to true and the Service does not exist. |
| `buildConfig` | `object` | No | Describes the Build step of the function that builds a container from the given source. |
| `sshEnabled` | `boolean` | No | Optional. Enables SSH access to the Service. |
| `defaultUriDisabled` | `boolean` | No | Optional. Disables public resolution of the default URI of this service. |
| `template` | `object` | No | RevisionTemplate describes the data a revision should have when created from a template. |
| `multiRegionSettings` | `object` | No | Settings for multi-region deployment. |
| `labels` | `Record<string, string>` | No | Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. |
| `traffic` | `object[]` | No | Optional. Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest `Ready` Revision. |
| `invokerIamDisabled` | `boolean` | No | Optional. Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit [https://cloud.google.com/run/docs/securing/managing-access#invoker\_check](https://cloud.google.com/run/docs/securing/managing-access#invoker_check). |
| `client` | `string` | No | Arbitrary identifier for the API client. |
| `binaryAuthorization` | `object` | No | Settings for Binary Authorization feature. |
| `body_name` | `string` | No | Identifier. The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service\_id. Format: projects/\{project}/locations/\{location}/services/\{service\_id} |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `annotations` | `Record<string, string>` | No | Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. |
| `scaling` | `object` | No | Scaling settings applied at the service level rather than at the revision level. |
| `clientVersion` | `string` | No | Arbitrary version identifier for the API client. |
| `customAudiences` | `string[]` | No | One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see [https://cloud.google.com/run/docs/configuring/custom-audiences](https://cloud.google.com/run/docs/configuring/custom-audiences). |
| `launchStage` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | Optional. The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `iapEnabled` | `boolean` | No | Optional. IAP settings on the Service. |
| `description` | `string` | No | User-provided description of the Service. This field currently has a 512-character limit. |
| `functionalType` | `FUNCTIONAL_TYPE_UNSPECIFIED \| FUNCTIONAL_TYPE_AGENT \| FUNCTIONAL_TYPE_MCP_SERVER` | No | Optional. The functional type of the Service. |
| `ingress` | `INGRESS_TRAFFIC_UNSPECIFIED \| INGRESS_TRAFFIC_ALL \| INGRESS_TRAFFIC_INTERNAL_ONLY \| INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER \| INGRESS_TRAFFIC_NONE` | No | Optional. Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS\_TRAFFIC\_UNSPECIFIED if no revision is active. |

> [accordion] buildConfig full type
>
> ```ts theme={null}
> {
>   imageUri?: string,
>   functionTarget?: string,
>   enableAutomaticUpdates?: boolean,
>   workerPool?: string,
>   sourceLocation?: string,
>   environmentVariables?: Record<string, string>,
>   baseImage?: string,
>   serviceAccount?: string
> }
> ```

> [accordion] template full type
>
> ```ts theme={null}
> {
>   encryptionKeyRevocationAction?: ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED | PREVENT_NEW | SHUTDOWN,
>   sandboxes?: {
>     templates?: {
>       args?: string[],
>       image?: string,
>       command?: string[],
>       workingDir?: string,
>       volumeMounts?: {
>         subPath?: string,
>         mountPath?: string,
>         name?: string
>       }[],
>       name?: string,
>       env?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[]
>     }[]
>   },
>   ambientNetworking?: {
>     ambientScope?: AMBIENT_SCOPE_UNSPECIFIED | AMBIENT_SCOPE_REGIONAL | AMBIENT_SCOPE_GLOBAL,
>     enabled?: boolean
>   },
>   nodeSelector?: {
>     accelerator?: string
>   },
>   clientVersion?: string,
>   healthCheckDisabled?: boolean,
>   labels?: Record<string, string>,
>   serviceAccount?: string,
>   gpuZonalRedundancyDisabled?: boolean,
>   executionEnvironment?: EXECUTION_ENVIRONMENT_UNSPECIFIED | EXECUTION_ENVIRONMENT_GEN1 | EXECUTION_ENVIRONMENT_GEN2,
>   containers?: {
>     dependsOn?: string[],
>     resources?: {
>       limits?: Record<string, string>,
>       cpuIdle?: boolean,
>       startupCpuBoost?: boolean
>     },
>     command?: string[],
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     args?: string[],
>     buildConfig?: {
>       dockerBuild?: {
>       },
>       serviceAccount?: string,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string,
>           machineType?: string
>         }
>       },
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string>,
>         cacheImageUri?: string,
>         buildBaseImageUri?: string
>       },
>       imageRepositoryUri?: string,
>       tags?: string[],
>       environmentVariables?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[]
>     },
>     ports?: {
>       name?: string,
>       containerPort?: number
>     }[],
>     name?: string,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string,
>           content?: string
>         }[]
>       },
>       cloudStorageSource?: {
>         bucket?: string,
>         object?: string,
>         generation?: string | number
>       }
>     },
>     image?: string,
>     workingDir?: string,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     env?: {
>       name?: string,
>       value?: string,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string,
>           version?: string
>         }
>       }
>     }[],
>     volumeMounts?: {
>       subPath?: string,
>       mountPath?: string,
>       name?: string
>     }[],
>     sandboxLauncher?: boolean,
>     baseImageUri?: string
>   }[],
>   revision?: string,
>   workloadIdentityConfig?: {
>     identityType?: IDENTITY_TYPE_UNSPECIFIED | IDENTITY_TYPE_SERVICE_ACCOUNT | IDENTITY_TYPE_AGENT_IDENTITY,
>     identity?: string,
>     identityCertificateEnabled?: boolean
>   },
>   client?: string,
>   scaling?: {
>     cpuUtilization?: number,
>     concurrencyUtilization?: number,
>     minInstanceCount?: number,
>     maxInstanceCount?: number
>   },
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string,
>         mode?: number,
>         path?: string
>       }[],
>       secret?: string,
>       defaultMode?: number
>     },
>     cloudSqlInstance?: {
>       instances?: string[]
>     },
>     name?: string,
>     nfs?: {
>       server?: string,
>       readOnly?: boolean,
>       path?: string
>     },
>     emptyDir?: {
>       medium?: MEDIUM_UNSPECIFIED | MEMORY | DISK,
>       sizeLimit?: string
>     },
>     gcs?: {
>       readOnly?: boolean,
>       bucket?: string,
>       mountOptions?: string[]
>     }
>   }[],
>   serviceMesh?: {
>     mesh?: string
>   },
>   maxInstanceRequestConcurrency?: number,
>   encryptionKey?: string,
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string,
>       tags?: string[],
>       subnetwork?: string
>     }[],
>     egress?: VPC_EGRESS_UNSPECIFIED | ALL_TRAFFIC | PRIVATE_RANGES_ONLY,
>     connector?: string
>   },
>   encryptionKeyShutdownDuration?: string,
>   sessionAffinity?: boolean,
>   timeout?: string,
>   annotations?: Record<string, string>
> }
> ```

> [accordion] multiRegionSettings full type
>
> ```ts theme={null}
> {
>   multiRegionId?: string,
>   regions?: string[]
> }
> ```

> [accordion] traffic full type
>
> ```ts theme={null}
> {
>   tag?: string,
>   percent?: number,
>   revision?: string,
>   type?: TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED | TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST | TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION
> }[]
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean,
>   policy?: string,
>   breakglassJustification?: string
> }
> ```

> [accordion] scaling full type
>
> ```ts theme={null}
> {
>   scalingMode?: SCALING_MODE_UNSPECIFIED | AUTOMATIC | MANUAL,
>   manualInstanceCount?: number,
>   minInstanceCount?: number,
>   maxInstanceCount?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.services.revisions.delete

`run.locations.services.revisions.delete`

Deletes a Revision

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.revisions.delete({ name: 'projects/demo-project/locations/us-central1/services/api/revisions/api-00001-abc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated without actually deleting any resources. |
| `name` | `string` | Yes | Required. The name of the Revision to delete. Format: projects/\{project}/locations/\{location}/services/\{service}/revisions/\{revision} Format: `projects/<id>/locations/<id>/services/<id>/revisions/<id>`. |
| `etag` | `string` | No | A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.services.revisions.exportStatus

`run.locations.services.revisions.exportStatus`

Read the status of an image export operation

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.revisions.exportStatus({ name: 'projects/demo-project/locations/us-central1/services/api/revisions/api-00001-abc', operationId: 'operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the resource of which image export operation status has to be fetched. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution Format: `projects/<id>/locations/<id>/services/<id>/revisions/<id>`. |
| `operationId` | `string` | Yes | Required. The operation id returned from ExportImage. Format: `<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `imageExportStatuses` | `object[] \| null` | No | The status of each image export job. |
| `operationId` | `string \| null` | No | The operation id. |
| `operationState` | `string \| null` | No | Output only. The state of the overall export operation. |

> [accordion] imageExportStatuses full type
>
> ```ts theme={null}
> {
>   exportJobState?: string | null,
>   exportedImageDigest?: string | null,
>   tag?: string | null,
>   status?: {
>     messageSet?: {
>     } | null,
>     code?: number | null,
>     canonicalCode?: number | null,
>     message?: string | null,
>     space?: string | null
>   } | null
> }[] | null
> ```

***

### locations.services.revisions.get

`run.locations.services.revisions.get`

Gets information about a Revision

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.revisions.get({ name: 'projects/demo-project/locations/us-central1/services/api/revisions/api-00001-abc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the Revision. Format: projects/\{project}/locations/\{location}/services/\{service}/revisions/\{revision} Format: `projects/<id>/locations/<id>/services/<id>/revisions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `executionEnvironment` | `string \| null` | No | The execution environment being used to host this Revision. |
| `containerStatuses` | `object[] \| null` | No | Output only. Status information for each of the specified containers. The status includes the resolved digest for specified images. |
| `timeout` | `string \| null` | No | Max allowed time for an instance to respond to a request. |
| `encryptionKeyRevocationAction` | `string \| null` | No | The action to take if the encryption key is revoked. |
| `nodeSelector` | `object \| null` | No | Hardware constraints configuration. |
| `clientVersion` | `string \| null` | No | Output only. Arbitrary version identifier for the API client. |
| `scaling` | `object \| null` | No | Settings for revision-level scaling settings. |
| `sandboxes` | `object \| null` | No | Configuration for sandboxes. |
| `serviceAccount` | `string \| null` | No | Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. |
| `deleteTime` | `string \| null` | No | Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request. |
| `encryptionKey` | `string \| null` | No | A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to [https://cloud.google.com/run/docs/securing/using-cmek](https://cloud.google.com/run/docs/securing/using-cmek) |
| `service` | `string \| null` | No | Output only. The name of the parent service. |
| `etag` | `string \| null` | No | Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `vpcAccess` | `object \| null` | No | VPC Access settings. For more information on sending traffic to a VPC network, visit [https://cloud.google.com/run/docs/configuring/connecting-vpc](https://cloud.google.com/run/docs/configuring/connecting-vpc). |
| `encryptionKeyShutdownDuration` | `string \| null` | No | If encryption\_key\_revocation\_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour. |
| `createTime` | `string \| null` | No | Output only. The creation time. |
| `expireTime` | `string \| null` | No | Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request. |
| `updateTime` | `string \| null` | No | Output only. The last-modified time. |
| `scalingStatus` | `object \| null` | No | Effective settings for the current revision |
| `serviceMesh` | `object \| null` | No | Settings for Cloud Service Mesh. For more information see [https://cloud.google.com/service-mesh/docs/overview](https://cloud.google.com/service-mesh/docs/overview). |
| `name` | `string \| null` | No | Output only. The unique name of this Revision. |
| `maxInstanceRequestConcurrency` | `number \| null` | No | Sets the maximum number of requests that each serving instance can receive. |
| `labels` | `Record<string, string> \| null` | No | Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). |
| `uid` | `string \| null` | No | Output only. Server assigned unique identifier for the Revision. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. |
| `logUri` | `string \| null` | No | Output only. The Google Console URI to obtain logs for the Revision. |
| `sessionAffinity` | `boolean \| null` | No | Enable session affinity. |
| `conditions` | `object[] \| null` | No | Output only. The Condition of this Revision, containing its readiness status, and detailed error information in case it did not reach a serving state. |
| `client` | `string \| null` | No | Output only. Arbitrary identifier for the API client. |
| `generation` | `string \| number \| null` | No | Output only. A number that monotonically increases every time the user modifies the desired state. |
| `launchStage` | `string \| null` | No | The least stable launch stage needed to create this resource, as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are used, this field will be BETA. |
| `workloadIdentityConfig` | `object \| null` | No | Workload identity settings. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `volumes` | `object[] \| null` | No | A list of Volumes to make available to containers. |
| `observedGeneration` | `string \| number \| null` | No | Output only. The generation of this Revision currently serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `creator` | `string \| null` | No | Output only. Email address of the authenticated creator. |
| `annotations` | `Record<string, string> \| null` | No | Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. |
| `ambientNetworking` | `object \| null` | No | Configuration for Ambient Networking. |
| `reconciling` | `boolean \| null` | No | Output only. Indicates whether the resource's reconciliation is still in progress. See comments in `Service.reconciling` for additional information on reconciliation process in Cloud Run. |
| `containers` | `object[] \| null` | No | Holds the list which define the units of execution for this Revision. |
| `gpuZonalRedundancyDisabled` | `boolean \| null` | No | Optional. Output only. True if GPU zonal redundancy is disabled on this revision. |

> [accordion] containerStatuses full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   imageDigest?: string | null,
>   buildStatus?: {
>     message?: string | null,
>     cloudBuildLogUrl?: string | null,
>     status?: string | null
>   } | null
> }[] | null
> ```

> [accordion] nodeSelector full type
>
> ```ts theme={null}
> {
>   accelerator?: string | null
> } | null
> ```

> [accordion] scaling full type
>
> ```ts theme={null}
> {
>   cpuUtilization?: number | null,
>   concurrencyUtilization?: number | null,
>   minInstanceCount?: number | null,
>   maxInstanceCount?: number | null
> } | null
> ```

> [accordion] sandboxes full type
>
> ```ts theme={null}
> {
>   templates?: {
>     args?: string[] | null,
>     image?: string | null,
>     command?: string[] | null,
>     workingDir?: string | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     name?: string | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] vpcAccess full type
>
> ```ts theme={null}
> {
>   networkInterfaces?: {
>     network?: string | null,
>     tags?: string[] | null,
>     subnetwork?: string | null
>   }[] | null,
>   egress?: string | null,
>   connector?: string | null
> } | null
> ```

> [accordion] scalingStatus full type
>
> ```ts theme={null}
> {
>   desiredMinInstanceCount?: number | null
> } | null
> ```

> [accordion] serviceMesh full type
>
> ```ts theme={null}
> {
>   mesh?: string | null
> } | null
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] workloadIdentityConfig full type
>
> ```ts theme={null}
> {
>   identityType?: string | null,
>   identity?: string | null,
>   identityCertificateEnabled?: boolean | null
> } | null
> ```

> [accordion] volumes full type
>
> ```ts theme={null}
> {
>   secret?: {
>     items?: {
>       version?: string | null,
>       mode?: number | null,
>       path?: string | null
>     }[] | null,
>     secret?: string | null,
>     defaultMode?: number | null
>   } | null,
>   cloudSqlInstance?: {
>     instances?: string[] | null
>   } | null,
>   name?: string | null,
>   nfs?: {
>     server?: string | null,
>     readOnly?: boolean | null,
>     path?: string | null
>   } | null,
>   emptyDir?: {
>     medium?: string | null,
>     sizeLimit?: string | null
>   } | null,
>   gcs?: {
>     readOnly?: boolean | null,
>     bucket?: string | null,
>     mountOptions?: string[] | null
>   } | null
> }[] | null
> ```

> [accordion] ambientNetworking full type
>
> ```ts theme={null}
> {
>   ambientScope?: string | null,
>   enabled?: boolean | null
> } | null
> ```

> [accordion] containers full type
>
> ```ts theme={null}
> {
>   dependsOn?: string[] | null,
>   resources?: {
>     limits?: Record<string, string> | null,
>     cpuIdle?: boolean | null,
>     startupCpuBoost?: boolean | null
>   } | null,
>   buildInfo?: {
>     functionTarget?: string | null,
>     sourceLocation?: string | null
>   } | null,
>   command?: string[] | null,
>   readinessProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   startupProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   args?: string[] | null,
>   buildConfig?: {
>     dockerBuild?: {
>     } | null,
>     serviceAccount?: string | null,
>     workerConfiguration?: {
>       cloudBuildWorkerConfiguration?: {
>         workerPool?: string | null,
>         machineType?: string | null
>       } | null
>     } | null,
>     buildpacksBuild?: {
>       environmentVariables?: Record<string, string> | null,
>       cacheImageUri?: string | null,
>       buildBaseImageUri?: string | null
>     } | null,
>     imageRepositoryUri?: string | null,
>     tags?: string[] | null,
>     environmentVariables?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null
>   } | null,
>   ports?: {
>     name?: string | null,
>     containerPort?: number | null
>   }[] | null,
>   name?: string | null,
>   sourceCode?: {
>     inlinedSource?: {
>       sources?: {
>         filename?: string | null,
>         content?: string | null
>       }[] | null
>     } | null,
>     cloudStorageSource?: {
>       bucket?: string | null,
>       object?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   image?: string | null,
>   workingDir?: string | null,
>   livenessProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   env?: {
>     name?: string | null,
>     value?: string | null,
>     valueSource?: {
>       secretKeyRef?: {
>         secret?: string | null,
>         version?: string | null
>       } | null
>     } | null
>   }[] | null,
>   volumeMounts?: {
>     subPath?: string | null,
>     mountPath?: string | null,
>     name?: string | null
>   }[] | null,
>   sandboxLauncher?: boolean | null,
>   baseImageUri?: string | null
> }[] | null
> ```

***

### locations.services.revisions.list

`run.locations.services.revisions.list`

Lists Revisions from a given Service, or from a given location. Results are sorted by creation time, descending (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.revisions.list({ parent: 'projects/demo-project/locations/us-central1/services/api' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A page token received from a previous call to ListRevisions. All other parameters must match. |
| `pageSize` | `number` | No | Maximum number of revisions to return in this call. |
| `showDeleted` | `boolean` | No | If true, returns deleted (but unexpired) resources along with active ones. |
| `parent` | `string` | Yes | Required. The Service from which the Revisions should be listed. To list all Revisions across Services, use "-" instead of Service name. Format: projects/\{project}/locations/\{location}/services/\{service} Format: `projects/<id>/locations/<id>/services/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token indicating there are more items than page\_size. Use it in the next ListRevisions request to continue. |
| `revisions` | `object[] \| null` | No | The resulting list of Revisions. |

> [accordion] revisions full type
>
> ```ts theme={null}
> {
>   executionEnvironment?: string | null,
>   containerStatuses?: {
>     name?: string | null,
>     imageDigest?: string | null,
>     buildStatus?: {
>       message?: string | null,
>       cloudBuildLogUrl?: string | null,
>       status?: string | null
>     } | null
>   }[] | null,
>   timeout?: string | null,
>   encryptionKeyRevocationAction?: string | null,
>   nodeSelector?: {
>     accelerator?: string | null
>   } | null,
>   clientVersion?: string | null,
>   scaling?: {
>     cpuUtilization?: number | null,
>     concurrencyUtilization?: number | null,
>     minInstanceCount?: number | null,
>     maxInstanceCount?: number | null
>   } | null,
>   sandboxes?: {
>     templates?: {
>       args?: string[] | null,
>       image?: string | null,
>       command?: string[] | null,
>       workingDir?: string | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       name?: string | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   serviceAccount?: string | null,
>   deleteTime?: string | null,
>   encryptionKey?: string | null,
>   service?: string | null,
>   etag?: string | null,
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string | null,
>       tags?: string[] | null,
>       subnetwork?: string | null
>     }[] | null,
>     egress?: string | null,
>     connector?: string | null
>   } | null,
>   encryptionKeyShutdownDuration?: string | null,
>   createTime?: string | null,
>   expireTime?: string | null,
>   updateTime?: string | null,
>   scalingStatus?: {
>     desiredMinInstanceCount?: number | null
>   } | null,
>   serviceMesh?: {
>     mesh?: string | null
>   } | null,
>   name?: string | null,
>   maxInstanceRequestConcurrency?: number | null,
>   labels?: Record<string, string> | null,
>   uid?: string | null,
>   logUri?: string | null,
>   sessionAffinity?: boolean | null,
>   conditions?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   }[] | null,
>   client?: string | null,
>   generation?: string | number | null,
>   launchStage?: string | null,
>   workloadIdentityConfig?: {
>     identityType?: string | null,
>     identity?: string | null,
>     identityCertificateEnabled?: boolean | null
>   } | null,
>   satisfiesPzs?: boolean | null,
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string | null,
>         mode?: number | null,
>         path?: string | null
>       }[] | null,
>       secret?: string | null,
>       defaultMode?: number | null
>     } | null,
>     cloudSqlInstance?: {
>       instances?: string[] | null
>     } | null,
>     name?: string | null,
>     nfs?: {
>       server?: string | null,
>       readOnly?: boolean | null,
>       path?: string | null
>     } | null,
>     emptyDir?: {
>       medium?: string | null,
>       sizeLimit?: string | null
>     } | null,
>     gcs?: {
>       readOnly?: boolean | null,
>       bucket?: string | null,
>       mountOptions?: string[] | null
>     } | null
>   }[] | null,
>   observedGeneration?: string | number | null,
>   creator?: string | null,
>   annotations?: Record<string, string> | null,
>   ambientNetworking?: {
>     ambientScope?: string | null,
>     enabled?: boolean | null
>   } | null,
>   reconciling?: boolean | null,
>   containers?: {
>     dependsOn?: string[] | null,
>     resources?: {
>       limits?: Record<string, string> | null,
>       cpuIdle?: boolean | null,
>       startupCpuBoost?: boolean | null
>     } | null,
>     buildInfo?: {
>       functionTarget?: string | null,
>       sourceLocation?: string | null
>     } | null,
>     command?: string[] | null,
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     args?: string[] | null,
>     buildConfig?: {
>       dockerBuild?: {
>       } | null,
>       serviceAccount?: string | null,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string | null,
>           machineType?: string | null
>         } | null
>       } | null,
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string> | null,
>         cacheImageUri?: string | null,
>         buildBaseImageUri?: string | null
>       } | null,
>       imageRepositoryUri?: string | null,
>       tags?: string[] | null,
>       environmentVariables?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     } | null,
>     ports?: {
>       name?: string | null,
>       containerPort?: number | null
>     }[] | null,
>     name?: string | null,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string | null,
>           content?: string | null
>         }[] | null
>       } | null,
>       cloudStorageSource?: {
>         bucket?: string | null,
>         object?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     image?: string | null,
>     workingDir?: string | null,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     sandboxLauncher?: boolean | null,
>     baseImageUri?: string | null
>   }[] | null,
>   gpuZonalRedundancyDisabled?: boolean | null
> }[] | null
> ```

***

### locations.services.setIamPolicy

`run.locations.services.setIamPolicy`

Sets the IAM Access control policy for the specified Service. Overwrites any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.setIamPolicy({
	resource: 'projects/demo-project/locations/us-central1/services/api',
	policy: {
		bindings: [{
			role: 'roles/run.invoker',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/services/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   bindings?: {
>     members?: string[],
>     role?: string,
>     condition?: {
>       title?: string,
>       location?: string,
>       description?: string,
>       expression?: string
>     }
>   }[],
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   role?: string | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

***

### locations.services.testIamPermissions

`run.locations.services.testIamPermissions`

Returns permissions that a caller has on the specified Project. There are no permissions required for making this API call

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.services.testIamPermissions({
	resource: 'projects/demo-project/locations/us-central1/services/api',
	permissions: ['run.routes.invoke'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/services/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### locations.sourceUploads.upload

`run.locations.sourceUploads.upload`

Uploads a source archive to a Google Cloud Storage bucket through Cloud Run. The uploaded source object should be used for Cloud Run resource deployments; pass the bytes in `file` (body fields go up with them in one multipart request)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.sourceUploads.upload({
	parent: 'projects/demo-project/locations/us-central1',
	file: { url: 'https://github.com/cli/cli/archive/refs/tags/v2.60.0.tar.gz', filename: 'source.tar.gz', contentType: 'application/gzip' },
	service: 'api',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project and location in which the source archive should be uploaded to, specified in the format `projects/*/locations/*`. Format: `projects/<id>/locations/<id>`. |
| `service` | `string` | No | The name of Cloud Run Service upload source archive will be used for. |
| `file` | `string \| object \| custom` | Yes | The bytes to upload (a URL, `{ base64 }` or a Blob). Body fields sent with it go up in the same multipart request. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cloudStorageSource` | `object \| null` | No | Cloud Storage source. |

> [accordion] cloudStorageSource full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   object?: string | null,
>   generation?: string | number | null
> } | null
> ```

***

### locations.workerPools.create

`run.locations.workerPools.create`

Creates a new WorkerPool in a given project and location

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.create({
	parent: 'projects/demo-project/locations/us-central1',
	workerPoolId: 'private',
	template: {
		containers: [{ image: 'us-central1-docker.pkg.dev/demo-project/docker/api:v1' }],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The location and project in which this worker pool should be created. Format: `projects/{project}/locations/{location}`, where `{project}` can be project id or number. Only lowercase characters, digits, and hyphens. Format: `projects/<id>/locations/<id>`. |
| `validateOnly` | `boolean` | No | Optional. Indicates that the request should be validated and default values populated, without persisting the request or creating any resources. |
| `workerPoolId` | `string` | No | Optional. The unique identifier for the WorkerPool. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the worker pool becomes `{parent}/workerPools/{worker_pool_id}`. If not provided, the server will generate a unique `worker_pool_id`. |
| `template` | `object` | No | WorkerPoolRevisionTemplate describes the data a worker pool revision should have when created from a template. |
| `binaryAuthorization` | `object` | No | Settings for Binary Authorization feature. |
| `customAudiences` | `string[]` | No | Deprecated: Not supported, and ignored by Cloud Run. |
| `description` | `string` | No | User-provided description of the WorkerPool. This field currently has a 512-character limit. |
| `launchStage` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | Optional. The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `annotations` | `Record<string, string>` | No | Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 WorkerPool. This field follows Kubernetes annotations' namespacing, limits, and rules. |
| `client` | `string` | No | Arbitrary identifier for the API client. |
| `labels` | `Record<string, string>` | No | Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `name` | `string` | No | The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, this field is ignored, and instead composed from CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker\_id. Format: `projects/{project}/locations/{location}/workerPools/{worker_id}` |
| `instanceSplits` | `object[]` | No | Optional. Specifies how to distribute instances over a collection of Revisions belonging to the WorkerPool. If instance split is empty or not provided, defaults to 100% instances assigned to the latest `Ready` Revision. |
| `clientVersion` | `string` | No | Arbitrary version identifier for the API client. |
| `scaling` | `object` | No | Worker pool scaling settings. |

> [accordion] template full type
>
> ```ts theme={null}
> {
>   encryptionKeyRevocationAction?: ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED | PREVENT_NEW | SHUTDOWN,
>   annotations?: Record<string, string>,
>   containers?: {
>     dependsOn?: string[],
>     resources?: {
>       limits?: Record<string, string>,
>       cpuIdle?: boolean,
>       startupCpuBoost?: boolean
>     },
>     command?: string[],
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     args?: string[],
>     buildConfig?: {
>       dockerBuild?: {
>       },
>       serviceAccount?: string,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string,
>           machineType?: string
>         }
>       },
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string>,
>         cacheImageUri?: string,
>         buildBaseImageUri?: string
>       },
>       imageRepositoryUri?: string,
>       tags?: string[],
>       environmentVariables?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[]
>     },
>     ports?: {
>       name?: string,
>       containerPort?: number
>     }[],
>     name?: string,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string,
>           content?: string
>         }[]
>       },
>       cloudStorageSource?: {
>         bucket?: string,
>         object?: string,
>         generation?: string | number
>       }
>     },
>     image?: string,
>     workingDir?: string,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     env?: {
>       name?: string,
>       value?: string,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string,
>           version?: string
>         }
>       }
>     }[],
>     volumeMounts?: {
>       subPath?: string,
>       mountPath?: string,
>       name?: string
>     }[],
>     sandboxLauncher?: boolean,
>     baseImageUri?: string
>   }[],
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string,
>         mode?: number,
>         path?: string
>       }[],
>       secret?: string,
>       defaultMode?: number
>     },
>     cloudSqlInstance?: {
>       instances?: string[]
>     },
>     name?: string,
>     nfs?: {
>       server?: string,
>       readOnly?: boolean,
>       path?: string
>     },
>     emptyDir?: {
>       medium?: MEDIUM_UNSPECIFIED | MEMORY | DISK,
>       sizeLimit?: string
>     },
>     gcs?: {
>       readOnly?: boolean,
>       bucket?: string,
>       mountOptions?: string[]
>     }
>   }[],
>   nodeSelector?: {
>     accelerator?: string
>   },
>   clientVersion?: string,
>   client?: string,
>   serviceMesh?: {
>     mesh?: string
>   },
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string,
>       tags?: string[],
>       subnetwork?: string
>     }[],
>     egress?: VPC_EGRESS_UNSPECIFIED | ALL_TRAFFIC | PRIVATE_RANGES_ONLY,
>     connector?: string
>   },
>   serviceAccount?: string,
>   labels?: Record<string, string>,
>   sandboxes?: {
>     templates?: {
>       args?: string[],
>       image?: string,
>       command?: string[],
>       workingDir?: string,
>       volumeMounts?: {
>         subPath?: string,
>         mountPath?: string,
>         name?: string
>       }[],
>       name?: string,
>       env?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[]
>     }[]
>   },
>   gpuZonalRedundancyDisabled?: boolean,
>   encryptionKey?: string,
>   encryptionKeyShutdownDuration?: string,
>   revision?: string
> }
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean,
>   policy?: string,
>   breakglassJustification?: string
> }
> ```

> [accordion] instanceSplits full type
>
> ```ts theme={null}
> {
>   type?: INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED | INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST | INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION,
>   percent?: number,
>   revision?: string
> }[]
> ```

> [accordion] scaling full type
>
> ```ts theme={null}
> {
>   manualInstanceCount?: number,
>   cpuScaling?: {
>     cpuUtilization?: number
>   },
>   minInstanceCount?: number,
>   scalingMode?: SCALING_MODE_UNSPECIFIED | AUTOMATIC | MANUAL,
>   maxInstanceCount?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workerPools.delete

`run.locations.workerPools.delete`

Deletes a WorkerPool

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.delete({ name: 'projects/demo-project/locations/us-central1/workerPools/private' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string` | No | A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `name` | `string` | Yes | Required. The full name of the WorkerPool. Format: `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where `{project}` can be project id or number. Format: `projects/<id>/locations/<id>/workerPools/<id>`. |
| `validateOnly` | `boolean` | No | Optional. Indicates that the request should be validated without actually deleting any resources. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workerPools.get

`run.locations.workerPools.get`

Gets information about a WorkerPool

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.get({ name: 'projects/demo-project/locations/us-central1/workerPools/private' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the WorkerPool. Format: `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where `{project}` can be project id or number. Format: `projects/<id>/locations/<id>/workerPools/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `creator` | `string \| null` | No | Output only. Email address of the authenticated creator. |
| `template` | `object \| null` | No | WorkerPoolRevisionTemplate describes the data a worker pool revision should have when created from a template. |
| `binaryAuthorization` | `object \| null` | No | Settings for Binary Authorization feature. |
| `customAudiences` | `string[] \| null` | No | Deprecated: Not supported, and ignored by Cloud Run. |
| `conditions` | `object[] \| null` | No | Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the WorkerPool does not reach its Serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `threatDetectionEnabled` | `boolean \| null` | No | Output only. Indicates whether Cloud Run Threat Detection monitoring is enabled for the parent project of this worker pool. |
| `generation` | `string \| number \| null` | No | Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. |
| `description` | `string \| null` | No | User-provided description of the WorkerPool. This field currently has a 512-character limit. |
| `launchStage` | `string \| null` | No | Optional. The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `terminalCondition` | `object \| null` | No | Defines a status condition for a resource. |
| `reconciling` | `boolean \| null` | No | Output only. Returns true if the WorkerPool is currently being acted upon by the system to bring it into the desired state. When a new WorkerPool is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the WorkerPool to the desired serving state. This process is called reconciliation. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 WorkerPool. This field follows Kubernetes annotations' namespacing, limits, and rules. |
| `observedGeneration` | `string \| number \| null` | No | Output only. The generation of this WorkerPool currently serving workloads. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. |
| `client` | `string \| null` | No | Arbitrary identifier for the API client. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `labels` | `Record<string, string> \| null` | No | Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. |
| `etag` | `string \| null` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `name` | `string \| null` | No | The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, this field is ignored, and instead composed from CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker\_id. Format: `projects/{project}/locations/{location}/workerPools/{worker_id}` |
| `instanceSplits` | `object[] \| null` | No | Optional. Specifies how to distribute instances over a collection of Revisions belonging to the WorkerPool. If instance split is empty or not provided, defaults to 100% instances assigned to the latest `Ready` Revision. |
| `instanceSplitStatuses` | `object[] \| null` | No | Output only. Detailed status information for corresponding instance splits. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `clientVersion` | `string \| null` | No | Arbitrary version identifier for the API client. |
| `deleteTime` | `string \| null` | No | Output only. The deletion time. It is only populated as a response to a Delete request. |
| `latestCreatedRevision` | `string \| null` | No | Output only. Name of the last created revision. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `uid` | `string \| null` | No | Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. |
| `lastModifier` | `string \| null` | No | Output only. Email address of the last authenticated modifier. |
| `updateTime` | `string \| null` | No | Output only. The last-modified time. |
| `latestReadyRevision` | `string \| null` | No | Output only. Name of the latest revision that is serving workloads. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `createTime` | `string \| null` | No | Output only. The creation time. |
| `expireTime` | `string \| null` | No | Output only. For a deleted resource, the time after which it will be permamently deleted. |
| `scaling` | `object \| null` | No | Worker pool scaling settings. |

> [accordion] template full type
>
> ```ts theme={null}
> {
>   encryptionKeyRevocationAction?: string | null,
>   annotations?: Record<string, string> | null,
>   containers?: {
>     dependsOn?: string[] | null,
>     resources?: {
>       limits?: Record<string, string> | null,
>       cpuIdle?: boolean | null,
>       startupCpuBoost?: boolean | null
>     } | null,
>     buildInfo?: {
>       functionTarget?: string | null,
>       sourceLocation?: string | null
>     } | null,
>     command?: string[] | null,
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     args?: string[] | null,
>     buildConfig?: {
>       dockerBuild?: {
>       } | null,
>       serviceAccount?: string | null,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string | null,
>           machineType?: string | null
>         } | null
>       } | null,
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string> | null,
>         cacheImageUri?: string | null,
>         buildBaseImageUri?: string | null
>       } | null,
>       imageRepositoryUri?: string | null,
>       tags?: string[] | null,
>       environmentVariables?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     } | null,
>     ports?: {
>       name?: string | null,
>       containerPort?: number | null
>     }[] | null,
>     name?: string | null,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string | null,
>           content?: string | null
>         }[] | null
>       } | null,
>       cloudStorageSource?: {
>         bucket?: string | null,
>         object?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     image?: string | null,
>     workingDir?: string | null,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     sandboxLauncher?: boolean | null,
>     baseImageUri?: string | null
>   }[] | null,
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string | null,
>         mode?: number | null,
>         path?: string | null
>       }[] | null,
>       secret?: string | null,
>       defaultMode?: number | null
>     } | null,
>     cloudSqlInstance?: {
>       instances?: string[] | null
>     } | null,
>     name?: string | null,
>     nfs?: {
>       server?: string | null,
>       readOnly?: boolean | null,
>       path?: string | null
>     } | null,
>     emptyDir?: {
>       medium?: string | null,
>       sizeLimit?: string | null
>     } | null,
>     gcs?: {
>       readOnly?: boolean | null,
>       bucket?: string | null,
>       mountOptions?: string[] | null
>     } | null
>   }[] | null,
>   nodeSelector?: {
>     accelerator?: string | null
>   } | null,
>   clientVersion?: string | null,
>   client?: string | null,
>   serviceMesh?: {
>     mesh?: string | null
>   } | null,
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string | null,
>       tags?: string[] | null,
>       subnetwork?: string | null
>     }[] | null,
>     egress?: string | null,
>     connector?: string | null
>   } | null,
>   serviceAccount?: string | null,
>   labels?: Record<string, string> | null,
>   sandboxes?: {
>     templates?: {
>       args?: string[] | null,
>       image?: string | null,
>       command?: string[] | null,
>       workingDir?: string | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       name?: string | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   gpuZonalRedundancyDisabled?: boolean | null,
>   encryptionKey?: string | null,
>   encryptionKeyShutdownDuration?: string | null,
>   revision?: string | null
> } | null
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean | null,
>   policy?: string | null,
>   breakglassJustification?: string | null
> } | null
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] terminalCondition full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] instanceSplits full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   percent?: number | null,
>   revision?: string | null
> }[] | null
> ```

> [accordion] instanceSplitStatuses full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   percent?: number | null,
>   revision?: string | null
> }[] | null
> ```

> [accordion] scaling full type
>
> ```ts theme={null}
> {
>   manualInstanceCount?: number | null,
>   cpuScaling?: {
>     cpuUtilization?: number | null
>   } | null,
>   minInstanceCount?: number | null,
>   scalingMode?: string | null,
>   maxInstanceCount?: number | null
> } | null
> ```

***

### locations.workerPools.getIamPolicy

`run.locations.workerPools.getIamPolicy`

Gets the IAM Access Control policy currently in effect for the given Cloud Run WorkerPool. This result does not include any inherited policies

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.getIamPolicy({ resource: 'projects/demo-project/locations/us-central1/workerPools/private' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/workerPools/<id>`. |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   role?: string | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

***

### locations.workerPools.list

`run.locations.workerPools.list`

Lists WorkerPools. Results are sorted by creation time, descending (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `showDeleted` | `boolean` | No | If true, returns deleted (but unexpired) resources along with active ones. |
| `parent` | `string` | Yes | Required. The location and project to list resources on. Location must be a valid Google Cloud region, and cannot be the "-" wildcard. Format: `projects/{project}/locations/{location}`, where `{project}` can be project id or number. Format: `projects/<id>/locations/<id>`. |
| `pageSize` | `number` | No | Maximum number of WorkerPools to return in this call. |
| `pageToken` | `string` | No | A page token received from a previous call to ListWorkerPools. All other parameters must match. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token indicating there are more items than page\_size. Use it in the next ListWorkerPools request to continue. |
| `workerPools` | `object[] \| null` | No | The resulting list of WorkerPools. |

> [accordion] workerPools full type
>
> ```ts theme={null}
> {
>   creator?: string | null,
>   template?: {
>     encryptionKeyRevocationAction?: string | null,
>     annotations?: Record<string, string> | null,
>     containers?: {
>       dependsOn?: string[] | null,
>       resources?: {
>         limits?: Record<string, string> | null,
>         cpuIdle?: boolean | null,
>         startupCpuBoost?: boolean | null
>       } | null,
>       buildInfo?: {
>         functionTarget?: string | null,
>         sourceLocation?: string | null
>       } | null,
>       command?: string[] | null,
>       readinessProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       startupProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       args?: string[] | null,
>       buildConfig?: {
>         dockerBuild?: {
>         } | null,
>         serviceAccount?: string | null,
>         workerConfiguration?: {
>           cloudBuildWorkerConfiguration?: {
>             workerPool?: string | null,
>             machineType?: string | null
>           } | null
>         } | null,
>         buildpacksBuild?: {
>           environmentVariables?: Record<string, string> | null,
>           cacheImageUri?: string | null,
>           buildBaseImageUri?: string | null
>         } | null,
>         imageRepositoryUri?: string | null,
>         tags?: string[] | null,
>         environmentVariables?: {
>           name?: string | null,
>           value?: string | null,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string | null,
>               version?: string | null
>             } | null
>           } | null
>         }[] | null
>       } | null,
>       ports?: {
>         name?: string | null,
>         containerPort?: number | null
>       }[] | null,
>       name?: string | null,
>       sourceCode?: {
>         inlinedSource?: {
>           sources?: {
>             filename?: string | null,
>             content?: string | null
>           }[] | null
>         } | null,
>         cloudStorageSource?: {
>           bucket?: string | null,
>           object?: string | null,
>           generation?: string | number | null
>         } | null
>       } | null,
>       image?: string | null,
>       workingDir?: string | null,
>       livenessProbe?: {
>         tcpSocket?: {
>           port?: number | null
>         } | null,
>         grpc?: {
>           port?: number | null,
>           service?: string | null
>         } | null,
>         failureThreshold?: number | null,
>         periodSeconds?: number | null,
>         initialDelaySeconds?: number | null,
>         timeoutSeconds?: number | null,
>         httpGet?: {
>           httpHeaders?: {
>             value?: string | null,
>             name?: string | null
>           }[] | null,
>           port?: number | null,
>           path?: string | null
>         } | null
>       } | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       sandboxLauncher?: boolean | null,
>       baseImageUri?: string | null
>     }[] | null,
>     volumes?: {
>       secret?: {
>         items?: {
>           version?: string | null,
>           mode?: number | null,
>           path?: string | null
>         }[] | null,
>         secret?: string | null,
>         defaultMode?: number | null
>       } | null,
>       cloudSqlInstance?: {
>         instances?: string[] | null
>       } | null,
>       name?: string | null,
>       nfs?: {
>         server?: string | null,
>         readOnly?: boolean | null,
>         path?: string | null
>       } | null,
>       emptyDir?: {
>         medium?: string | null,
>         sizeLimit?: string | null
>       } | null,
>       gcs?: {
>         readOnly?: boolean | null,
>         bucket?: string | null,
>         mountOptions?: string[] | null
>       } | null
>     }[] | null,
>     nodeSelector?: {
>       accelerator?: string | null
>     } | null,
>     clientVersion?: string | null,
>     client?: string | null,
>     serviceMesh?: {
>       mesh?: string | null
>     } | null,
>     vpcAccess?: {
>       networkInterfaces?: {
>         network?: string | null,
>         tags?: string[] | null,
>         subnetwork?: string | null
>       }[] | null,
>       egress?: string | null,
>       connector?: string | null
>     } | null,
>     serviceAccount?: string | null,
>     labels?: Record<string, string> | null,
>     sandboxes?: {
>       templates?: {
>         args?: string[] | null,
>         image?: string | null,
>         command?: string[] | null,
>         workingDir?: string | null,
>         volumeMounts?: {
>           subPath?: string | null,
>           mountPath?: string | null,
>           name?: string | null
>         }[] | null,
>         name?: string | null,
>         env?: {
>           name?: string | null,
>           value?: string | null,
>           valueSource?: {
>             secretKeyRef?: {
>               secret?: string | null,
>               version?: string | null
>             } | null
>           } | null
>         }[] | null
>       }[] | null
>     } | null,
>     gpuZonalRedundancyDisabled?: boolean | null,
>     encryptionKey?: string | null,
>     encryptionKeyShutdownDuration?: string | null,
>     revision?: string | null
>   } | null,
>   binaryAuthorization?: {
>     useDefault?: boolean | null,
>     policy?: string | null,
>     breakglassJustification?: string | null
>   } | null,
>   customAudiences?: string[] | null,
>   conditions?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   }[] | null,
>   threatDetectionEnabled?: boolean | null,
>   generation?: string | number | null,
>   description?: string | null,
>   launchStage?: string | null,
>   terminalCondition?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   } | null,
>   reconciling?: boolean | null,
>   annotations?: Record<string, string> | null,
>   observedGeneration?: string | number | null,
>   client?: string | null,
>   satisfiesPzs?: boolean | null,
>   labels?: Record<string, string> | null,
>   etag?: string | null,
>   name?: string | null,
>   instanceSplits?: {
>     type?: string | null,
>     percent?: number | null,
>     revision?: string | null
>   }[] | null,
>   instanceSplitStatuses?: {
>     type?: string | null,
>     percent?: number | null,
>     revision?: string | null
>   }[] | null,
>   clientVersion?: string | null,
>   deleteTime?: string | null,
>   latestCreatedRevision?: string | null,
>   uid?: string | null,
>   lastModifier?: string | null,
>   updateTime?: string | null,
>   latestReadyRevision?: string | null,
>   createTime?: string | null,
>   expireTime?: string | null,
>   scaling?: {
>     manualInstanceCount?: number | null,
>     cpuScaling?: {
>       cpuUtilization?: number | null
>     } | null,
>     minInstanceCount?: number | null,
>     scalingMode?: string | null,
>     maxInstanceCount?: number | null
>   } | null
> }[] | null
> ```

***

### locations.workerPools.patch

`run.locations.workerPools.patch`

Updates a WorkerPool

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.patch({
	name: 'projects/demo-project/locations/us-central1/workerPools/private',
	updateMask: 'template',
	template: {
		containers: [{ image: 'us-central1-docker.pkg.dev/demo-project/docker/api:v2' }],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowMissing` | `boolean` | No | Optional. If set to true, and if the WorkerPool does not exist, it will create a new one. The caller must have 'run.workerpools.create' permissions if this is set to true and the WorkerPool does not exist. |
| `name` | `string` | Yes | The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, this field is ignored, and instead composed from CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker\_id. Format: `projects/{project}/locations/{location}/workerPools/{worker_id}` Format: `projects/<id>/locations/<id>/workerPools/<id>`. |
| `validateOnly` | `boolean` | No | Optional. Indicates that the request should be validated and default values populated, without persisting the request or updating any resources. |
| `updateMask` | `string` | No | Optional. The list of fields to be updated. |
| `forceNewRevision` | `boolean` | No | Optional. If set to true, a new revision will be created from the template even if the system doesn't detect any changes from the previously deployed revision. This may be useful for cases where the underlying resources need to be recreated or reinitialized. For example if the image is specified by label, but the underlying image digest has changed) or if the container performs deployment initialization work that needs to be performed again. |
| `template` | `object` | No | WorkerPoolRevisionTemplate describes the data a worker pool revision should have when created from a template. |
| `binaryAuthorization` | `object` | No | Settings for Binary Authorization feature. |
| `customAudiences` | `string[]` | No | Deprecated: Not supported, and ignored by Cloud Run. |
| `description` | `string` | No | User-provided description of the WorkerPool. This field currently has a 512-character limit. |
| `launchStage` | `LAUNCH_STAGE_UNSPECIFIED \| UNIMPLEMENTED \| PRELAUNCH \| EARLY_ACCESS \| ALPHA \| BETA \| GA \| DEPRECATED` | No | Optional. The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `annotations` | `Record<string, string>` | No | Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 WorkerPool. This field follows Kubernetes annotations' namespacing, limits, and rules. |
| `client` | `string` | No | Arbitrary identifier for the API client. |
| `labels` | `Record<string, string>` | No | Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. |
| `etag` | `string` | No | Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `body_name` | `string` | No | The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, this field is ignored, and instead composed from CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker\_id. Format: `projects/{project}/locations/{location}/workerPools/{worker_id}` |
| `instanceSplits` | `object[]` | No | Optional. Specifies how to distribute instances over a collection of Revisions belonging to the WorkerPool. If instance split is empty or not provided, defaults to 100% instances assigned to the latest `Ready` Revision. |
| `clientVersion` | `string` | No | Arbitrary version identifier for the API client. |
| `scaling` | `object` | No | Worker pool scaling settings. |

> [accordion] template full type
>
> ```ts theme={null}
> {
>   encryptionKeyRevocationAction?: ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED | PREVENT_NEW | SHUTDOWN,
>   annotations?: Record<string, string>,
>   containers?: {
>     dependsOn?: string[],
>     resources?: {
>       limits?: Record<string, string>,
>       cpuIdle?: boolean,
>       startupCpuBoost?: boolean
>     },
>     command?: string[],
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     args?: string[],
>     buildConfig?: {
>       dockerBuild?: {
>       },
>       serviceAccount?: string,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string,
>           machineType?: string
>         }
>       },
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string>,
>         cacheImageUri?: string,
>         buildBaseImageUri?: string
>       },
>       imageRepositoryUri?: string,
>       tags?: string[],
>       environmentVariables?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[]
>     },
>     ports?: {
>       name?: string,
>       containerPort?: number
>     }[],
>     name?: string,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string,
>           content?: string
>         }[]
>       },
>       cloudStorageSource?: {
>         bucket?: string,
>         object?: string,
>         generation?: string | number
>       }
>     },
>     image?: string,
>     workingDir?: string,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number
>       },
>       grpc?: {
>         port?: number,
>         service?: string
>       },
>       failureThreshold?: number,
>       periodSeconds?: number,
>       initialDelaySeconds?: number,
>       timeoutSeconds?: number,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string,
>           name?: string
>         }[],
>         port?: number,
>         path?: string
>       }
>     },
>     env?: {
>       name?: string,
>       value?: string,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string,
>           version?: string
>         }
>       }
>     }[],
>     volumeMounts?: {
>       subPath?: string,
>       mountPath?: string,
>       name?: string
>     }[],
>     sandboxLauncher?: boolean,
>     baseImageUri?: string
>   }[],
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string,
>         mode?: number,
>         path?: string
>       }[],
>       secret?: string,
>       defaultMode?: number
>     },
>     cloudSqlInstance?: {
>       instances?: string[]
>     },
>     name?: string,
>     nfs?: {
>       server?: string,
>       readOnly?: boolean,
>       path?: string
>     },
>     emptyDir?: {
>       medium?: MEDIUM_UNSPECIFIED | MEMORY | DISK,
>       sizeLimit?: string
>     },
>     gcs?: {
>       readOnly?: boolean,
>       bucket?: string,
>       mountOptions?: string[]
>     }
>   }[],
>   nodeSelector?: {
>     accelerator?: string
>   },
>   clientVersion?: string,
>   client?: string,
>   serviceMesh?: {
>     mesh?: string
>   },
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string,
>       tags?: string[],
>       subnetwork?: string
>     }[],
>     egress?: VPC_EGRESS_UNSPECIFIED | ALL_TRAFFIC | PRIVATE_RANGES_ONLY,
>     connector?: string
>   },
>   serviceAccount?: string,
>   labels?: Record<string, string>,
>   sandboxes?: {
>     templates?: {
>       args?: string[],
>       image?: string,
>       command?: string[],
>       workingDir?: string,
>       volumeMounts?: {
>         subPath?: string,
>         mountPath?: string,
>         name?: string
>       }[],
>       name?: string,
>       env?: {
>         name?: string,
>         value?: string,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string,
>             version?: string
>           }
>         }
>       }[]
>     }[]
>   },
>   gpuZonalRedundancyDisabled?: boolean,
>   encryptionKey?: string,
>   encryptionKeyShutdownDuration?: string,
>   revision?: string
> }
> ```

> [accordion] binaryAuthorization full type
>
> ```ts theme={null}
> {
>   useDefault?: boolean,
>   policy?: string,
>   breakglassJustification?: string
> }
> ```

> [accordion] instanceSplits full type
>
> ```ts theme={null}
> {
>   type?: INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED | INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST | INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION,
>   percent?: number,
>   revision?: string
> }[]
> ```

> [accordion] scaling full type
>
> ```ts theme={null}
> {
>   manualInstanceCount?: number,
>   cpuScaling?: {
>     cpuUtilization?: number
>   },
>   minInstanceCount?: number,
>   scalingMode?: SCALING_MODE_UNSPECIFIED | AUTOMATIC | MANUAL,
>   maxInstanceCount?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workerPools.revisions.delete

`run.locations.workerPools.revisions.delete`

Deletes a Revision

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.revisions.delete({ name: 'projects/demo-project/locations/us-central1/workerPools/private/revisions/api-00001-abc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Indicates that the request should be validated without actually deleting any resources. |
| `etag` | `string` | No | A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates. |
| `name` | `string` | Yes | Required. The name of the Revision to delete. Format: projects/\{project}/locations/\{location}/services/\{service}/revisions/\{revision} Format: `projects/<id>/locations/<id>/workerPools/<id>/revisions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.workerPools.revisions.get

`run.locations.workerPools.revisions.get`

Gets information about a Revision

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.revisions.get({ name: 'projects/demo-project/locations/us-central1/workerPools/private/revisions/api-00001-abc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The full name of the Revision. Format: projects/\{project}/locations/\{location}/services/\{service}/revisions/\{revision} Format: `projects/<id>/locations/<id>/workerPools/<id>/revisions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `executionEnvironment` | `string \| null` | No | The execution environment being used to host this Revision. |
| `containerStatuses` | `object[] \| null` | No | Output only. Status information for each of the specified containers. The status includes the resolved digest for specified images. |
| `timeout` | `string \| null` | No | Max allowed time for an instance to respond to a request. |
| `encryptionKeyRevocationAction` | `string \| null` | No | The action to take if the encryption key is revoked. |
| `nodeSelector` | `object \| null` | No | Hardware constraints configuration. |
| `clientVersion` | `string \| null` | No | Output only. Arbitrary version identifier for the API client. |
| `scaling` | `object \| null` | No | Settings for revision-level scaling settings. |
| `sandboxes` | `object \| null` | No | Configuration for sandboxes. |
| `serviceAccount` | `string \| null` | No | Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. |
| `deleteTime` | `string \| null` | No | Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request. |
| `encryptionKey` | `string \| null` | No | A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to [https://cloud.google.com/run/docs/securing/using-cmek](https://cloud.google.com/run/docs/securing/using-cmek) |
| `service` | `string \| null` | No | Output only. The name of the parent service. |
| `etag` | `string \| null` | No | Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `vpcAccess` | `object \| null` | No | VPC Access settings. For more information on sending traffic to a VPC network, visit [https://cloud.google.com/run/docs/configuring/connecting-vpc](https://cloud.google.com/run/docs/configuring/connecting-vpc). |
| `encryptionKeyShutdownDuration` | `string \| null` | No | If encryption\_key\_revocation\_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour. |
| `createTime` | `string \| null` | No | Output only. The creation time. |
| `expireTime` | `string \| null` | No | Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request. |
| `updateTime` | `string \| null` | No | Output only. The last-modified time. |
| `scalingStatus` | `object \| null` | No | Effective settings for the current revision |
| `serviceMesh` | `object \| null` | No | Settings for Cloud Service Mesh. For more information see [https://cloud.google.com/service-mesh/docs/overview](https://cloud.google.com/service-mesh/docs/overview). |
| `name` | `string \| null` | No | Output only. The unique name of this Revision. |
| `maxInstanceRequestConcurrency` | `number \| null` | No | Sets the maximum number of requests that each serving instance can receive. |
| `labels` | `Record<string, string> \| null` | No | Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit [https://cloud.google.com/resource-manager/docs/creating-managing-labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels) or [https://cloud.google.com/run/docs/configuring/labels](https://cloud.google.com/run/docs/configuring/labels). |
| `uid` | `string \| null` | No | Output only. Server assigned unique identifier for the Revision. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. |
| `logUri` | `string \| null` | No | Output only. The Google Console URI to obtain logs for the Revision. |
| `sessionAffinity` | `boolean \| null` | No | Enable session affinity. |
| `conditions` | `object[] \| null` | No | Output only. The Condition of this Revision, containing its readiness status, and detailed error information in case it did not reach a serving state. |
| `client` | `string \| null` | No | Output only. Arbitrary identifier for the API client. |
| `generation` | `string \| number \| null` | No | Output only. A number that monotonically increases every time the user modifies the desired state. |
| `launchStage` | `string \| null` | No | The least stable launch stage needed to create this resource, as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are used, this field will be BETA. |
| `workloadIdentityConfig` | `object \| null` | No | Workload identity settings. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Reserved for future use. |
| `volumes` | `object[] \| null` | No | A list of Volumes to make available to containers. |
| `observedGeneration` | `string \| number \| null` | No | Output only. The generation of this Revision currently serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `creator` | `string \| null` | No | Output only. Email address of the authenticated creator. |
| `annotations` | `Record<string, string> \| null` | No | Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. |
| `ambientNetworking` | `object \| null` | No | Configuration for Ambient Networking. |
| `reconciling` | `boolean \| null` | No | Output only. Indicates whether the resource's reconciliation is still in progress. See comments in `Service.reconciling` for additional information on reconciliation process in Cloud Run. |
| `containers` | `object[] \| null` | No | Holds the list which define the units of execution for this Revision. |
| `gpuZonalRedundancyDisabled` | `boolean \| null` | No | Optional. Output only. True if GPU zonal redundancy is disabled on this revision. |

> [accordion] containerStatuses full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   imageDigest?: string | null,
>   buildStatus?: {
>     message?: string | null,
>     cloudBuildLogUrl?: string | null,
>     status?: string | null
>   } | null
> }[] | null
> ```

> [accordion] nodeSelector full type
>
> ```ts theme={null}
> {
>   accelerator?: string | null
> } | null
> ```

> [accordion] scaling full type
>
> ```ts theme={null}
> {
>   cpuUtilization?: number | null,
>   concurrencyUtilization?: number | null,
>   minInstanceCount?: number | null,
>   maxInstanceCount?: number | null
> } | null
> ```

> [accordion] sandboxes full type
>
> ```ts theme={null}
> {
>   templates?: {
>     args?: string[] | null,
>     image?: string | null,
>     command?: string[] | null,
>     workingDir?: string | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     name?: string | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null
>   }[] | null
> } | null
> ```

> [accordion] vpcAccess full type
>
> ```ts theme={null}
> {
>   networkInterfaces?: {
>     network?: string | null,
>     tags?: string[] | null,
>     subnetwork?: string | null
>   }[] | null,
>   egress?: string | null,
>   connector?: string | null
> } | null
> ```

> [accordion] scalingStatus full type
>
> ```ts theme={null}
> {
>   desiredMinInstanceCount?: number | null
> } | null
> ```

> [accordion] serviceMesh full type
>
> ```ts theme={null}
> {
>   mesh?: string | null
> } | null
> ```

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastTransitionTime?: string | null,
>   severity?: string | null,
>   revisionReason?: string | null,
>   instanceReason?: string | null,
>   reason?: string | null,
>   type?: string | null,
>   executionReason?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] workloadIdentityConfig full type
>
> ```ts theme={null}
> {
>   identityType?: string | null,
>   identity?: string | null,
>   identityCertificateEnabled?: boolean | null
> } | null
> ```

> [accordion] volumes full type
>
> ```ts theme={null}
> {
>   secret?: {
>     items?: {
>       version?: string | null,
>       mode?: number | null,
>       path?: string | null
>     }[] | null,
>     secret?: string | null,
>     defaultMode?: number | null
>   } | null,
>   cloudSqlInstance?: {
>     instances?: string[] | null
>   } | null,
>   name?: string | null,
>   nfs?: {
>     server?: string | null,
>     readOnly?: boolean | null,
>     path?: string | null
>   } | null,
>   emptyDir?: {
>     medium?: string | null,
>     sizeLimit?: string | null
>   } | null,
>   gcs?: {
>     readOnly?: boolean | null,
>     bucket?: string | null,
>     mountOptions?: string[] | null
>   } | null
> }[] | null
> ```

> [accordion] ambientNetworking full type
>
> ```ts theme={null}
> {
>   ambientScope?: string | null,
>   enabled?: boolean | null
> } | null
> ```

> [accordion] containers full type
>
> ```ts theme={null}
> {
>   dependsOn?: string[] | null,
>   resources?: {
>     limits?: Record<string, string> | null,
>     cpuIdle?: boolean | null,
>     startupCpuBoost?: boolean | null
>   } | null,
>   buildInfo?: {
>     functionTarget?: string | null,
>     sourceLocation?: string | null
>   } | null,
>   command?: string[] | null,
>   readinessProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   startupProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   args?: string[] | null,
>   buildConfig?: {
>     dockerBuild?: {
>     } | null,
>     serviceAccount?: string | null,
>     workerConfiguration?: {
>       cloudBuildWorkerConfiguration?: {
>         workerPool?: string | null,
>         machineType?: string | null
>       } | null
>     } | null,
>     buildpacksBuild?: {
>       environmentVariables?: Record<string, string> | null,
>       cacheImageUri?: string | null,
>       buildBaseImageUri?: string | null
>     } | null,
>     imageRepositoryUri?: string | null,
>     tags?: string[] | null,
>     environmentVariables?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null
>   } | null,
>   ports?: {
>     name?: string | null,
>     containerPort?: number | null
>   }[] | null,
>   name?: string | null,
>   sourceCode?: {
>     inlinedSource?: {
>       sources?: {
>         filename?: string | null,
>         content?: string | null
>       }[] | null
>     } | null,
>     cloudStorageSource?: {
>       bucket?: string | null,
>       object?: string | null,
>       generation?: string | number | null
>     } | null
>   } | null,
>   image?: string | null,
>   workingDir?: string | null,
>   livenessProbe?: {
>     tcpSocket?: {
>       port?: number | null
>     } | null,
>     grpc?: {
>       port?: number | null,
>       service?: string | null
>     } | null,
>     failureThreshold?: number | null,
>     periodSeconds?: number | null,
>     initialDelaySeconds?: number | null,
>     timeoutSeconds?: number | null,
>     httpGet?: {
>       httpHeaders?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       port?: number | null,
>       path?: string | null
>     } | null
>   } | null,
>   env?: {
>     name?: string | null,
>     value?: string | null,
>     valueSource?: {
>       secretKeyRef?: {
>         secret?: string | null,
>         version?: string | null
>       } | null
>     } | null
>   }[] | null,
>   volumeMounts?: {
>     subPath?: string | null,
>     mountPath?: string | null,
>     name?: string | null
>   }[] | null,
>   sandboxLauncher?: boolean | null,
>   baseImageUri?: string | null
> }[] | null
> ```

***

### locations.workerPools.revisions.list

`run.locations.workerPools.revisions.list`

Lists Revisions from a given Service, or from a given location. Results are sorted by creation time, descending (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.revisions.list({ parent: 'projects/demo-project/locations/us-central1/workerPools/private' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `showDeleted` | `boolean` | No | If true, returns deleted (but unexpired) resources along with active ones. |
| `parent` | `string` | Yes | Required. The Service from which the Revisions should be listed. To list all Revisions across Services, use "-" instead of Service name. Format: projects/\{project}/locations/\{location}/services/\{service} Format: `projects/<id>/locations/<id>/workerPools/<id>`. |
| `pageToken` | `string` | No | A page token received from a previous call to ListRevisions. All other parameters must match. |
| `pageSize` | `number` | No | Maximum number of revisions to return in this call. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token indicating there are more items than page\_size. Use it in the next ListRevisions request to continue. |
| `revisions` | `object[] \| null` | No | The resulting list of Revisions. |

> [accordion] revisions full type
>
> ```ts theme={null}
> {
>   executionEnvironment?: string | null,
>   containerStatuses?: {
>     name?: string | null,
>     imageDigest?: string | null,
>     buildStatus?: {
>       message?: string | null,
>       cloudBuildLogUrl?: string | null,
>       status?: string | null
>     } | null
>   }[] | null,
>   timeout?: string | null,
>   encryptionKeyRevocationAction?: string | null,
>   nodeSelector?: {
>     accelerator?: string | null
>   } | null,
>   clientVersion?: string | null,
>   scaling?: {
>     cpuUtilization?: number | null,
>     concurrencyUtilization?: number | null,
>     minInstanceCount?: number | null,
>     maxInstanceCount?: number | null
>   } | null,
>   sandboxes?: {
>     templates?: {
>       args?: string[] | null,
>       image?: string | null,
>       command?: string[] | null,
>       workingDir?: string | null,
>       volumeMounts?: {
>         subPath?: string | null,
>         mountPath?: string | null,
>         name?: string | null
>       }[] | null,
>       name?: string | null,
>       env?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     }[] | null
>   } | null,
>   serviceAccount?: string | null,
>   deleteTime?: string | null,
>   encryptionKey?: string | null,
>   service?: string | null,
>   etag?: string | null,
>   vpcAccess?: {
>     networkInterfaces?: {
>       network?: string | null,
>       tags?: string[] | null,
>       subnetwork?: string | null
>     }[] | null,
>     egress?: string | null,
>     connector?: string | null
>   } | null,
>   encryptionKeyShutdownDuration?: string | null,
>   createTime?: string | null,
>   expireTime?: string | null,
>   updateTime?: string | null,
>   scalingStatus?: {
>     desiredMinInstanceCount?: number | null
>   } | null,
>   serviceMesh?: {
>     mesh?: string | null
>   } | null,
>   name?: string | null,
>   maxInstanceRequestConcurrency?: number | null,
>   labels?: Record<string, string> | null,
>   uid?: string | null,
>   logUri?: string | null,
>   sessionAffinity?: boolean | null,
>   conditions?: {
>     state?: string | null,
>     lastTransitionTime?: string | null,
>     severity?: string | null,
>     revisionReason?: string | null,
>     instanceReason?: string | null,
>     reason?: string | null,
>     type?: string | null,
>     executionReason?: string | null,
>     message?: string | null
>   }[] | null,
>   client?: string | null,
>   generation?: string | number | null,
>   launchStage?: string | null,
>   workloadIdentityConfig?: {
>     identityType?: string | null,
>     identity?: string | null,
>     identityCertificateEnabled?: boolean | null
>   } | null,
>   satisfiesPzs?: boolean | null,
>   volumes?: {
>     secret?: {
>       items?: {
>         version?: string | null,
>         mode?: number | null,
>         path?: string | null
>       }[] | null,
>       secret?: string | null,
>       defaultMode?: number | null
>     } | null,
>     cloudSqlInstance?: {
>       instances?: string[] | null
>     } | null,
>     name?: string | null,
>     nfs?: {
>       server?: string | null,
>       readOnly?: boolean | null,
>       path?: string | null
>     } | null,
>     emptyDir?: {
>       medium?: string | null,
>       sizeLimit?: string | null
>     } | null,
>     gcs?: {
>       readOnly?: boolean | null,
>       bucket?: string | null,
>       mountOptions?: string[] | null
>     } | null
>   }[] | null,
>   observedGeneration?: string | number | null,
>   creator?: string | null,
>   annotations?: Record<string, string> | null,
>   ambientNetworking?: {
>     ambientScope?: string | null,
>     enabled?: boolean | null
>   } | null,
>   reconciling?: boolean | null,
>   containers?: {
>     dependsOn?: string[] | null,
>     resources?: {
>       limits?: Record<string, string> | null,
>       cpuIdle?: boolean | null,
>       startupCpuBoost?: boolean | null
>     } | null,
>     buildInfo?: {
>       functionTarget?: string | null,
>       sourceLocation?: string | null
>     } | null,
>     command?: string[] | null,
>     readinessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     startupProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     args?: string[] | null,
>     buildConfig?: {
>       dockerBuild?: {
>       } | null,
>       serviceAccount?: string | null,
>       workerConfiguration?: {
>         cloudBuildWorkerConfiguration?: {
>           workerPool?: string | null,
>           machineType?: string | null
>         } | null
>       } | null,
>       buildpacksBuild?: {
>         environmentVariables?: Record<string, string> | null,
>         cacheImageUri?: string | null,
>         buildBaseImageUri?: string | null
>       } | null,
>       imageRepositoryUri?: string | null,
>       tags?: string[] | null,
>       environmentVariables?: {
>         name?: string | null,
>         value?: string | null,
>         valueSource?: {
>           secretKeyRef?: {
>             secret?: string | null,
>             version?: string | null
>           } | null
>         } | null
>       }[] | null
>     } | null,
>     ports?: {
>       name?: string | null,
>       containerPort?: number | null
>     }[] | null,
>     name?: string | null,
>     sourceCode?: {
>       inlinedSource?: {
>         sources?: {
>           filename?: string | null,
>           content?: string | null
>         }[] | null
>       } | null,
>       cloudStorageSource?: {
>         bucket?: string | null,
>         object?: string | null,
>         generation?: string | number | null
>       } | null
>     } | null,
>     image?: string | null,
>     workingDir?: string | null,
>     livenessProbe?: {
>       tcpSocket?: {
>         port?: number | null
>       } | null,
>       grpc?: {
>         port?: number | null,
>         service?: string | null
>       } | null,
>       failureThreshold?: number | null,
>       periodSeconds?: number | null,
>       initialDelaySeconds?: number | null,
>       timeoutSeconds?: number | null,
>       httpGet?: {
>         httpHeaders?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null,
>         port?: number | null,
>         path?: string | null
>       } | null
>     } | null,
>     env?: {
>       name?: string | null,
>       value?: string | null,
>       valueSource?: {
>         secretKeyRef?: {
>           secret?: string | null,
>           version?: string | null
>         } | null
>       } | null
>     }[] | null,
>     volumeMounts?: {
>       subPath?: string | null,
>       mountPath?: string | null,
>       name?: string | null
>     }[] | null,
>     sandboxLauncher?: boolean | null,
>     baseImageUri?: string | null
>   }[] | null,
>   gpuZonalRedundancyDisabled?: boolean | null
> }[] | null
> ```

***

### locations.workerPools.setIamPolicy

`run.locations.workerPools.setIamPolicy`

Sets the IAM Access control policy for the specified WorkerPool. Overwrites any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.setIamPolicy({
	resource: 'projects/demo-project/locations/us-central1/workerPools/private',
	policy: {
		bindings: [{
			role: 'roles/run.viewer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/workerPools/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   bindings?: {
>     members?: string[],
>     role?: string,
>     condition?: {
>       title?: string,
>       location?: string,
>       description?: string,
>       expression?: string
>     }
>   }[],
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[],
>     service?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   role?: string | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null,
>   service?: string | null
> }[] | null
> ```

***

### locations.workerPools.testIamPermissions

`run.locations.workerPools.testIamPermissions`

Returns permissions that a caller has on the specified Project. There are no permissions required for making this API call

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.run.locations.workerPools.testIamPermissions({
	resource: 'projects/demo-project/locations/us-central1/workerPools/private',
	permissions: ['run.workerpools.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/workerPools/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

## Scheduler

### locations.get

`scheduler.locations.get`

Gets information about a location

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.get({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Resource name for the location. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The friendly name for this location, typically a nearby city name. For example, "Tokyo". |
| `labels` | `Record<string, string> \| null` | No | Cross-service attributes for the location. For example \{"cloud.googleapis.com/region": "us-east1"} |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata. For example the available capacity at the given location. |
| `name` | `string \| null` | No | Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` |
| `locationId` | `string \| null` | No | The canonical id for this location. For example: `"us-east1"`. |

***

### locations.getCmekConfig

`scheduler.locations.getCmekConfig`

Gets the Scheduler config in the project/region

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.getCmekConfig({ name: 'projects/demo-project/locations/us-central1/cmekConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The config name. For example: projects/PROJECT\_ID/locations/LOCATION\_ID/cmekConfig Format: `projects/<id>/locations/<id>/cmekConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The config resource name which includes the project and location and must end in 'cmekConfig', in the format projects/PROJECT\_ID/locations/LOCATION\_ID/cmekConfig\` |
| `kmsKeyName` | `string \| null` | No | Optional. Resource name of the Cloud KMS key, of the form `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID`, that will be used to encrypt Jobs in the region. Setting this as blank will turn off CMEK encryption. |

***

### locations.jobs.create

`scheduler.locations.jobs.create`

Creates a job

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.jobs.create({
	parent: 'projects/demo-project/locations/us-central1',
	name: 'projects/demo-project/locations/us-central1/jobs/nightly-report',
	schedule: '0 3 * * *',
	timeZone: 'Etc/UTC',
	httpTarget: { uri: 'https://example.com/report', httpMethod: 'POST' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID`. Format: `projects/<id>/locations/<id>`. |
| `name` | `string` | No | Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects \* `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. \* `JOB_ID` can contain only letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), or underscores (\_). |
| `pubsubTarget` | `object` | No | Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic. |
| `httpTarget` | `object` | No | Http target. The job will be pushed to the job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. A failure to receive a response constitutes a failed execution. For a redirected request, the response returned by the redirected request is considered. |
| `schedule` | `string` | No | Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: \* [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) \* English-like schedule As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. |
| `attemptDeadline` | `string` | No | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The default and the allowed values depend on the type of target: \* For HTTP targets, the default is 3 minutes. |
| `retryConfig` | `object` | No | Settings that determine the retry behavior. For more information, see Retry jobs. By default, if a job does not complete successfully (meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings in RetryConfig. |
| `appEngineHttpTarget` | `object` | No | App Engine target. The job will be pushed to a job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. Error 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code, or a failure to receive a response before the deadline, constitutes a failed attempt. |
| `timeZone` | `string` | No | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT). |
| `description` | `string` | No | Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters. |

> [accordion] pubsubTarget full type
>
> ```ts theme={null}
> {
>   topicName?: string,
>   data?: string,
>   attributes?: Record<string, string>
> }
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   oauthToken?: {
>     scope?: string,
>     serviceAccountEmail?: string
>   },
>   uri?: string,
>   oidcToken?: {
>     audience?: string,
>     serviceAccountEmail?: string
>   },
>   body?: string,
>   httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>   headers?: Record<string, string>
> }
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxBackoffDuration?: string,
>   maxDoublings?: number,
>   maxRetryDuration?: string,
>   retryCount?: number,
>   minBackoffDuration?: string
> }
> ```

> [accordion] appEngineHttpTarget full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string>,
>   httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>   body?: string,
>   appEngineRouting?: {
>     service?: string,
>     instance?: string,
>     host?: string,
>     version?: string
>   },
>   relativeUri?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Output only. State of the job. |
| `name` | `string \| null` | No | Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects \* `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. \* `JOB_ID` can contain only letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), or underscores (\_). |
| `pubsubTarget` | `object \| null` | No | Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Whether or not this Job satisfies the requirements of physical zone separation |
| `scheduleTime` | `string \| null` | No | Output only. The next time the job is scheduled. Note that this may be a retry of a previously failed attempt or the next execution time according to the schedule. |
| `lastAttemptTime` | `string \| null` | No | Output only. The time the last job attempt started. |
| `httpTarget` | `object \| null` | No | Http target. The job will be pushed to the job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. A failure to receive a response constitutes a failed execution. For a redirected request, the response returned by the redirected request is considered. |
| `userUpdateTime` | `string \| null` | No | Output only. The creation time of the job. |
| `schedule` | `string \| null` | No | Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: \* [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) \* English-like schedule As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. |
| `attemptDeadline` | `string \| null` | No | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The default and the allowed values depend on the type of target: \* For HTTP targets, the default is 3 minutes. |
| `retryConfig` | `object \| null` | No | Settings that determine the retry behavior. For more information, see Retry jobs. By default, if a job does not complete successfully (meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings in RetryConfig. |
| `status` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `appEngineHttpTarget` | `object \| null` | No | App Engine target. The job will be pushed to a job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. Error 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code, or a failure to receive a response before the deadline, constitutes a failed attempt. |
| `timeZone` | `string \| null` | No | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT). |
| `description` | `string \| null` | No | Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters. |

> [accordion] pubsubTarget full type
>
> ```ts theme={null}
> {
>   topicName?: string | null,
>   data?: string | null,
>   attributes?: Record<string, string> | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   oauthToken?: {
>     scope?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   uri?: string | null,
>   oidcToken?: {
>     audience?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   body?: string | null,
>   httpMethod?: string | null,
>   headers?: Record<string, string> | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxBackoffDuration?: string | null,
>   maxDoublings?: number | null,
>   maxRetryDuration?: string | null,
>   retryCount?: number | null,
>   minBackoffDuration?: string | null
> } | null
> ```

> [accordion] status full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

> [accordion] appEngineHttpTarget full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string> | null,
>   httpMethod?: string | null,
>   body?: string | null,
>   appEngineRouting?: {
>     service?: string | null,
>     instance?: string | null,
>     host?: string | null,
>     version?: string | null
>   } | null,
>   relativeUri?: string | null
> } | null
> ```

***

### locations.jobs.delete

`scheduler.locations.jobs.delete`

Deletes a job

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.jobs.delete({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. Format: `projects/<id>/locations/<id>/jobs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.jobs.get

`scheduler.locations.jobs.get`

Gets a job

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.jobs.get({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. Format: `projects/<id>/locations/<id>/jobs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Output only. State of the job. |
| `name` | `string \| null` | No | Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects \* `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. \* `JOB_ID` can contain only letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), or underscores (\_). |
| `pubsubTarget` | `object \| null` | No | Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Whether or not this Job satisfies the requirements of physical zone separation |
| `scheduleTime` | `string \| null` | No | Output only. The next time the job is scheduled. Note that this may be a retry of a previously failed attempt or the next execution time according to the schedule. |
| `lastAttemptTime` | `string \| null` | No | Output only. The time the last job attempt started. |
| `httpTarget` | `object \| null` | No | Http target. The job will be pushed to the job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. A failure to receive a response constitutes a failed execution. For a redirected request, the response returned by the redirected request is considered. |
| `userUpdateTime` | `string \| null` | No | Output only. The creation time of the job. |
| `schedule` | `string \| null` | No | Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: \* [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) \* English-like schedule As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. |
| `attemptDeadline` | `string \| null` | No | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The default and the allowed values depend on the type of target: \* For HTTP targets, the default is 3 minutes. |
| `retryConfig` | `object \| null` | No | Settings that determine the retry behavior. For more information, see Retry jobs. By default, if a job does not complete successfully (meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings in RetryConfig. |
| `status` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `appEngineHttpTarget` | `object \| null` | No | App Engine target. The job will be pushed to a job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. Error 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code, or a failure to receive a response before the deadline, constitutes a failed attempt. |
| `timeZone` | `string \| null` | No | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT). |
| `description` | `string \| null` | No | Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters. |

> [accordion] pubsubTarget full type
>
> ```ts theme={null}
> {
>   topicName?: string | null,
>   data?: string | null,
>   attributes?: Record<string, string> | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   oauthToken?: {
>     scope?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   uri?: string | null,
>   oidcToken?: {
>     audience?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   body?: string | null,
>   httpMethod?: string | null,
>   headers?: Record<string, string> | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxBackoffDuration?: string | null,
>   maxDoublings?: number | null,
>   maxRetryDuration?: string | null,
>   retryCount?: number | null,
>   minBackoffDuration?: string | null
> } | null
> ```

> [accordion] status full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

> [accordion] appEngineHttpTarget full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string> | null,
>   httpMethod?: string | null,
>   body?: string | null,
>   appEngineRouting?: {
>     service?: string | null,
>     instance?: string | null,
>     host?: string | null,
>     version?: string | null
>   } | null,
>   relativeUri?: string | null
> } | null
> ```

***

### locations.jobs.list

`scheduler.locations.jobs.list`

Lists jobs (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.jobs.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID`. Format: `projects/<id>/locations/<id>`. |
| `pageToken` | `string` | No | A token identifying a page of results the server will return. To request the first page results, page\_token must be empty. To request the next page of results, page\_token must be the value of next\_page\_token returned from the previous call to ListJobs. |
| `pageSize` | `number` | No | Requested page size. The maximum page size is 500. If unspecified, the page size will be the maximum. Fewer jobs than requested might be returned, even if more jobs exist; use next\_page\_token to determine if more jobs exist. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token to retrieve next page of results. Pass this value in the page\_token field in the subsequent call to ListJobs to retrieve the next page of results. If this is empty it indicates that there are no more results through which to paginate. The page token is valid for only 2 hours. |
| `jobs` | `object[] \| null` | No | The list of jobs. |

> [accordion] jobs full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   name?: string | null,
>   pubsubTarget?: {
>     topicName?: string | null,
>     data?: string | null,
>     attributes?: Record<string, string> | null
>   } | null,
>   satisfiesPzs?: boolean | null,
>   scheduleTime?: string | null,
>   lastAttemptTime?: string | null,
>   httpTarget?: {
>     oauthToken?: {
>       scope?: string | null,
>       serviceAccountEmail?: string | null
>     } | null,
>     uri?: string | null,
>     oidcToken?: {
>       audience?: string | null,
>       serviceAccountEmail?: string | null
>     } | null,
>     body?: string | null,
>     httpMethod?: string | null,
>     headers?: Record<string, string> | null
>   } | null,
>   userUpdateTime?: string | null,
>   schedule?: string | null,
>   attemptDeadline?: string | null,
>   retryConfig?: {
>     maxBackoffDuration?: string | null,
>     maxDoublings?: number | null,
>     maxRetryDuration?: string | null,
>     retryCount?: number | null,
>     minBackoffDuration?: string | null
>   } | null,
>   status?: {
>     message?: string | null,
>     code?: number | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   appEngineHttpTarget?: {
>     headers?: Record<string, string> | null,
>     httpMethod?: string | null,
>     body?: string | null,
>     appEngineRouting?: {
>       service?: string | null,
>       instance?: string | null,
>       host?: string | null,
>       version?: string | null
>     } | null,
>     relativeUri?: string | null
>   } | null,
>   timeZone?: string | null,
>   description?: string | null
> }[] | null
> ```

***

### locations.jobs.patch

`scheduler.locations.jobs.patch`

Updates a job. If successful, the updated Job is returned

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.jobs.patch({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report', updateMask: 'schedule', schedule: '0 4 * * *' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects \* `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. \* `JOB_ID` can contain only letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), or underscores (\_). Format: `projects/<id>/locations/<id>/jobs/<id>`. |
| `updateMask` | `string` | No | A mask used to specify which fields of the job are being updated. |
| `body_name` | `string` | No | Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects \* `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. \* `JOB_ID` can contain only letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), or underscores (\_). |
| `pubsubTarget` | `object` | No | Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic. |
| `httpTarget` | `object` | No | Http target. The job will be pushed to the job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. A failure to receive a response constitutes a failed execution. For a redirected request, the response returned by the redirected request is considered. |
| `schedule` | `string` | No | Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: \* [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) \* English-like schedule As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. |
| `attemptDeadline` | `string` | No | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The default and the allowed values depend on the type of target: \* For HTTP targets, the default is 3 minutes. |
| `retryConfig` | `object` | No | Settings that determine the retry behavior. For more information, see Retry jobs. By default, if a job does not complete successfully (meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings in RetryConfig. |
| `appEngineHttpTarget` | `object` | No | App Engine target. The job will be pushed to a job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. Error 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code, or a failure to receive a response before the deadline, constitutes a failed attempt. |
| `timeZone` | `string` | No | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT). |
| `description` | `string` | No | Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters. |

> [accordion] pubsubTarget full type
>
> ```ts theme={null}
> {
>   topicName?: string,
>   data?: string,
>   attributes?: Record<string, string>
> }
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   oauthToken?: {
>     scope?: string,
>     serviceAccountEmail?: string
>   },
>   uri?: string,
>   oidcToken?: {
>     audience?: string,
>     serviceAccountEmail?: string
>   },
>   body?: string,
>   httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>   headers?: Record<string, string>
> }
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxBackoffDuration?: string,
>   maxDoublings?: number,
>   maxRetryDuration?: string,
>   retryCount?: number,
>   minBackoffDuration?: string
> }
> ```

> [accordion] appEngineHttpTarget full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string>,
>   httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>   body?: string,
>   appEngineRouting?: {
>     service?: string,
>     instance?: string,
>     host?: string,
>     version?: string
>   },
>   relativeUri?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Output only. State of the job. |
| `name` | `string \| null` | No | Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects \* `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. \* `JOB_ID` can contain only letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), or underscores (\_). |
| `pubsubTarget` | `object \| null` | No | Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Whether or not this Job satisfies the requirements of physical zone separation |
| `scheduleTime` | `string \| null` | No | Output only. The next time the job is scheduled. Note that this may be a retry of a previously failed attempt or the next execution time according to the schedule. |
| `lastAttemptTime` | `string \| null` | No | Output only. The time the last job attempt started. |
| `httpTarget` | `object \| null` | No | Http target. The job will be pushed to the job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. A failure to receive a response constitutes a failed execution. For a redirected request, the response returned by the redirected request is considered. |
| `userUpdateTime` | `string \| null` | No | Output only. The creation time of the job. |
| `schedule` | `string \| null` | No | Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: \* [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) \* English-like schedule As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. |
| `attemptDeadline` | `string \| null` | No | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The default and the allowed values depend on the type of target: \* For HTTP targets, the default is 3 minutes. |
| `retryConfig` | `object \| null` | No | Settings that determine the retry behavior. For more information, see Retry jobs. By default, if a job does not complete successfully (meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings in RetryConfig. |
| `status` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `appEngineHttpTarget` | `object \| null` | No | App Engine target. The job will be pushed to a job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. Error 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code, or a failure to receive a response before the deadline, constitutes a failed attempt. |
| `timeZone` | `string \| null` | No | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT). |
| `description` | `string \| null` | No | Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters. |

> [accordion] pubsubTarget full type
>
> ```ts theme={null}
> {
>   topicName?: string | null,
>   data?: string | null,
>   attributes?: Record<string, string> | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   oauthToken?: {
>     scope?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   uri?: string | null,
>   oidcToken?: {
>     audience?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   body?: string | null,
>   httpMethod?: string | null,
>   headers?: Record<string, string> | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxBackoffDuration?: string | null,
>   maxDoublings?: number | null,
>   maxRetryDuration?: string | null,
>   retryCount?: number | null,
>   minBackoffDuration?: string | null
> } | null
> ```

> [accordion] status full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

> [accordion] appEngineHttpTarget full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string> | null,
>   httpMethod?: string | null,
>   body?: string | null,
>   appEngineRouting?: {
>     service?: string | null,
>     instance?: string | null,
>     host?: string | null,
>     version?: string | null
>   } | null,
>   relativeUri?: string | null
> } | null
> ```

***

### locations.jobs.pause

`scheduler.locations.jobs.pause`

Pauses a job. If a job is paused then the system will stop executing the job until it is re-enabled via ResumeJob

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.jobs.pause({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. Format: `projects/<id>/locations/<id>/jobs/<id>`. |
| `body` | `object` | No | Request message for PauseJob. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Output only. State of the job. |
| `name` | `string \| null` | No | Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects \* `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. \* `JOB_ID` can contain only letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), or underscores (\_). |
| `pubsubTarget` | `object \| null` | No | Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Whether or not this Job satisfies the requirements of physical zone separation |
| `scheduleTime` | `string \| null` | No | Output only. The next time the job is scheduled. Note that this may be a retry of a previously failed attempt or the next execution time according to the schedule. |
| `lastAttemptTime` | `string \| null` | No | Output only. The time the last job attempt started. |
| `httpTarget` | `object \| null` | No | Http target. The job will be pushed to the job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. A failure to receive a response constitutes a failed execution. For a redirected request, the response returned by the redirected request is considered. |
| `userUpdateTime` | `string \| null` | No | Output only. The creation time of the job. |
| `schedule` | `string \| null` | No | Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: \* [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) \* English-like schedule As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. |
| `attemptDeadline` | `string \| null` | No | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The default and the allowed values depend on the type of target: \* For HTTP targets, the default is 3 minutes. |
| `retryConfig` | `object \| null` | No | Settings that determine the retry behavior. For more information, see Retry jobs. By default, if a job does not complete successfully (meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings in RetryConfig. |
| `status` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `appEngineHttpTarget` | `object \| null` | No | App Engine target. The job will be pushed to a job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. Error 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code, or a failure to receive a response before the deadline, constitutes a failed attempt. |
| `timeZone` | `string \| null` | No | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT). |
| `description` | `string \| null` | No | Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters. |

> [accordion] pubsubTarget full type
>
> ```ts theme={null}
> {
>   topicName?: string | null,
>   data?: string | null,
>   attributes?: Record<string, string> | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   oauthToken?: {
>     scope?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   uri?: string | null,
>   oidcToken?: {
>     audience?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   body?: string | null,
>   httpMethod?: string | null,
>   headers?: Record<string, string> | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxBackoffDuration?: string | null,
>   maxDoublings?: number | null,
>   maxRetryDuration?: string | null,
>   retryCount?: number | null,
>   minBackoffDuration?: string | null
> } | null
> ```

> [accordion] status full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

> [accordion] appEngineHttpTarget full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string> | null,
>   httpMethod?: string | null,
>   body?: string | null,
>   appEngineRouting?: {
>     service?: string | null,
>     instance?: string | null,
>     host?: string | null,
>     version?: string | null
>   } | null,
>   relativeUri?: string | null
> } | null
> ```

***

### locations.jobs.resume

`scheduler.locations.jobs.resume`

Resume a job. This method reenables a job after it has been Job.State.PAUSED

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.jobs.resume({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. Format: `projects/<id>/locations/<id>/jobs/<id>`. |
| `body` | `object` | No | Request message for ResumeJob. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Output only. State of the job. |
| `name` | `string \| null` | No | Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects \* `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. \* `JOB_ID` can contain only letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), or underscores (\_). |
| `pubsubTarget` | `object \| null` | No | Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Whether or not this Job satisfies the requirements of physical zone separation |
| `scheduleTime` | `string \| null` | No | Output only. The next time the job is scheduled. Note that this may be a retry of a previously failed attempt or the next execution time according to the schedule. |
| `lastAttemptTime` | `string \| null` | No | Output only. The time the last job attempt started. |
| `httpTarget` | `object \| null` | No | Http target. The job will be pushed to the job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. A failure to receive a response constitutes a failed execution. For a redirected request, the response returned by the redirected request is considered. |
| `userUpdateTime` | `string \| null` | No | Output only. The creation time of the job. |
| `schedule` | `string \| null` | No | Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: \* [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) \* English-like schedule As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. |
| `attemptDeadline` | `string \| null` | No | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The default and the allowed values depend on the type of target: \* For HTTP targets, the default is 3 minutes. |
| `retryConfig` | `object \| null` | No | Settings that determine the retry behavior. For more information, see Retry jobs. By default, if a job does not complete successfully (meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings in RetryConfig. |
| `status` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `appEngineHttpTarget` | `object \| null` | No | App Engine target. The job will be pushed to a job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. Error 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code, or a failure to receive a response before the deadline, constitutes a failed attempt. |
| `timeZone` | `string \| null` | No | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT). |
| `description` | `string \| null` | No | Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters. |

> [accordion] pubsubTarget full type
>
> ```ts theme={null}
> {
>   topicName?: string | null,
>   data?: string | null,
>   attributes?: Record<string, string> | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   oauthToken?: {
>     scope?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   uri?: string | null,
>   oidcToken?: {
>     audience?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   body?: string | null,
>   httpMethod?: string | null,
>   headers?: Record<string, string> | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxBackoffDuration?: string | null,
>   maxDoublings?: number | null,
>   maxRetryDuration?: string | null,
>   retryCount?: number | null,
>   minBackoffDuration?: string | null
> } | null
> ```

> [accordion] status full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

> [accordion] appEngineHttpTarget full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string> | null,
>   httpMethod?: string | null,
>   body?: string | null,
>   appEngineRouting?: {
>     service?: string | null,
>     instance?: string | null,
>     host?: string | null,
>     version?: string | null
>   } | null,
>   relativeUri?: string | null
> } | null
> ```

***

### locations.jobs.run

`scheduler.locations.jobs.run`

Forces a job to run now. When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.jobs.run({ name: 'projects/demo-project/locations/us-central1/jobs/nightly-report' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. Format: `projects/<id>/locations/<id>/jobs/<id>`. |
| `body` | `object` | No | Request message for forcing a job to run now using RunJob. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Output only. State of the job. |
| `name` | `string \| null` | No | Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects \* `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. \* `JOB_ID` can contain only letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), or underscores (\_). |
| `pubsubTarget` | `object \| null` | No | Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. Whether or not this Job satisfies the requirements of physical zone separation |
| `scheduleTime` | `string \| null` | No | Output only. The next time the job is scheduled. Note that this may be a retry of a previously failed attempt or the next execution time according to the schedule. |
| `lastAttemptTime` | `string \| null` | No | Output only. The time the last job attempt started. |
| `httpTarget` | `object \| null` | No | Http target. The job will be pushed to the job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. A failure to receive a response constitutes a failed execution. For a redirected request, the response returned by the redirected request is considered. |
| `userUpdateTime` | `string \| null` | No | Output only. The creation time of the job. |
| `schedule` | `string \| null` | No | Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: \* [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) \* English-like schedule As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. |
| `attemptDeadline` | `string \| null` | No | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The default and the allowed values depend on the type of target: \* For HTTP targets, the default is 3 minutes. |
| `retryConfig` | `object \| null` | No | Settings that determine the retry behavior. For more information, see Retry jobs. By default, if a job does not complete successfully (meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings in RetryConfig. |
| `status` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `appEngineHttpTarget` | `object \| null` | No | App Engine target. The job will be pushed to a job handler by means of an HTTP request via an http\_method such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range \[200 - 299]. Error 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code, or a failure to receive a response before the deadline, constitutes a failed attempt. |
| `timeZone` | `string \| null` | No | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT). |
| `description` | `string \| null` | No | Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters. |

> [accordion] pubsubTarget full type
>
> ```ts theme={null}
> {
>   topicName?: string | null,
>   data?: string | null,
>   attributes?: Record<string, string> | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   oauthToken?: {
>     scope?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   uri?: string | null,
>   oidcToken?: {
>     audience?: string | null,
>     serviceAccountEmail?: string | null
>   } | null,
>   body?: string | null,
>   httpMethod?: string | null,
>   headers?: Record<string, string> | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxBackoffDuration?: string | null,
>   maxDoublings?: number | null,
>   maxRetryDuration?: string | null,
>   retryCount?: number | null,
>   minBackoffDuration?: string | null
> } | null
> ```

> [accordion] status full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

> [accordion] appEngineHttpTarget full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string> | null,
>   httpMethod?: string | null,
>   body?: string | null,
>   appEngineRouting?: {
>     service?: string | null,
>     instance?: string | null,
>     host?: string | null,
>     version?: string | null
>   } | null,
>   relativeUri?: string | null
> } | null
> ```

***

### locations.list

`scheduler.locations.list`

Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: \* **Global locations**: If `name` is empty, the method lists the public locations available to all projects. \* **Project-specific locations**: If `name` follows the format `projects/{project}`, the method lists locations... (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource that owns the locations collection, if applicable. Format: `projects/<id>`. |
| `pageSize` | `number` | No | The maximum number of results to return. If not set, the service selects a default. |
| `pageToken` | `string` | No | A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. |
| `filter` | `string` | No | A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). |
| `extraLocationTypes` | `string[]` | No | Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locations` | `object[] \| null` | No | A list of locations that matches the specified filter in the request. |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |

> [accordion] locations full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   labels?: Record<string, string> | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   locationId?: string | null
> }[] | null
> ```

***

### locations.operations.cancel

`scheduler.locations.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.operations.cancel({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be cancelled. Format: `projects/<id>/locations/<id>/operations/<id>`. |
| `body` | `object` | No | The request message for Operations.CancelOperation. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.operations.delete

`scheduler.locations.operations.delete`

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.operations.delete({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be deleted. Format: `projects/<id>/locations/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.operations.get

`scheduler.locations.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.operations.get({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.operations.list

`scheduler.locations.operations.list`

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.operations.list({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation's parent resource. Format: `projects/<id>/locations/<id>`. |
| `pageToken` | `string` | No | The standard list page token. |
| `filter` | `string` | No | The standard list filter. |
| `pageSize` | `number` | No | The standard list page size. |
| `returnPartialSuccess` | `boolean` | No | When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |
| `unreachable` | `string[] \| null` | No | Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   done?: boolean | null,
>   name?: string | null,
>   error?: {
>     message?: string | null,
>     code?: number | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   metadata?: Record<string, any> | null,
>   response?: Record<string, any> | null
> }[] | null
> ```

***

### locations.updateCmekConfig

`scheduler.locations.updateCmekConfig`

Initializes or Updates the a scheduler config

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.scheduler.locations.updateCmekConfig({ name: 'projects/demo-project/locations/us-central1/cmekConfig', updateMask: 'kmsKeyName', kmsKeyName: 'projects/demo-project/locations/us-central1/keyRings/app/cryptoKeys/data' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The config resource name which includes the project and location and must end in 'cmekConfig', in the format projects/PROJECT\_ID/locations/LOCATION\_ID/cmekConfig`Format:`projects/\<id>/locations/\<id>/cmekConfig\`. |
| `updateMask` | `string` | No | Optional. List of fields to be updated in this request. |
| `body_name` | `string` | No | Identifier. The config resource name which includes the project and location and must end in 'cmekConfig', in the format projects/PROJECT\_ID/locations/LOCATION\_ID/cmekConfig\` |
| `kmsKeyName` | `string` | No | Optional. Resource name of the Cloud KMS key, of the form `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID`, that will be used to encrypt Jobs in the region. Setting this as blank will turn off CMEK encryption. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

## Secret Manager

### locations.get

`secretManager.locations.get`

Gets information about a location

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.get({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Resource name for the location. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `labels` | `Record<string, string> \| null` | No | Cross-service attributes for the location. For example \{"cloud.googleapis.com/region": "us-east1"} |
| `name` | `string \| null` | No | Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` |
| `displayName` | `string \| null` | No | The friendly name for this location, typically a nearby city name. For example, "Tokyo". |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata. For example the available capacity at the given location. |
| `locationId` | `string \| null` | No | The canonical id for this location. For example: `"us-east1"`. |

***

### locations.list

`secretManager.locations.list`

Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: \* **Global locations**: If `name` is empty, the method lists the public locations available to all projects. \* **Project-specific locations**: If `name` follows the format `projects/{project}`, the method lists locations... (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of results to return. If not set, the service selects a default. |
| `filter` | `string` | No | A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). |
| `pageToken` | `string` | No | A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. |
| `extraLocationTypes` | `string[]` | No | Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage. |
| `name` | `string` | Yes | The resource that owns the locations collection, if applicable. Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `locations` | `object[] \| null` | No | A list of locations that matches the specified filter in the request. |

> [accordion] locations full type
>
> ```ts theme={null}
> {
>   labels?: Record<string, string> | null,
>   name?: string | null,
>   displayName?: string | null,
>   metadata?: Record<string, any> | null,
>   locationId?: string | null
> }[] | null
> ```

***

### locations.secrets.addVersion

`secretManager.locations.secrets.addVersion`

Creates a new SecretVersion containing secret data and attaches it to an existing Secret

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.addVersion({
	parent: 'projects/demo-project/locations/us-central1/secrets/stripe-key',
	payload: { data: 'c2tfdGVzdF8xMjM=' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/locations/<id>/secrets/<id>`. |
| `payload` | `object` | No | A secret payload resource in the Secret Manager API. This contains the sensitive secret payload that is associated with a SecretVersion. |

> [accordion] payload full type
>
> ```ts theme={null}
> {
>   dataCrc32c?: string | number,
>   data?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### locations.secrets.create

`secretManager.locations.secrets.create`

Creates a new Secret containing no SecretVersions

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.create({
	parent: 'projects/demo-project/locations/us-central1',
	secretId: 'stripe-key',
	labels: { env: 'prod' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `secretId` | `string` | No | Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `parent` | `string` | Yes | Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`. Format: `projects/<id>/locations/<id>`. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number>` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `topics` | `object[]` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `SECRET_TYPE_UNSPECIFIED \| CLOUD_SQL_DB_CREDENTIALS \| ACCESS_KEY \| CERTIFICATE \| OTHER_DB_CREDENTIALS \| OTHER` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string>` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `customerManagedEncryption` | `object` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string>` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string
> }[]
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string,
>   nextRotationTime?: string
> }
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string
> }
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string,
>       customerManagedEncryption?: {
>         kmsKeyName?: string
>       }
>     }[]
>   },
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string
>     }
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number> \| null` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `policyMember` | `object \| null` | No | Output-only policy member strings of a Google Cloud resource's built-in identity. |
| `topics` | `object[] \| null` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string \| null` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string \| null` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object \| null` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `string \| null` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `name` | `string \| null` | No | Output only. The resource name of the Secret in the format `projects/*/secrets/*`. |
| `customerManagedEncryption` | `object \| null` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object \| null` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string \| null` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string \| null` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string> \| null` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |
| `createTime` | `string \| null` | No | Output only. The time at which the Secret was created. |

> [accordion] policyMember full type
>
> ```ts theme={null}
> {
>   iamPolicyNamePrincipal?: string | null,
>   iamPolicyUidPrincipal?: string | null
> } | null
> ```

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string | null,
>   managedRotationStatus?: {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null,
>   nextRotationTime?: string | null
> } | null
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string | null
> } | null
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyName?: string | null
>       } | null
>     }[] | null
>   } | null,
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string | null
>     } | null
>   } | null
> } | null
> ```

***

### locations.secrets.delete

`secretManager.locations.secrets.delete`

Deletes a Secret

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.delete({ name: 'projects/demo-project/locations/us-central1/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`. Format: `projects/<id>/locations/<id>/secrets/<id>`. |
| `etag` | `string` | No | Optional. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.secrets.enableManagedRotation

`secretManager.locations.secrets.enableManagedRotation`

Enables the managed rotation feature for a Secret. This method can only be triggered once for a secret

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.enableManagedRotation({
	parent: 'projects/demo-project/locations/us-central1/secrets/stripe-key',
	cloudSqlSingleUserCredentials: { instanceId: 'app-db', username: 'app' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/locations/<id>/secrets/<id>`. |
| `cloudSqlSingleUserCredentials` | `object` | No | These are the credentials required for Cloud SQL DB for Single user Managed Rotation. |

> [accordion] cloudSqlSingleUserCredentials full type
>
> ```ts theme={null}
> {
>   password?: string,
>   instanceId?: string,
>   username?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### locations.secrets.get

`secretManager.locations.secrets.get`

Gets metadata for a given Secret

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.get({ name: 'projects/demo-project/locations/us-central1/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/locations/<id>/secrets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number> \| null` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `policyMember` | `object \| null` | No | Output-only policy member strings of a Google Cloud resource's built-in identity. |
| `topics` | `object[] \| null` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string \| null` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string \| null` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object \| null` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `string \| null` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `name` | `string \| null` | No | Output only. The resource name of the Secret in the format `projects/*/secrets/*`. |
| `customerManagedEncryption` | `object \| null` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object \| null` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string \| null` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string \| null` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string> \| null` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |
| `createTime` | `string \| null` | No | Output only. The time at which the Secret was created. |

> [accordion] policyMember full type
>
> ```ts theme={null}
> {
>   iamPolicyNamePrincipal?: string | null,
>   iamPolicyUidPrincipal?: string | null
> } | null
> ```

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string | null,
>   managedRotationStatus?: {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null,
>   nextRotationTime?: string | null
> } | null
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string | null
> } | null
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyName?: string | null
>       } | null
>     }[] | null
>   } | null,
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string | null
>     } | null
>   } | null
> } | null
> ```

***

### locations.secrets.getIamPolicy

`secretManager.locations.secrets.getIamPolicy`

Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.getIamPolicy({ resource: 'projects/demo-project/locations/us-central1/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/secrets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null,
>   role?: string | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null
> }[] | null
> ```

***

### locations.secrets.list

`secretManager.locations.secrets.list`

Lists Secrets (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000. |
| `filter` | `string` | No | Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed. |
| `parent` | `string` | Yes | Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*` Format: `projects/<id>/locations/<id>`. |
| `pageToken` | `string` | No | Optional. Pagination token, returned earlier via ListSecretsResponse.next\_page\_token. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `totalSize` | `number \| null` | No | The total number of Secrets but 0 when the ListSecretsRequest.filter field is set. |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. Pass this value in ListSecretsRequest.page\_token to retrieve the next page. |
| `secrets` | `object[] \| null` | No | The list of Secrets sorted in reverse by create\_time (newest first). |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   tags?: Record<string, string> | null,
>   versionAliases?: Record<string, string | number> | null,
>   policyMember?: {
>     iamPolicyNamePrincipal?: string | null,
>     iamPolicyUidPrincipal?: string | null
>   } | null,
>   topics?: {
>     name?: string | null
>   }[] | null,
>   etag?: string | null,
>   expireTime?: string | null,
>   rotation?: {
>     rotationPeriod?: string | null,
>     managedRotationStatus?: {
>       state?: string | null,
>       error?: {
>         code?: number | null,
>         message?: string | null,
>         details?: Record<string, any>[] | null
>       } | null
>     } | null,
>     nextRotationTime?: string | null
>   } | null,
>   secretType?: string | null,
>   annotations?: Record<string, string> | null,
>   name?: string | null,
>   customerManagedEncryption?: {
>     kmsKeyName?: string | null
>   } | null,
>   replication?: {
>     userManaged?: {
>       replicas?: {
>         location?: string | null,
>         customerManagedEncryption?: {
>           kmsKeyName?: string | null
>         } | null
>       }[] | null
>     } | null,
>     automatic?: {
>       customerManagedEncryption?: {
>         kmsKeyName?: string | null
>       } | null
>     } | null
>   } | null,
>   versionDestroyTtl?: string | null,
>   ttl?: string | null,
>   labels?: Record<string, string> | null,
>   createTime?: string | null
> }[] | null
> ```

***

### locations.secrets.patch

`secretManager.locations.secrets.patch`

Updates metadata of an existing Secret

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.patch({
	name: 'projects/demo-project/locations/us-central1/secrets/stripe-key',
	labels: { env: 'prod' },
	updateMask: 'labels',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Output only. The resource name of the Secret in the format `projects/*/secrets/*`. Format: `projects/<id>/locations/<id>/secrets/<id>`. |
| `updateMask` | `string` | No | Required. Specifies the fields to be updated. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number>` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `topics` | `object[]` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `SECRET_TYPE_UNSPECIFIED \| CLOUD_SQL_DB_CREDENTIALS \| ACCESS_KEY \| CERTIFICATE \| OTHER_DB_CREDENTIALS \| OTHER` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string>` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `customerManagedEncryption` | `object` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string>` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string
> }[]
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string,
>   nextRotationTime?: string
> }
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string
> }
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string,
>       customerManagedEncryption?: {
>         kmsKeyName?: string
>       }
>     }[]
>   },
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string
>     }
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number> \| null` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `policyMember` | `object \| null` | No | Output-only policy member strings of a Google Cloud resource's built-in identity. |
| `topics` | `object[] \| null` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string \| null` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string \| null` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object \| null` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `string \| null` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `name` | `string \| null` | No | Output only. The resource name of the Secret in the format `projects/*/secrets/*`. |
| `customerManagedEncryption` | `object \| null` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object \| null` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string \| null` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string \| null` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string> \| null` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |
| `createTime` | `string \| null` | No | Output only. The time at which the Secret was created. |

> [accordion] policyMember full type
>
> ```ts theme={null}
> {
>   iamPolicyNamePrincipal?: string | null,
>   iamPolicyUidPrincipal?: string | null
> } | null
> ```

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string | null,
>   managedRotationStatus?: {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null,
>   nextRotationTime?: string | null
> } | null
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string | null
> } | null
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyName?: string | null
>       } | null
>     }[] | null
>   } | null,
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string | null
>     } | null
>   } | null
> } | null
> ```

***

### locations.secrets.rotateSecret

`secretManager.locations.secrets.rotateSecret`

Do a managed rotation for a Secret. This can only be triggered after Managed rotation has been enabled

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.rotateSecret({ parent: 'projects/demo-project/locations/us-central1/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/locations/<id>/secrets/<id>`. |
| `body` | `object` | No | Request message for SecretManagerService.RotateSecret. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### locations.secrets.setIamPolicy

`secretManager.locations.secrets.setIamPolicy`

Sets the access control policy on the specified secret. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.setIamPolicy({
	resource: 'projects/demo-project/locations/us-central1/secrets/stripe-key',
	policy: {
		bindings: [{
			role: 'roles/secretmanager.secretAccessor',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/secrets/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   bindings?: {
>     members?: string[],
>     condition?: {
>       title?: string,
>       location?: string,
>       description?: string,
>       expression?: string
>     },
>     role?: string
>   }[],
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null,
>   role?: string | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null
> }[] | null
> ```

***

### locations.secrets.testIamPermissions

`secretManager.locations.secrets.testIamPermissions`

Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT\_FOUND error

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.testIamPermissions({
	resource: 'projects/demo-project/locations/us-central1/secrets/stripe-key',
	permissions: ['secretmanager.secrets.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/secrets/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### locations.secrets.versions.access

`secretManager.locations.secrets.versions.access`

Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.versions.access({ name: 'projects/demo-project/locations/us-central1/secrets/stripe-key/versions/latest' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. Format: `projects/<id>/locations/<id>/secrets/<id>/versions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `payload` | `object \| null` | No | A secret payload resource in the Secret Manager API. This contains the sensitive secret payload that is associated with a SecretVersion. |
| `name` | `string \| null` | No | The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |

> [accordion] payload full type
>
> ```ts theme={null}
> {
>   dataCrc32c?: string | number | null,
>   data?: string | null
> } | null
> ```

***

### locations.secrets.versions.destroy

`secretManager.locations.secrets.versions.destroy`

Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.versions.destroy({ name: 'projects/demo-project/locations/us-central1/secrets/stripe-key/versions/3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. Format: `projects/<id>/locations/<id>/secrets/<id>/versions/<id>`. |
| `etag` | `string` | No | Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### locations.secrets.versions.disable

`secretManager.locations.secrets.versions.disable`

Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.versions.disable({ name: 'projects/demo-project/locations/us-central1/secrets/stripe-key/versions/3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. Format: `projects/<id>/locations/<id>/secrets/<id>/versions/<id>`. |
| `etag` | `string` | No | Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### locations.secrets.versions.enable

`secretManager.locations.secrets.versions.enable`

Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.versions.enable({ name: 'projects/demo-project/locations/us-central1/secrets/stripe-key/versions/3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. Format: `projects/<id>/locations/<id>/secrets/<id>/versions/<id>`. |
| `etag` | `string` | No | Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### locations.secrets.versions.get

`secretManager.locations.secrets.versions.get`

Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.versions.get({ name: 'projects/demo-project/locations/us-central1/secrets/stripe-key/versions/latest' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. Format: `projects/<id>/locations/<id>/secrets/<id>/versions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### locations.secrets.versions.list

`secretManager.locations.secrets.versions.list`

Lists SecretVersions. This call does not return secret data (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.locations.secrets.versions.list({ parent: 'projects/demo-project/locations/us-central1/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/locations/<id>/secrets/<id>`. |
| `filter` | `string` | No | Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed. |
| `pageToken` | `string` | No | Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next\_page\_token]\[]. |
| `pageSize` | `number` | No | Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `versions` | `object[] \| null` | No | The list of SecretVersions sorted in reverse by create\_time (newest first). |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. Pass this value in ListSecretVersionsRequest.page\_token to retrieve the next page. |
| `totalSize` | `number \| null` | No | The total number of SecretVersions but 0 when the ListSecretsRequest.filter field is set. |

> [accordion] versions full type
>
> ```ts theme={null}
> {
>   clientSpecifiedPayloadChecksum?: boolean | null,
>   customerManagedEncryption?: {
>     kmsKeyVersionName?: string | null
>   } | null,
>   state?: string | null,
>   name?: string | null,
>   scheduledDestroyTime?: string | null,
>   createTime?: string | null,
>   destroyTime?: string | null,
>   replicationStatus?: {
>     automatic?: {
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     } | null,
>     userManaged?: {
>       replicas?: {
>         location?: string | null,
>         customerManagedEncryption?: {
>           kmsKeyVersionName?: string | null
>         } | null
>       }[] | null
>     } | null
>   } | null,
>   etag?: string | null
> }[] | null
> ```

***

### secrets.addVersion

`secretManager.secrets.addVersion`

Creates a new SecretVersion containing secret data and attaches it to an existing Secret

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.addVersion({
	parent: 'projects/demo-project/secrets/stripe-key',
	payload: { data: 'c2tfdGVzdF8xMjM=' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/secrets/<id>`. |
| `payload` | `object` | No | A secret payload resource in the Secret Manager API. This contains the sensitive secret payload that is associated with a SecretVersion. |

> [accordion] payload full type
>
> ```ts theme={null}
> {
>   dataCrc32c?: string | number,
>   data?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### secrets.create

`secretManager.secrets.create`

Creates a new Secret containing no SecretVersions

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.create({
	parent: 'projects/demo-project',
	secretId: 'stripe-key',
	replication: {
		automatic: {},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`. Format: `projects/<id>`. |
| `secretId` | `string` | No | Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number>` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `topics` | `object[]` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `SECRET_TYPE_UNSPECIFIED \| CLOUD_SQL_DB_CREDENTIALS \| ACCESS_KEY \| CERTIFICATE \| OTHER_DB_CREDENTIALS \| OTHER` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string>` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `customerManagedEncryption` | `object` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string>` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string
> }[]
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string,
>   nextRotationTime?: string
> }
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string
> }
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string,
>       customerManagedEncryption?: {
>         kmsKeyName?: string
>       }
>     }[]
>   },
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string
>     }
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number> \| null` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `policyMember` | `object \| null` | No | Output-only policy member strings of a Google Cloud resource's built-in identity. |
| `topics` | `object[] \| null` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string \| null` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string \| null` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object \| null` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `string \| null` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `name` | `string \| null` | No | Output only. The resource name of the Secret in the format `projects/*/secrets/*`. |
| `customerManagedEncryption` | `object \| null` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object \| null` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string \| null` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string \| null` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string> \| null` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |
| `createTime` | `string \| null` | No | Output only. The time at which the Secret was created. |

> [accordion] policyMember full type
>
> ```ts theme={null}
> {
>   iamPolicyNamePrincipal?: string | null,
>   iamPolicyUidPrincipal?: string | null
> } | null
> ```

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string | null,
>   managedRotationStatus?: {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null,
>   nextRotationTime?: string | null
> } | null
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string | null
> } | null
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyName?: string | null
>       } | null
>     }[] | null
>   } | null,
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string | null
>     } | null
>   } | null
> } | null
> ```

***

### secrets.delete

`secretManager.secrets.delete`

Deletes a Secret

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.delete({ name: 'projects/demo-project/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`. Format: `projects/<id>/secrets/<id>`. |
| `etag` | `string` | No | Optional. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### secrets.enableManagedRotation

`secretManager.secrets.enableManagedRotation`

Enables the managed rotation feature for a Secret. This method can only be triggered once for a secret

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.enableManagedRotation({
	parent: 'projects/demo-project/secrets/stripe-key',
	cloudSqlSingleUserCredentials: { instanceId: 'app-db', username: 'app' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/secrets/<id>`. |
| `cloudSqlSingleUserCredentials` | `object` | No | These are the credentials required for Cloud SQL DB for Single user Managed Rotation. |

> [accordion] cloudSqlSingleUserCredentials full type
>
> ```ts theme={null}
> {
>   password?: string,
>   instanceId?: string,
>   username?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### secrets.get

`secretManager.secrets.get`

Gets metadata for a given Secret

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.get({ name: 'projects/demo-project/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/secrets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number> \| null` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `policyMember` | `object \| null` | No | Output-only policy member strings of a Google Cloud resource's built-in identity. |
| `topics` | `object[] \| null` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string \| null` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string \| null` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object \| null` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `string \| null` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `name` | `string \| null` | No | Output only. The resource name of the Secret in the format `projects/*/secrets/*`. |
| `customerManagedEncryption` | `object \| null` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object \| null` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string \| null` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string \| null` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string> \| null` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |
| `createTime` | `string \| null` | No | Output only. The time at which the Secret was created. |

> [accordion] policyMember full type
>
> ```ts theme={null}
> {
>   iamPolicyNamePrincipal?: string | null,
>   iamPolicyUidPrincipal?: string | null
> } | null
> ```

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string | null,
>   managedRotationStatus?: {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null,
>   nextRotationTime?: string | null
> } | null
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string | null
> } | null
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyName?: string | null
>       } | null
>     }[] | null
>   } | null,
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string | null
>     } | null
>   } | null
> } | null
> ```

***

### secrets.getIamPolicy

`secretManager.secrets.getIamPolicy`

Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.getIamPolicy({ resource: 'projects/demo-project/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/secrets/<id>`. |
| `options.requestedPolicyVersion` | `number` | No | Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null,
>   role?: string | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null
> }[] | null
> ```

***

### secrets.list

`secretManager.secrets.list`

Lists Secrets (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. Pagination token, returned earlier via ListSecretsResponse.next\_page\_token. |
| `filter` | `string` | No | Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed. |
| `pageSize` | `number` | No | Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000. |
| `parent` | `string` | Yes | Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*` Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `totalSize` | `number \| null` | No | The total number of Secrets but 0 when the ListSecretsRequest.filter field is set. |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. Pass this value in ListSecretsRequest.page\_token to retrieve the next page. |
| `secrets` | `object[] \| null` | No | The list of Secrets sorted in reverse by create\_time (newest first). |

> [accordion] secrets full type
>
> ```ts theme={null}
> {
>   tags?: Record<string, string> | null,
>   versionAliases?: Record<string, string | number> | null,
>   policyMember?: {
>     iamPolicyNamePrincipal?: string | null,
>     iamPolicyUidPrincipal?: string | null
>   } | null,
>   topics?: {
>     name?: string | null
>   }[] | null,
>   etag?: string | null,
>   expireTime?: string | null,
>   rotation?: {
>     rotationPeriod?: string | null,
>     managedRotationStatus?: {
>       state?: string | null,
>       error?: {
>         code?: number | null,
>         message?: string | null,
>         details?: Record<string, any>[] | null
>       } | null
>     } | null,
>     nextRotationTime?: string | null
>   } | null,
>   secretType?: string | null,
>   annotations?: Record<string, string> | null,
>   name?: string | null,
>   customerManagedEncryption?: {
>     kmsKeyName?: string | null
>   } | null,
>   replication?: {
>     userManaged?: {
>       replicas?: {
>         location?: string | null,
>         customerManagedEncryption?: {
>           kmsKeyName?: string | null
>         } | null
>       }[] | null
>     } | null,
>     automatic?: {
>       customerManagedEncryption?: {
>         kmsKeyName?: string | null
>       } | null
>     } | null
>   } | null,
>   versionDestroyTtl?: string | null,
>   ttl?: string | null,
>   labels?: Record<string, string> | null,
>   createTime?: string | null
> }[] | null
> ```

***

### secrets.patch

`secretManager.secrets.patch`

Updates metadata of an existing Secret

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.patch({
	name: 'projects/demo-project/secrets/stripe-key',
	labels: { env: 'prod' },
	updateMask: 'labels',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Required. Specifies the fields to be updated. |
| `name` | `string` | Yes | Output only. The resource name of the Secret in the format `projects/*/secrets/*`. Format: `projects/<id>/secrets/<id>`. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number>` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `topics` | `object[]` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `SECRET_TYPE_UNSPECIFIED \| CLOUD_SQL_DB_CREDENTIALS \| ACCESS_KEY \| CERTIFICATE \| OTHER_DB_CREDENTIALS \| OTHER` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string>` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `customerManagedEncryption` | `object` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string>` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string
> }[]
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string,
>   nextRotationTime?: string
> }
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string
> }
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string,
>       customerManagedEncryption?: {
>         kmsKeyName?: string
>       }
>     }[]
>   },
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string
>     }
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. |
| `versionAliases` | `Record<string, string \| number> \| null` | No | Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('\_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. |
| `policyMember` | `object \| null` | No | Output-only policy member strings of a Google Cloud resource's built-in identity. |
| `topics` | `object[] \| null` | No | Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
| `etag` | `string \| null` | No | Optional. Etag of the currently stored Secret. |
| `expireTime` | `string \| null` | No | Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. |
| `rotation` | `object \| null` | No | The rotation time and period for a Secret. At next\_rotation\_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation. |
| `secretType` | `string \| null` | No | Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the SecretVersions. For secret of type UNSPECIFIED, the SecretVersions can be of any type. |
| `annotations` | `Record<string, string> \| null` | No | Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character (\[a-z0-9A-Z]), and may have dashes (-), underscores (\_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. |
| `name` | `string \| null` | No | Output only. The resource name of the Secret in the format `projects/*/secrets/*`. |
| `customerManagedEncryption` | `object \| null` | No | Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK). |
| `replication` | `object \| null` | No | A policy that defines the replication and encryption configuration of data. |
| `versionDestroyTtl` | `string \| null` | No | Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. |
| `ttl` | `string \| null` | No | Input only. The TTL for the Secret. |
| `labels` | `Record<string, string> \| null` | No | The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. |
| `createTime` | `string \| null` | No | Output only. The time at which the Secret was created. |

> [accordion] policyMember full type
>
> ```ts theme={null}
> {
>   iamPolicyNamePrincipal?: string | null,
>   iamPolicyUidPrincipal?: string | null
> } | null
> ```

> [accordion] topics full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

> [accordion] rotation full type
>
> ```ts theme={null}
> {
>   rotationPeriod?: string | null,
>   managedRotationStatus?: {
>     state?: string | null,
>     error?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null,
>   nextRotationTime?: string | null
> } | null
> ```

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string | null
> } | null
> ```

> [accordion] replication full type
>
> ```ts theme={null}
> {
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyName?: string | null
>       } | null
>     }[] | null
>   } | null,
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyName?: string | null
>     } | null
>   } | null
> } | null
> ```

***

### secrets.rotateSecret

`secretManager.secrets.rotateSecret`

Do a managed rotation for a Secret. This can only be triggered after Managed rotation has been enabled

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.rotateSecret({ parent: 'projects/demo-project/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/secrets/<id>`. |
| `body` | `object` | No | Request message for SecretManagerService.RotateSecret. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### secrets.setIamPolicy

`secretManager.secrets.setIamPolicy`

Sets the access control policy on the specified secret. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.setIamPolicy({
	resource: 'projects/demo-project/secrets/stripe-key',
	policy: {
		bindings: [{
			role: 'roles/secretmanager.secretAccessor',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/secrets/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   bindings?: {
>     members?: string[],
>     condition?: {
>       title?: string,
>       location?: string,
>       description?: string,
>       expression?: string
>     },
>     role?: string
>   }[],
>   etag?: string,
>   version?: number,
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       exemptedMembers?: string[],
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ
>     }[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   members?: string[] | null,
>   condition?: {
>     title?: string | null,
>     location?: string | null,
>     description?: string | null,
>     expression?: string | null
>   } | null,
>   role?: string | null
> }[] | null
> ```

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     exemptedMembers?: string[] | null,
>     logType?: string | null
>   }[] | null
> }[] | null
> ```

***

### secrets.testIamPermissions

`secretManager.secrets.testIamPermissions`

Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT\_FOUND error

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.testIamPermissions({
	resource: 'projects/demo-project/secrets/stripe-key',
	permissions: ['secretmanager.secrets.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/secrets/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### secrets.versions.access

`secretManager.secrets.versions.access`

Read a secret version's value (payload.data is base64); `latest` reads the most recently created version, and fails if that one is disabled or destroyed

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.versions.access({ name: 'projects/demo-project/secrets/stripe-key/versions/latest' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. Format: `projects/<id>/secrets/<id>/versions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `payload` | `object \| null` | No | A secret payload resource in the Secret Manager API. This contains the sensitive secret payload that is associated with a SecretVersion. |
| `name` | `string \| null` | No | The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. |

> [accordion] payload full type
>
> ```ts theme={null}
> {
>   dataCrc32c?: string | number | null,
>   data?: string | null
> } | null
> ```

***

### secrets.versions.destroy

`secretManager.secrets.versions.destroy`

Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.versions.destroy({ name: 'projects/demo-project/secrets/stripe-key/versions/3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. Format: `projects/<id>/secrets/<id>/versions/<id>`. |
| `etag` | `string` | No | Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### secrets.versions.disable

`secretManager.secrets.versions.disable`

Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.versions.disable({ name: 'projects/demo-project/secrets/stripe-key/versions/3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. Format: `projects/<id>/secrets/<id>/versions/<id>`. |
| `etag` | `string` | No | Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### secrets.versions.enable

`secretManager.secrets.versions.enable`

Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.versions.enable({ name: 'projects/demo-project/secrets/stripe-key/versions/3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. Format: `projects/<id>/secrets/<id>/versions/<id>`. |
| `etag` | `string` | No | Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### secrets.versions.get

`secretManager.secrets.versions.get`

Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.versions.get({ name: 'projects/demo-project/secrets/stripe-key/versions/latest' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. Format: `projects/<id>/secrets/<id>/versions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientSpecifiedPayloadChecksum` | `boolean \| null` | No | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
| `customerManagedEncryption` | `object \| null` | No | Describes the status of customer-managed encryption. |
| `state` | `string \| null` | No | Output only. The current state of the SecretVersion. |
| `name` | `string \| null` | No | Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
| `scheduledDestroyTime` | `string \| null` | No | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled\_destroy\_time. |
| `createTime` | `string \| null` | No | Output only. The time at which the SecretVersion was created. |
| `destroyTime` | `string \| null` | No | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
| `replicationStatus` | `object \| null` | No | The replication status of a SecretVersion. |
| `etag` | `string \| null` | No | Output only. Etag of the currently stored SecretVersion. |

> [accordion] customerManagedEncryption full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null
> } | null
> ```

> [accordion] replicationStatus full type
>
> ```ts theme={null}
> {
>   automatic?: {
>     customerManagedEncryption?: {
>       kmsKeyVersionName?: string | null
>     } | null
>   } | null,
>   userManaged?: {
>     replicas?: {
>       location?: string | null,
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     }[] | null
>   } | null
> } | null
> ```

***

### secrets.versions.list

`secretManager.secrets.versions.list`

Lists SecretVersions. This call does not return secret data (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.secretManager.secrets.versions.list({ parent: 'projects/demo-project/secrets/stripe-key' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000. |
| `filter` | `string` | No | Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed. |
| `pageToken` | `string` | No | Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next\_page\_token]\[]. |
| `parent` | `string` | Yes | Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Format: `projects/<id>/secrets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `versions` | `object[] \| null` | No | The list of SecretVersions sorted in reverse by create\_time (newest first). |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results. Pass this value in ListSecretVersionsRequest.page\_token to retrieve the next page. |
| `totalSize` | `number \| null` | No | The total number of SecretVersions but 0 when the ListSecretsRequest.filter field is set. |

> [accordion] versions full type
>
> ```ts theme={null}
> {
>   clientSpecifiedPayloadChecksum?: boolean | null,
>   customerManagedEncryption?: {
>     kmsKeyVersionName?: string | null
>   } | null,
>   state?: string | null,
>   name?: string | null,
>   scheduledDestroyTime?: string | null,
>   createTime?: string | null,
>   destroyTime?: string | null,
>   replicationStatus?: {
>     automatic?: {
>       customerManagedEncryption?: {
>         kmsKeyVersionName?: string | null
>       } | null
>     } | null,
>     userManaged?: {
>       replicas?: {
>         location?: string | null,
>         customerManagedEncryption?: {
>           kmsKeyVersionName?: string | null
>         } | null
>       }[] | null
>     } | null
>   } | null,
>   etag?: string | null
> }[] | null
> ```

***

## Service Usage

### operations.cancel

`serviceUsage.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.operations.cancel({ name: 'operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be cancelled. Format: `operations/<path>`. |
| `body` | `object` | No | The request message for Operations.CancelOperation. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### operations.delete

`serviceUsage.operations.delete`

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.operations.delete({ name: 'operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be deleted. Format: `operations/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### operations.get

`serviceUsage.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.operations.get({ name: 'operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### operations.list

`serviceUsage.operations.list`

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.operations.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The standard list page size. |
| `pageToken` | `string` | No | The standard list page token. |
| `returnPartialSuccess` | `boolean` | No | When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation. |
| `name` | `string` | No | The name of the operation's parent resource. |
| `filter` | `string` | No | The standard list filter. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |
| `unreachable` | `string[] \| null` | No | Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   done?: boolean | null,
>   response?: Record<string, any> | null,
>   metadata?: Record<string, any> | null,
>   error?: {
>     message?: string | null,
>     details?: Record<string, any>[] | null,
>     code?: number | null
>   } | null,
>   name?: string | null
> }[] | null
> ```

***

### services.batchEnable

`serviceUsage.services.batchEnable`

Turn up to 20 APIs on for a project in one call (serviceIds like pubsub.googleapis.com); returns a long-running operation; if one fails, none turn on. Calls to them can still answer 403 "has not been used in project ... or it is disabled" for a minute or two after the operation is done; wait and retry

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.services.batchEnable({
	parent: 'projects/demo-project',
	serviceIds: ['run.googleapis.com', 'pubsub.googleapis.com'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Parent to enable services on. An example name would be: `projects/123` where `123` is the project number. The `BatchEnableServices` method currently only supports projects. Format: `<id>/<id>`. |
| `serviceIds` | `string[]` | No | The identifiers of the services to enable on the project. A valid identifier would be: serviceusage.googleapis.com Enabling services requires that each service is public or is shared with the user enabling the service. A single request can enable a maximum of 20 services at a time. If more than 20 services are specified, the request will fail, and no state changes will occur. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### services.batchGet

`serviceUsage.services.batchGet`

Returns the service configurations and enabled states for a given list of services

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.services.batchGet({
	parent: 'projects/demo-project',
	names: ['projects/demo-project/services/run.googleapis.com'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `names` | `string[]` | No | Names of the services to retrieve. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number. A single request can get a maximum of 30 services at a time. |
| `parent` | `string` | Yes | Parent to retrieve services from. If this is set, the parent of all of the services specified in `names` must match this field. An example name would be: `projects/123` where `123` is the project number. The `BatchGetServices` method currently only supports projects. Format: `<id>/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `services` | `object[] \| null` | No | The requested Service states. |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   parent?: string | null,
>   config?: {
>     usage?: {
>       producerNotificationChannel?: string | null,
>       requirements?: string[] | null,
>       rules?: {
>         skipServiceControl?: boolean | null,
>         selector?: string | null,
>         allowUnregisteredCalls?: boolean | null
>       }[] | null
>     } | null,
>     monitoredResources?: {
>       description?: string | null,
>       labels?: {
>         description?: string | null,
>         valueType?: string | null,
>         key?: string | null
>       }[] | null,
>       launchStage?: string | null,
>       name?: string | null,
>       type?: string | null,
>       displayName?: string | null
>     }[] | null,
>     documentation?: {
>       sectionOverrides?: {
>         content?: string | null,
>         subpages?: {
>           content?: string | null,
>           subpages?: (recursive)[] | null,
>           name?: string | null
>         }[] | null,
>         name?: string | null
>       }[] | null,
>       serviceRootUrl?: string | null,
>       additionalIamInfo?: string | null,
>       documentationRootUrl?: string | null,
>       overview?: string | null,
>       summary?: string | null,
>       pages?: {
>         content?: string | null,
>         subpages?: {
>           content?: string | null,
>           subpages?: (recursive)[] | null,
>           name?: string | null
>         }[] | null,
>         name?: string | null
>       }[] | null,
>       rules?: {
>         deprecationDescription?: string | null,
>         selector?: string | null,
>         description?: string | null,
>         disableReplacementWords?: string | null
>       }[] | null
>     } | null,
>     title?: string | null,
>     quota?: {
>       metricRules?: {
>         metricCosts?: Record<string, string | number> | null,
>         selector?: string | null,
>         nonagenticMetricCosts?: Record<string, string | number> | null,
>         agenticMetricCosts?: Record<string, string | number> | null
>       }[] | null,
>       limits?: {
>         trafficSource?: string | null,
>         description?: string | null,
>         duration?: string | null,
>         metric?: string | null,
>         defaultLimit?: string | number | null,
>         unit?: string | null,
>         name?: string | null,
>         maxLimit?: string | number | null,
>         values?: Record<string, string | number> | null,
>         displayName?: string | null,
>         freeTier?: string | number | null
>       }[] | null
>     } | null,
>     endpoints?: {
>       aliases?: string[] | null,
>       target?: string | null,
>       allowCors?: boolean | null,
>       name?: string | null
>     }[] | null,
>     authentication?: {
>       rules?: {
>         requirements?: {
>           providerId?: string | null,
>           audiences?: string | null
>         }[] | null,
>         oauth?: {
>           canonicalScopes?: string | null
>         } | null,
>         selector?: string | null,
>         allowWithoutCredential?: boolean | null
>       }[] | null,
>       providers?: {
>         authorizationUrl?: string | null,
>         jwksUri?: string | null,
>         audiences?: string | null,
>         jwtLocations?: {
>           cookie?: string | null,
>           query?: string | null,
>           header?: string | null,
>           valuePrefix?: string | null
>         }[] | null,
>         id?: string | null,
>         issuer?: string | null
>       }[] | null
>     } | null,
>     name?: string | null,
>     apis?: {
>       mixins?: {
>         name?: string | null,
>         root?: string | null
>       }[] | null,
>       name?: string | null,
>       syntax?: string | null,
>       options?: {
>         value?: Record<string, any> | null,
>         name?: string | null
>       }[] | null,
>       sourceContext?: {
>         fileName?: string | null
>       } | null,
>       version?: string | null,
>       methods?: {
>         responseTypeUrl?: string | null,
>         options?: {
>           value?: Record<string, any> | null,
>           name?: string | null
>         }[] | null,
>         requestStreaming?: boolean | null,
>         edition?: string | null,
>         requestTypeUrl?: string | null,
>         responseStreaming?: boolean | null,
>         name?: string | null,
>         syntax?: string | null
>       }[] | null,
>       edition?: string | null
>     }[] | null,
>     monitoring?: {
>       producerDestinations?: {
>         monitoredResource?: string | null,
>         metrics?: string[] | null
>       }[] | null,
>       consumerDestinations?: {
>         monitoredResource?: string | null,
>         metrics?: string[] | null
>       }[] | null
>     } | null
>   } | null,
>   name?: string | null
> }[] | null
> ```

***

### services.disable

`serviceUsage.services.disable`

Turn an API off for a project; calls to it start failing

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.services.disable({ name: 'projects/demo-project/services/run.googleapis.com', disableDependentServices: false });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Name of the consumer and service to disable the service on. The enable and disable methods currently only support projects. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number. Format: `<id>/<id>/services/<id>`. |
| `checkIfServiceHasUsage` | `CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED \| SKIP \| CHECK` | No | Defines the behavior for checking service usage when disabling a service. |
| `disableDependentServices` | `boolean` | No | Indicates if services that are enabled and which depend on this service should also be disabled. If not set, an error will be generated if any enabled services depend on the service to be disabled. When set, the service, and any enabled services that depend on it, will be disabled together. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### services.enable

`serviceUsage.services.enable`

Turn an API on for a project (name = projects/\<project>/services/\<api>.googleapis.com); returns a long-running operation. Calls to the API can still answer 403 "has not been used in project ... or it is disabled" for a minute or two after the operation is done; wait and retry

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.services.enable({ name: 'projects/demo-project/services/run.googleapis.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Name of the consumer and service to enable the service on. The `EnableService` and `DisableService` methods currently only support projects. Enabling a service requires that the service is public or is shared with the user enabling the service. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number. Format: `<id>/<id>/services/<id>`. |
| `body` | `object` | No | Request message for the `EnableService` method. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### services.get

`serviceUsage.services.get`

Returns the service configuration and enabled state for a given service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.services.get({ name: 'projects/demo-project/services/run.googleapis.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Name of the consumer and service to get the `ConsumerState` for. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number. Format: `<id>/<id>/services/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Whether or not the service has been enabled for use by the consumer. |
| `parent` | `string \| null` | No | The resource name of the consumer. A valid name would be: - projects/123 |
| `config` | `object \| null` | No | The configuration of the service. |
| `name` | `string \| null` | No | The resource name of the consumer and service. A valid name would be: - projects/123/services/serviceusage.googleapis.com |

> [accordion] config full type
>
> ```ts theme={null}
> {
>   usage?: {
>     producerNotificationChannel?: string | null,
>     requirements?: string[] | null,
>     rules?: {
>       skipServiceControl?: boolean | null,
>       selector?: string | null,
>       allowUnregisteredCalls?: boolean | null
>     }[] | null
>   } | null,
>   monitoredResources?: {
>     description?: string | null,
>     labels?: {
>       description?: string | null,
>       valueType?: string | null,
>       key?: string | null
>     }[] | null,
>     launchStage?: string | null,
>     name?: string | null,
>     type?: string | null,
>     displayName?: string | null
>   }[] | null,
>   documentation?: {
>     sectionOverrides?: {
>       content?: string | null,
>       subpages?: {
>         content?: string | null,
>         subpages?: (recursive)[] | null,
>         name?: string | null
>       }[] | null,
>       name?: string | null
>     }[] | null,
>     serviceRootUrl?: string | null,
>     additionalIamInfo?: string | null,
>     documentationRootUrl?: string | null,
>     overview?: string | null,
>     summary?: string | null,
>     pages?: {
>       content?: string | null,
>       subpages?: {
>         content?: string | null,
>         subpages?: (recursive)[] | null,
>         name?: string | null
>       }[] | null,
>       name?: string | null
>     }[] | null,
>     rules?: {
>       deprecationDescription?: string | null,
>       selector?: string | null,
>       description?: string | null,
>       disableReplacementWords?: string | null
>     }[] | null
>   } | null,
>   title?: string | null,
>   quota?: {
>     metricRules?: {
>       metricCosts?: Record<string, string | number> | null,
>       selector?: string | null,
>       nonagenticMetricCosts?: Record<string, string | number> | null,
>       agenticMetricCosts?: Record<string, string | number> | null
>     }[] | null,
>     limits?: {
>       trafficSource?: string | null,
>       description?: string | null,
>       duration?: string | null,
>       metric?: string | null,
>       defaultLimit?: string | number | null,
>       unit?: string | null,
>       name?: string | null,
>       maxLimit?: string | number | null,
>       values?: Record<string, string | number> | null,
>       displayName?: string | null,
>       freeTier?: string | number | null
>     }[] | null
>   } | null,
>   endpoints?: {
>     aliases?: string[] | null,
>     target?: string | null,
>     allowCors?: boolean | null,
>     name?: string | null
>   }[] | null,
>   authentication?: {
>     rules?: {
>       requirements?: {
>         providerId?: string | null,
>         audiences?: string | null
>       }[] | null,
>       oauth?: {
>         canonicalScopes?: string | null
>       } | null,
>       selector?: string | null,
>       allowWithoutCredential?: boolean | null
>     }[] | null,
>     providers?: {
>       authorizationUrl?: string | null,
>       jwksUri?: string | null,
>       audiences?: string | null,
>       jwtLocations?: {
>         cookie?: string | null,
>         query?: string | null,
>         header?: string | null,
>         valuePrefix?: string | null
>       }[] | null,
>       id?: string | null,
>       issuer?: string | null
>     }[] | null
>   } | null,
>   name?: string | null,
>   apis?: {
>     mixins?: {
>       name?: string | null,
>       root?: string | null
>     }[] | null,
>     name?: string | null,
>     syntax?: string | null,
>     options?: {
>       value?: Record<string, any> | null,
>       name?: string | null
>     }[] | null,
>     sourceContext?: {
>       fileName?: string | null
>     } | null,
>     version?: string | null,
>     methods?: {
>       responseTypeUrl?: string | null,
>       options?: {
>         value?: Record<string, any> | null,
>         name?: string | null
>       }[] | null,
>       requestStreaming?: boolean | null,
>       edition?: string | null,
>       requestTypeUrl?: string | null,
>       responseStreaming?: boolean | null,
>       name?: string | null,
>       syntax?: string | null
>     }[] | null,
>     edition?: string | null
>   }[] | null,
>   monitoring?: {
>     producerDestinations?: {
>       monitoredResource?: string | null,
>       metrics?: string[] | null
>     }[] | null,
>     consumerDestinations?: {
>       monitoredResource?: string | null,
>       metrics?: string[] | null
>     }[] | null
>   } | null
> } | null
> ```

***

### services.list

`serviceUsage.services.list`

List all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the `servicemanagement.services.bind` permission, and all services that have already been enabled on the project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.serviceUsage.services.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Parent to search for services on. An example name would be: `projects/123` where `123` is the project number. Format: `<id>/<id>`. |
| `pageSize` | `number` | No | Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50. |
| `filter` | `string` | No | Only list services that conform to the given filter. The allowed filter strings are `state:ENABLED` and `state:DISABLED`. |
| `pageToken` | `string` | No | Token identifying which result to start with, which is returned by a previous list call. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Token that can be passed to `ListServices` to resume a paginated query. |
| `services` | `object[] \| null` | No | The available services for the requested project. |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   parent?: string | null,
>   config?: {
>     usage?: {
>       producerNotificationChannel?: string | null,
>       requirements?: string[] | null,
>       rules?: {
>         skipServiceControl?: boolean | null,
>         selector?: string | null,
>         allowUnregisteredCalls?: boolean | null
>       }[] | null
>     } | null,
>     monitoredResources?: {
>       description?: string | null,
>       labels?: {
>         description?: string | null,
>         valueType?: string | null,
>         key?: string | null
>       }[] | null,
>       launchStage?: string | null,
>       name?: string | null,
>       type?: string | null,
>       displayName?: string | null
>     }[] | null,
>     documentation?: {
>       sectionOverrides?: {
>         content?: string | null,
>         subpages?: {
>           content?: string | null,
>           subpages?: (recursive)[] | null,
>           name?: string | null
>         }[] | null,
>         name?: string | null
>       }[] | null,
>       serviceRootUrl?: string | null,
>       additionalIamInfo?: string | null,
>       documentationRootUrl?: string | null,
>       overview?: string | null,
>       summary?: string | null,
>       pages?: {
>         content?: string | null,
>         subpages?: {
>           content?: string | null,
>           subpages?: (recursive)[] | null,
>           name?: string | null
>         }[] | null,
>         name?: string | null
>       }[] | null,
>       rules?: {
>         deprecationDescription?: string | null,
>         selector?: string | null,
>         description?: string | null,
>         disableReplacementWords?: string | null
>       }[] | null
>     } | null,
>     title?: string | null,
>     quota?: {
>       metricRules?: {
>         metricCosts?: Record<string, string | number> | null,
>         selector?: string | null,
>         nonagenticMetricCosts?: Record<string, string | number> | null,
>         agenticMetricCosts?: Record<string, string | number> | null
>       }[] | null,
>       limits?: {
>         trafficSource?: string | null,
>         description?: string | null,
>         duration?: string | null,
>         metric?: string | null,
>         defaultLimit?: string | number | null,
>         unit?: string | null,
>         name?: string | null,
>         maxLimit?: string | number | null,
>         values?: Record<string, string | number> | null,
>         displayName?: string | null,
>         freeTier?: string | number | null
>       }[] | null
>     } | null,
>     endpoints?: {
>       aliases?: string[] | null,
>       target?: string | null,
>       allowCors?: boolean | null,
>       name?: string | null
>     }[] | null,
>     authentication?: {
>       rules?: {
>         requirements?: {
>           providerId?: string | null,
>           audiences?: string | null
>         }[] | null,
>         oauth?: {
>           canonicalScopes?: string | null
>         } | null,
>         selector?: string | null,
>         allowWithoutCredential?: boolean | null
>       }[] | null,
>       providers?: {
>         authorizationUrl?: string | null,
>         jwksUri?: string | null,
>         audiences?: string | null,
>         jwtLocations?: {
>           cookie?: string | null,
>           query?: string | null,
>           header?: string | null,
>           valuePrefix?: string | null
>         }[] | null,
>         id?: string | null,
>         issuer?: string | null
>       }[] | null
>     } | null,
>     name?: string | null,
>     apis?: {
>       mixins?: {
>         name?: string | null,
>         root?: string | null
>       }[] | null,
>       name?: string | null,
>       syntax?: string | null,
>       options?: {
>         value?: Record<string, any> | null,
>         name?: string | null
>       }[] | null,
>       sourceContext?: {
>         fileName?: string | null
>       } | null,
>       version?: string | null,
>       methods?: {
>         responseTypeUrl?: string | null,
>         options?: {
>           value?: Record<string, any> | null,
>           name?: string | null
>         }[] | null,
>         requestStreaming?: boolean | null,
>         edition?: string | null,
>         requestTypeUrl?: string | null,
>         responseStreaming?: boolean | null,
>         name?: string | null,
>         syntax?: string | null
>       }[] | null,
>       edition?: string | null
>     }[] | null,
>     monitoring?: {
>       producerDestinations?: {
>         monitoredResource?: string | null,
>         metrics?: string[] | null
>       }[] | null,
>       consumerDestinations?: {
>         monitoredResource?: string | null,
>         metrics?: string[] | null
>       }[] | null
>     } | null
>   } | null,
>   name?: string | null
> }[] | null
> ```

***

## Sql

### backupRuns.delete

`sql.backupRuns.delete`

Deletes the backup taken by a backup run

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.backupRuns.delete({ id: '1', project: 'demo-project', instance: 'app-db' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number` | Yes | The ID of the backup run to delete. To find a backup run ID, use the [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) method. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### backupRuns.get

`sql.backupRuns.get`

Retrieves a resource containing information about a backup run

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.backupRuns.get({ id: '1', instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number` | Yes | The ID of this backup run. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `windowStartTime` | `string \| null` | No | The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `endTime` | `string \| null` | No | The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `id` | `string \| number \| null` | No | The identifier for this backup run. Unique only for a specific Cloud SQL instance. |
| `timeZone` | `string \| null` | No | Backup time zone to prevent restores to an instance with a different time zone. Now relevant only for SQL Server. |
| `databaseVersion` | `string \| null` | No | Output only. The instance database version at the time this backup was made. |
| `description` | `string \| null` | No | The description of this run, only applicable to on-demand backups. |
| `error` | `object \| null` | No | Database instance operation error. |
| `diskEncryptionConfiguration` | `object \| null` | No | Disk encryption configuration for an instance. |
| `diskEncryptionStatus` | `object \| null` | No | Disk encryption status for an instance. |
| `kind` | `string \| null` | No | This is always `sql#backupRun`. |
| `status` | `string \| null` | No | The status of this run. |
| `enqueuedTime` | `string \| null` | No | The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `location` | `string \| null` | No | Location of the backups. |
| `startTime` | `string \| null` | No | The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `maxChargeableBytes` | `string \| number \| null` | No | Output only. The maximum chargeable bytes for the backup. |
| `backupKind` | `string \| null` | No | Specifies the kind of backup, PHYSICAL or DEFAULT\_SNAPSHOT. |
| `instance` | `string \| null` | No | Name of the database instance. |
| `type` | `string \| null` | No | The type of this run; can be either "AUTOMATED" or "ON\_DEMAND" or "FINAL". This field defaults to "ON\_DEMAND" and is ignored, when specified for insert requests. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   message?: string | null,
>   code?: string | null
> } | null
> ```

> [accordion] diskEncryptionConfiguration full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string | null,
>   kind?: string | null,
>   confidentialMode?: boolean | null,
>   cmekSourceLogEncryptionEnforced?: boolean | null
> } | null
> ```

> [accordion] diskEncryptionStatus full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null,
>   kind?: string | null
> } | null
> ```

***

### backupRuns.insert

`sql.backupRuns.insert`

Creates a new backup run on demand

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.backupRuns.insert({ project: 'demo-project', instance: 'app-db', description: 'Before the migration' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `selfLink` | `string` | No | The URI of this resource. |
| `windowStartTime` | `string` | No | The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `endTime` | `string` | No | The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `id` | `string \| number` | No | The identifier for this backup run. Unique only for a specific Cloud SQL instance. |
| `timeZone` | `string` | No | Backup time zone to prevent restores to an instance with a different time zone. Now relevant only for SQL Server. |
| `description` | `string` | No | The description of this run, only applicable to on-demand backups. |
| `error` | `object` | No | Database instance operation error. |
| `diskEncryptionConfiguration` | `object` | No | Disk encryption configuration for an instance. |
| `diskEncryptionStatus` | `object` | No | Disk encryption status for an instance. |
| `kind` | `string` | No | This is always `sql#backupRun`. |
| `status` | `SQL_BACKUP_RUN_STATUS_UNSPECIFIED \| ENQUEUED \| OVERDUE \| RUNNING \| FAILED \| SUCCESSFUL \| SKIPPED \| DELETION_PENDING \| DELETION_FAILED \| DELETED` | No | The status of this run. |
| `enqueuedTime` | `string` | No | The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `location` | `string` | No | Location of the backups. |
| `startTime` | `string` | No | The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `backupKind` | `SQL_BACKUP_KIND_UNSPECIFIED \| SNAPSHOT \| PHYSICAL` | No | Specifies the kind of backup, PHYSICAL or DEFAULT\_SNAPSHOT. |
| `body_instance` | `string` | No | Name of the database instance. |
| `type` | `SQL_BACKUP_RUN_TYPE_UNSPECIFIED \| AUTOMATED \| ON_DEMAND` | No | The type of this run; can be either "AUTOMATED" or "ON\_DEMAND" or "FINAL". This field defaults to "ON\_DEMAND" and is ignored, when specified for insert requests. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   kind?: string,
>   message?: string,
>   code?: string
> }
> ```

> [accordion] diskEncryptionConfiguration full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string,
>   kind?: string,
>   confidentialMode?: boolean,
>   cmekSourceLogEncryptionEnforced?: boolean
> }
> ```

> [accordion] diskEncryptionStatus full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string,
>   kind?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### backupRuns.list

`sql.backupRuns.list`

Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.backupRuns.list({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID, or "-" for all instances. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `maxResults` | `number` | No | Maximum number of backup runs per response. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | A list of backup runs in reverse chronological order of the enqueued time. |
| `kind` | `string \| null` | No | This is always `sql#backupRunsList`. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   selfLink?: string | null,
>   windowStartTime?: string | null,
>   endTime?: string | null,
>   id?: string | number | null,
>   timeZone?: string | null,
>   databaseVersion?: string | null,
>   description?: string | null,
>   error?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   } | null,
>   diskEncryptionConfiguration?: {
>     kmsKeyName?: string | null,
>     kind?: string | null,
>     confidentialMode?: boolean | null,
>     cmekSourceLogEncryptionEnforced?: boolean | null
>   } | null,
>   diskEncryptionStatus?: {
>     kmsKeyVersionName?: string | null,
>     kind?: string | null
>   } | null,
>   kind?: string | null,
>   status?: string | null,
>   enqueuedTime?: string | null,
>   location?: string | null,
>   startTime?: string | null,
>   maxChargeableBytes?: string | number | null,
>   backupKind?: string | null,
>   instance?: string | null,
>   type?: string | null
> }[] | null
> ```

***

### backups.createBackup

`sql.backups.createBackup`

Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand backups

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.backups.createBackup({ parent: 'projects/demo-project', instance: 'app-db', description: 'Before the migration' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource where this backup is created. Format: projects/\{project} Format: `projects/<id>`. |
| `instance` | `string` | No | The name of the source database instance. |
| `location` | `string` | No | The storage location of the backups. The location can be multi-regional. |
| `ttlDays` | `string \| number` | No | Input only. The time-to-live (TTL) interval for this resource (in days). For example: ttlDays:7, means 7 days from the current time. The expiration time can't exceed 365 days from the time that the backup is created. |
| `description` | `string` | No | The description of this backup. |
| `expiryTime` | `string` | No | Backup expiration time. A UTC timestamp of when this backup expired. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### backups.deleteBackup

`sql.backups.deleteBackup`

Deletes the backup

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.backups.deleteBackup({ name: 'projects/demo-project/backups/backup-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the backup to delete. Format: projects/\{project}/backups/\{backup} Format: `projects/<id>/backups/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### backups.getBackup

`sql.backups.getBackup`

Retrieves a resource containing information about a backup

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.backups.getBackup({ name: 'projects/demo-project/backups/backup-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the backup to retrieve. Format: projects/\{project}/backups/\{backup} Format: `projects/<id>/backups/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `backupKind` | `string \| null` | No | Output only. Specifies the kind of backup, PHYSICAL or DEFAULT\_SNAPSHOT. |
| `name` | `string \| null` | No | Output only. The resource name of the backup. Format: projects/\{project}/backups/\{backup}. |
| `type` | `string \| null` | No | Output only. The type of this backup. The type can be "AUTOMATED", "ON\_DEMAND" or “FINAL”. |
| `instance` | `string \| null` | No | The name of the source database instance. |
| `instanceDeletionTime` | `string \| null` | No | Optional. Output only. Timestamp in UTC of when the instance associated with this backup is deleted. |
| `location` | `string \| null` | No | The storage location of the backups. The location can be multi-regional. |
| `state` | `string \| null` | No | Output only. The status of this backup. |
| `satisfiesPzs` | `boolean \| null` | No | Output only. This status indicates whether the backup satisfies PZS. The status is reserved for future use. |
| `backupRun` | `string \| null` | No | Output only. The mapping to backup run resource used for IAM validations. |
| `error` | `object \| null` | No | Database instance operation error. |
| `ttlDays` | `string \| number \| null` | No | Input only. The time-to-live (TTL) interval for this resource (in days). For example: ttlDays:7, means 7 days from the current time. The expiration time can't exceed 365 days from the time that the backup is created. |
| `kind` | `string \| null` | No | Output only. This is always `sql#backup`. |
| `description` | `string \| null` | No | The description of this backup. |
| `expiryTime` | `string \| null` | No | Backup expiration time. A UTC timestamp of when this backup expired. |
| `databaseVersion` | `string \| null` | No | Output only. The database version of the instance of at the time this backup was made. |
| `maxChargeableBytes` | `string \| number \| null` | No | Output only. The maximum chargeable bytes for the backup. |
| `kmsKey` | `string \| null` | No | Output only. This output contains the encryption configuration for a backup and the resource name of the KMS key for disk encryption. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. This status indicates whether the backup satisfies PZI. The status is reserved for future use. |
| `backupInterval` | `object \| null` | No | Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. |
| `timeZone` | `string \| null` | No | Output only. This output contains a backup time zone. If a Cloud SQL for SQL Server instance has a different time zone from the backup's time zone, then the restore to the instance doesn't happen. |
| `selfLink` | `string \| null` | No | Output only. The URI of this resource. |
| `kmsKeyVersion` | `string \| null` | No | Output only. This output contains the encryption status for a backup and the version of the KMS key that's used to encrypt the Cloud SQL instance. |
| `instanceSettings` | `object \| null` | No | A Cloud SQL instance resource. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   message?: string | null,
>   code?: string | null
> } | null
> ```

> [accordion] backupInterval full type
>
> ```ts theme={null}
> {
>   startTime?: string | null,
>   endTime?: string | null
> } | null
> ```

> [accordion] instanceSettings full type
>
> ```ts theme={null}
> {
>   secondaryGceZone?: string | null,
>   databaseInstalledVersion?: string | null,
>   currentDiskSize?: string | number | null,
>   ipAddresses?: {
>     ipAddress?: string | null,
>     timeToRetire?: string | null,
>     type?: string | null
>   }[] | null,
>   instanceType?: string | null,
>   sqlNetworkArchitecture?: string | null,
>   kind?: string | null,
>   connectionName?: string | null,
>   masterInstanceName?: string | null,
>   nodeCount?: number | null,
>   state?: string | null,
>   switchTransactionLogsToCloudStorageEnabled?: boolean | null,
>   serviceAccountEmailAddress?: string | null,
>   onPremisesConfiguration?: {
>     dumpFilePath?: string | null,
>     sslOption?: string | null,
>     password?: string | null,
>     kind?: string | null,
>     selectedObjects?: {
>       database?: string | null
>     }[] | null,
>     sourceInstance?: {
>       region?: string | null,
>       name?: string | null,
>       project?: string | null
>     } | null,
>     caCertificate?: string | null,
>     hostPort?: string | null,
>     username?: string | null,
>     clientKey?: string | null,
>     clientCertificate?: string | null,
>     dmsManaged?: boolean | null
>   } | null,
>   upgradableDatabaseVersions?: {
>     displayName?: string | null,
>     majorVersion?: string | null,
>     name?: string | null
>   }[] | null,
>   rootPassword?: string | null,
>   replicaConfiguration?: {
>     mysqlReplicaConfiguration?: {
>       sslCipher?: string | null,
>       username?: string | null,
>       clientCertificate?: string | null,
>       masterHeartbeatPeriod?: string | number | null,
>       clientKey?: string | null,
>       password?: string | null,
>       connectRetryInterval?: number | null,
>       kind?: string | null,
>       verifyServerCertificate?: boolean | null,
>       dumpFilePath?: string | null,
>       caCertificate?: string | null
>     } | null,
>     failoverTarget?: boolean | null,
>     kind?: string | null,
>     cascadableReplica?: boolean | null
>   } | null,
>   gceZone?: string | null,
>   ipv6Address?: string | null,
>   diskEncryptionConfiguration?: {
>     kmsKeyName?: string | null,
>     kind?: string | null,
>     confidentialMode?: boolean | null,
>     cmekSourceLogEncryptionEnforced?: boolean | null
>   } | null,
>   includeReplicasForMajorVersionUpgrade?: boolean | null,
>   name?: string | null,
>   dnsNames?: {
>     recordManager?: string | null,
>     dnsScope?: string | null,
>     name?: string | null,
>     connectionType?: string | null
>   }[] | null,
>   backendType?: string | null,
>   satisfiesPzi?: boolean | null,
>   project?: string | null,
>   primaryDnsName?: string | null,
>   deploymentInfo?: {
>     target?: {
>       sourceId?: {
>         region?: string | null,
>         name?: string | null,
>         project?: string | null
>       } | null
>     } | null,
>     deploymentId?: string | null,
>     state?: string | null,
>     source?: {
>       targetId?: {
>         region?: string | null,
>         name?: string | null,
>         project?: string | null
>       } | null
>     } | null
>   } | null,
>   dnsName?: string | null,
>   databaseCenterIntegration?: string | null,
>   writeEndpoint?: string | null,
>   settings?: {
>     dataDiskType?: string | null,
>     availabilityType?: string | null,
>     enableGoogleMlIntegration?: boolean | null,
>     dataDiskSizeGb?: string | number | null,
>     enableDataplexIntegration?: boolean | null,
>     dataDiskProvisionedIops?: string | number | null,
>     performanceCaptureConfig?: {
>       transactionKillExcludedUserHosts?: string[] | null,
>       probeThreshold?: number | null,
>       historyListLengthThresholdCount?: number | null,
>       transactionKillType?: string | null,
>       secondsBehindSourceThreshold?: number | null,
>       memoryUsageThresholdPercent?: number | null,
>       transactionLockWaitThresholdCount?: number | null,
>       transactionDurationThreshold?: number | null,
>       probingIntervalSeconds?: number | null,
>       enabled?: boolean | null,
>       runningThreadsThreshold?: number | null,
>       cpuUtilizationThresholdPercent?: number | null,
>       semaphoreWaitThresholdCount?: number | null,
>       transactionKillThresholdSeconds?: number | null
>     } | null,
>     retainBackupsOnDelete?: boolean | null,
>     sqlServerAuditConfig?: {
>       bucket?: string | null,
>       retentionInterval?: string | null,
>       kind?: string | null,
>       uploadInterval?: string | null
>     } | null,
>     timeZone?: string | null,
>     replicationType?: string | null,
>     replicationLagMaxSeconds?: number | null,
>     dataApiAccess?: string | null,
>     tier?: string | null,
>     backupConfiguration?: {
>       backupTier?: string | null,
>       enabled?: boolean | null,
>       backupRetentionSettings?: {
>         retainedBackups?: number | null,
>         retentionUnit?: string | null
>       } | null,
>       kind?: string | null,
>       transactionLogRetentionDays?: number | null,
>       location?: string | null,
>       startTime?: string | null,
>       transactionalLogStorageState?: string | null,
>       pointInTimeRecoveryEnabled?: boolean | null,
>       replicationLogArchivingEnabled?: boolean | null,
>       binaryLogEnabled?: boolean | null
>     } | null,
>     userLabels?: Record<string, string> | null,
>     autoUpgradeEnabled?: boolean | null,
>     pricingPlan?: string | null,
>     kind?: string | null,
>     dataCacheConfig?: {
>       dataCacheEnabled?: boolean | null
>     } | null,
>     readPoolAutoScaleConfig?: {
>       disableScaleIn?: boolean | null,
>       targetMetrics?: {
>         targetValue?: number | null,
>         metric?: string | null
>       }[] | null,
>       scaleInCooldownSeconds?: number | null,
>       maxNodeCount?: number | null,
>       scaleOutCooldownSeconds?: number | null,
>       minNodeCount?: number | null,
>       enabled?: boolean | null
>     } | null,
>     collation?: string | null,
>     activeDirectoryConfig?: {
>       mode?: string | null,
>       dnsServers?: string[] | null,
>       domain?: string | null,
>       kind?: string | null,
>       organizationalUnit?: string | null,
>       adminCredentialSecretName?: string | null
>     } | null,
>     edition?: string | null,
>     crashSafeReplicationEnabled?: boolean | null,
>     locationPreference?: {
>       zone?: string | null,
>       followGaeApplication?: string | null,
>       kind?: string | null,
>       secondaryZone?: string | null
>     } | null,
>     insightsConfig?: {
>       queryPlansPerMinute?: number | null,
>       queryInsightsEnabled?: boolean | null,
>       recordApplicationTags?: boolean | null,
>       queryStringLength?: number | null,
>       recordClientAddress?: boolean | null,
>       enhancedQueryInsightsEnabled?: boolean | null
>     } | null,
>     maintenanceWindow?: {
>       kind?: string | null,
>       updateTrack?: string | null,
>       day?: number | null,
>       hour?: number | null
>     } | null,
>     denyMaintenancePeriods?: {
>       startDate?: string | null,
>       endDate?: string | null,
>       time?: string | null
>     }[] | null,
>     databaseFlags?: {
>       value?: string | null,
>       name?: string | null
>     }[] | null,
>     databaseReplicationEnabled?: boolean | null,
>     authorizedGaeApplications?: string[] | null,
>     storageAutoResizeLimit?: string | number | null,
>     connectorEnforcement?: string | null,
>     ipConfiguration?: {
>       ipv4Enabled?: boolean | null,
>       requireSsl?: boolean | null,
>       pscConfig?: {
>         pscWriteEndpointDnsEnabled?: boolean | null,
>         pscAutoConnectionPolicyEnabled?: boolean | null,
>         pscAutoConnections?: {
>           writeEndpointAutoDnsStatus?: string | null,
>           serviceConnectionPolicyCreationResult?: string | null,
>           consumerNetworkStatus?: string | null,
>           status?: string | null,
>           ipAddress?: string | null,
>           consumerProject?: string | null,
>           instanceAutoDnsStatus?: string | null,
>           serviceConnectionPolicy?: string | null,
>           consumerNetwork?: string | null
>         }[] | null,
>         allowedConsumerProjects?: string[] | null,
>         networkAttachmentUri?: string | null,
>         pscEnabled?: boolean | null,
>         pscAutoDnsEnabled?: boolean | null
>       } | null,
>       serverCaMode?: string | null,
>       enablePrivatePathForGoogleCloudServices?: boolean | null,
>       customSubjectAlternativeNames?: string[] | null,
>       privateNetwork?: string | null,
>       sslMode?: string | null,
>       serverCertificateRotationMode?: string | null,
>       authorizedNetworks?: {
>         kind?: string | null,
>         value?: string | null,
>         expirationTime?: string | null,
>         name?: string | null
>       }[] | null,
>       allocatedIpRange?: string | null,
>       serverCaPool?: string | null
>     } | null,
>     entraidConfig?: {
>       tenantId?: string | null,
>       kind?: string | null,
>       applicationId?: string | null
>     } | null,
>     passwordValidationPolicy?: {
>       minLength?: number | null,
>       enablePasswordPolicy?: boolean | null,
>       disallowUsernameSubstring?: boolean | null,
>       passwordChangeInterval?: string | null,
>       disallowCompromisedCredentials?: boolean | null,
>       reuseInterval?: number | null,
>       complexity?: string | null
>     } | null,
>     finalBackupConfig?: {
>       enabled?: boolean | null,
>       retentionDays?: number | null
>     } | null,
>     dataDiskProvisionedThroughput?: string | number | null,
>     advancedMachineFeatures?: {
>       threadsPerCore?: number | null
>     } | null,
>     storageAutoResize?: boolean | null,
>     activationPolicy?: string | null,
>     settingsVersion?: string | number | null,
>     acceleratedReplicaMode?: boolean | null,
>     deletionProtectionEnabled?: boolean | null,
>     connectionPoolConfig?: {
>       poolerCount?: number | null,
>       connectionPoolingEnabled?: boolean | null,
>       flags?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null
>     } | null
>   } | null,
>   satisfiesPzs?: boolean | null,
>   selfLink?: string | null,
>   databaseCenterIntegrationEnabled?: boolean | null,
>   diskEncryptionStatus?: {
>     kmsKeyVersionName?: string | null,
>     kind?: string | null
>   } | null,
>   serverCaCert?: {
>     kind?: string | null,
>     cert?: string | null,
>     commonName?: string | null,
>     createTime?: string | null,
>     expirationTime?: string | null,
>     instance?: string | null,
>     certSerialNumber?: string | null,
>     selfLink?: string | null,
>     sha1Fingerprint?: string | null
>   } | null,
>   replicationCluster?: {
>     psaWriteEndpoint?: string | null,
>     drReplica?: boolean | null,
>     failoverDrReplicaName?: string | null
>   } | null,
>   etag?: string | null,
>   geminiConfig?: {
>     flagRecommenderEnabled?: boolean | null,
>     activeQueryEnabled?: boolean | null,
>     googleVacuumMgmtEnabled?: boolean | null,
>     oomSessionCancelEnabled?: boolean | null,
>     indexAdvisorEnabled?: boolean | null,
>     entitled?: boolean | null
>   } | null,
>   nodes?: {
>     ipAddresses?: {
>       ipAddress?: string | null,
>       timeToRetire?: string | null,
>       type?: string | null
>     }[] | null,
>     dnsNames?: {
>       recordManager?: string | null,
>       dnsScope?: string | null,
>       name?: string | null,
>       connectionType?: string | null
>     }[] | null,
>     dnsName?: string | null,
>     state?: string | null,
>     gceZone?: string | null,
>     pscServiceAttachmentLink?: string | null,
>     name?: string | null,
>     pscAutoConnections?: {
>       writeEndpointAutoDnsStatus?: string | null,
>       serviceConnectionPolicyCreationResult?: string | null,
>       consumerNetworkStatus?: string | null,
>       status?: string | null,
>       ipAddress?: string | null,
>       consumerProject?: string | null,
>       instanceAutoDnsStatus?: string | null,
>       serviceConnectionPolicy?: string | null,
>       consumerNetwork?: string | null
>     }[] | null
>   }[] | null,
>   maintenanceVersion?: string | null,
>   maxDiskSize?: string | number | null,
>   createTime?: string | null,
>   failoverReplica?: {
>     name?: string | null,
>     available?: boolean | null
>   } | null,
>   skipPrecheck?: boolean | null,
>   databaseVersion?: string | null,
>   availableMaintenanceVersions?: string[] | null,
>   suspensionReason?: string[] | null,
>   region?: string | null,
>   tags?: Record<string, string> | null,
>   pscServiceAttachmentLink?: string | null,
>   scheduledMaintenance?: {
>     canDefer?: boolean | null,
>     scheduleDeadlineTime?: string | null,
>     startTime?: string | null,
>     canReschedule?: boolean | null
>   } | null,
>   outOfDiskReport?: {
>     sqlOutOfDiskState?: string | null,
>     sqlMinRecommendedIncreaseSizeGb?: number | null
>   } | null,
>   replicaNames?: string[] | null
> } | null
> ```

***

### backups.listBackups

`sql.backups.listBackups`

Lists all backups associated with the project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.backups.listBackups({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent that owns this collection of backups. Format: projects/\{project} Format: `projects/<id>`. |
| `filter` | `string` | No | Multiple filter queries are separated by spaces. For example, 'instance:abc AND type:FINAL, 'location:us', 'backupInterval.startTime>=1950-01-01T01:01:25.771Z'. You can filter by type, instance, backupInterval.startTime (creation time), or location. |
| `pageSize` | `number` | No | The maximum number of backups to return per response. The service might return fewer backups than this value. If a value for this parameter isn't specified, then, at most, 500 backups are returned. The maximum value is 2,000. Any values that you set, which are greater than 2,000, are changed to 2,000. |
| `pageToken` | `string` | No | A page token, received from a previous `ListBackups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBackups` must match the call that provided the page token. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, then there aren't subsequent pages. |
| `warnings` | `object[] \| null` | No | If a region isn't unavailable or if an unknown error occurs, then a warning message is returned. |
| `backups` | `object[] \| null` | No | A list of backups. |

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] backups full type
>
> ```ts theme={null}
> {
>   backupKind?: string | null,
>   name?: string | null,
>   type?: string | null,
>   instance?: string | null,
>   instanceDeletionTime?: string | null,
>   location?: string | null,
>   state?: string | null,
>   satisfiesPzs?: boolean | null,
>   backupRun?: string | null,
>   error?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   } | null,
>   ttlDays?: string | number | null,
>   kind?: string | null,
>   description?: string | null,
>   expiryTime?: string | null,
>   databaseVersion?: string | null,
>   maxChargeableBytes?: string | number | null,
>   kmsKey?: string | null,
>   satisfiesPzi?: boolean | null,
>   backupInterval?: {
>     startTime?: string | null,
>     endTime?: string | null
>   } | null,
>   timeZone?: string | null,
>   selfLink?: string | null,
>   kmsKeyVersion?: string | null,
>   instanceSettings?: {
>     secondaryGceZone?: string | null,
>     databaseInstalledVersion?: string | null,
>     currentDiskSize?: string | number | null,
>     ipAddresses?: {
>       ipAddress?: string | null,
>       timeToRetire?: string | null,
>       type?: string | null
>     }[] | null,
>     instanceType?: string | null,
>     sqlNetworkArchitecture?: string | null,
>     kind?: string | null,
>     connectionName?: string | null,
>     masterInstanceName?: string | null,
>     nodeCount?: number | null,
>     state?: string | null,
>     switchTransactionLogsToCloudStorageEnabled?: boolean | null,
>     serviceAccountEmailAddress?: string | null,
>     onPremisesConfiguration?: {
>       dumpFilePath?: string | null,
>       sslOption?: string | null,
>       password?: string | null,
>       kind?: string | null,
>       selectedObjects?: {
>         database?: string | null
>       }[] | null,
>       sourceInstance?: {
>         region?: string | null,
>         name?: string | null,
>         project?: string | null
>       } | null,
>       caCertificate?: string | null,
>       hostPort?: string | null,
>       username?: string | null,
>       clientKey?: string | null,
>       clientCertificate?: string | null,
>       dmsManaged?: boolean | null
>     } | null,
>     upgradableDatabaseVersions?: {
>       displayName?: string | null,
>       majorVersion?: string | null,
>       name?: string | null
>     }[] | null,
>     rootPassword?: string | null,
>     replicaConfiguration?: {
>       mysqlReplicaConfiguration?: {
>         sslCipher?: string | null,
>         username?: string | null,
>         clientCertificate?: string | null,
>         masterHeartbeatPeriod?: string | number | null,
>         clientKey?: string | null,
>         password?: string | null,
>         connectRetryInterval?: number | null,
>         kind?: string | null,
>         verifyServerCertificate?: boolean | null,
>         dumpFilePath?: string | null,
>         caCertificate?: string | null
>       } | null,
>       failoverTarget?: boolean | null,
>       kind?: string | null,
>       cascadableReplica?: boolean | null
>     } | null,
>     gceZone?: string | null,
>     ipv6Address?: string | null,
>     diskEncryptionConfiguration?: {
>       kmsKeyName?: string | null,
>       kind?: string | null,
>       confidentialMode?: boolean | null,
>       cmekSourceLogEncryptionEnforced?: boolean | null
>     } | null,
>     includeReplicasForMajorVersionUpgrade?: boolean | null,
>     name?: string | null,
>     dnsNames?: {
>       recordManager?: string | null,
>       dnsScope?: string | null,
>       name?: string | null,
>       connectionType?: string | null
>     }[] | null,
>     backendType?: string | null,
>     satisfiesPzi?: boolean | null,
>     project?: string | null,
>     primaryDnsName?: string | null,
>     deploymentInfo?: {
>       target?: {
>         sourceId?: {
>           region?: string | null,
>           name?: string | null,
>           project?: string | null
>         } | null
>       } | null,
>       deploymentId?: string | null,
>       state?: string | null,
>       source?: {
>         targetId?: {
>           region?: string | null,
>           name?: string | null,
>           project?: string | null
>         } | null
>       } | null
>     } | null,
>     dnsName?: string | null,
>     databaseCenterIntegration?: string | null,
>     writeEndpoint?: string | null,
>     settings?: {
>       dataDiskType?: string | null,
>       availabilityType?: string | null,
>       enableGoogleMlIntegration?: boolean | null,
>       dataDiskSizeGb?: string | number | null,
>       enableDataplexIntegration?: boolean | null,
>       dataDiskProvisionedIops?: string | number | null,
>       performanceCaptureConfig?: {
>         transactionKillExcludedUserHosts?: string[] | null,
>         probeThreshold?: number | null,
>         historyListLengthThresholdCount?: number | null,
>         transactionKillType?: string | null,
>         secondsBehindSourceThreshold?: number | null,
>         memoryUsageThresholdPercent?: number | null,
>         transactionLockWaitThresholdCount?: number | null,
>         transactionDurationThreshold?: number | null,
>         probingIntervalSeconds?: number | null,
>         enabled?: boolean | null,
>         runningThreadsThreshold?: number | null,
>         cpuUtilizationThresholdPercent?: number | null,
>         semaphoreWaitThresholdCount?: number | null,
>         transactionKillThresholdSeconds?: number | null
>       } | null,
>       retainBackupsOnDelete?: boolean | null,
>       sqlServerAuditConfig?: {
>         bucket?: string | null,
>         retentionInterval?: string | null,
>         kind?: string | null,
>         uploadInterval?: string | null
>       } | null,
>       timeZone?: string | null,
>       replicationType?: string | null,
>       replicationLagMaxSeconds?: number | null,
>       dataApiAccess?: string | null,
>       tier?: string | null,
>       backupConfiguration?: {
>         backupTier?: string | null,
>         enabled?: boolean | null,
>         backupRetentionSettings?: {
>           retainedBackups?: number | null,
>           retentionUnit?: string | null
>         } | null,
>         kind?: string | null,
>         transactionLogRetentionDays?: number | null,
>         location?: string | null,
>         startTime?: string | null,
>         transactionalLogStorageState?: string | null,
>         pointInTimeRecoveryEnabled?: boolean | null,
>         replicationLogArchivingEnabled?: boolean | null,
>         binaryLogEnabled?: boolean | null
>       } | null,
>       userLabels?: Record<string, string> | null,
>       autoUpgradeEnabled?: boolean | null,
>       pricingPlan?: string | null,
>       kind?: string | null,
>       dataCacheConfig?: {
>         dataCacheEnabled?: boolean | null
>       } | null,
>       readPoolAutoScaleConfig?: {
>         disableScaleIn?: boolean | null,
>         targetMetrics?: {
>           targetValue?: number | null,
>           metric?: string | null
>         }[] | null,
>         scaleInCooldownSeconds?: number | null,
>         maxNodeCount?: number | null,
>         scaleOutCooldownSeconds?: number | null,
>         minNodeCount?: number | null,
>         enabled?: boolean | null
>       } | null,
>       collation?: string | null,
>       activeDirectoryConfig?: {
>         mode?: string | null,
>         dnsServers?: string[] | null,
>         domain?: string | null,
>         kind?: string | null,
>         organizationalUnit?: string | null,
>         adminCredentialSecretName?: string | null
>       } | null,
>       edition?: string | null,
>       crashSafeReplicationEnabled?: boolean | null,
>       locationPreference?: {
>         zone?: string | null,
>         followGaeApplication?: string | null,
>         kind?: string | null,
>         secondaryZone?: string | null
>       } | null,
>       insightsConfig?: {
>         queryPlansPerMinute?: number | null,
>         queryInsightsEnabled?: boolean | null,
>         recordApplicationTags?: boolean | null,
>         queryStringLength?: number | null,
>         recordClientAddress?: boolean | null,
>         enhancedQueryInsightsEnabled?: boolean | null
>       } | null,
>       maintenanceWindow?: {
>         kind?: string | null,
>         updateTrack?: string | null,
>         day?: number | null,
>         hour?: number | null
>       } | null,
>       denyMaintenancePeriods?: {
>         startDate?: string | null,
>         endDate?: string | null,
>         time?: string | null
>       }[] | null,
>       databaseFlags?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null,
>       databaseReplicationEnabled?: boolean | null,
>       authorizedGaeApplications?: string[] | null,
>       storageAutoResizeLimit?: string | number | null,
>       connectorEnforcement?: string | null,
>       ipConfiguration?: {
>         ipv4Enabled?: boolean | null,
>         requireSsl?: boolean | null,
>         pscConfig?: {
>           pscWriteEndpointDnsEnabled?: boolean | null,
>           pscAutoConnectionPolicyEnabled?: boolean | null,
>           pscAutoConnections?: {
>             writeEndpointAutoDnsStatus?: string | null,
>             serviceConnectionPolicyCreationResult?: string | null,
>             consumerNetworkStatus?: string | null,
>             status?: string | null,
>             ipAddress?: string | null,
>             consumerProject?: string | null,
>             instanceAutoDnsStatus?: string | null,
>             serviceConnectionPolicy?: string | null,
>             consumerNetwork?: string | null
>           }[] | null,
>           allowedConsumerProjects?: string[] | null,
>           networkAttachmentUri?: string | null,
>           pscEnabled?: boolean | null,
>           pscAutoDnsEnabled?: boolean | null
>         } | null,
>         serverCaMode?: string | null,
>         enablePrivatePathForGoogleCloudServices?: boolean | null,
>         customSubjectAlternativeNames?: string[] | null,
>         privateNetwork?: string | null,
>         sslMode?: string | null,
>         serverCertificateRotationMode?: string | null,
>         authorizedNetworks?: {
>           kind?: string | null,
>           value?: string | null,
>           expirationTime?: string | null,
>           name?: string | null
>         }[] | null,
>         allocatedIpRange?: string | null,
>         serverCaPool?: string | null
>       } | null,
>       entraidConfig?: {
>         tenantId?: string | null,
>         kind?: string | null,
>         applicationId?: string | null
>       } | null,
>       passwordValidationPolicy?: {
>         minLength?: number | null,
>         enablePasswordPolicy?: boolean | null,
>         disallowUsernameSubstring?: boolean | null,
>         passwordChangeInterval?: string | null,
>         disallowCompromisedCredentials?: boolean | null,
>         reuseInterval?: number | null,
>         complexity?: string | null
>       } | null,
>       finalBackupConfig?: {
>         enabled?: boolean | null,
>         retentionDays?: number | null
>       } | null,
>       dataDiskProvisionedThroughput?: string | number | null,
>       advancedMachineFeatures?: {
>         threadsPerCore?: number | null
>       } | null,
>       storageAutoResize?: boolean | null,
>       activationPolicy?: string | null,
>       settingsVersion?: string | number | null,
>       acceleratedReplicaMode?: boolean | null,
>       deletionProtectionEnabled?: boolean | null,
>       connectionPoolConfig?: {
>         poolerCount?: number | null,
>         connectionPoolingEnabled?: boolean | null,
>         flags?: {
>           value?: string | null,
>           name?: string | null
>         }[] | null
>       } | null
>     } | null,
>     satisfiesPzs?: boolean | null,
>     selfLink?: string | null,
>     databaseCenterIntegrationEnabled?: boolean | null,
>     diskEncryptionStatus?: {
>       kmsKeyVersionName?: string | null,
>       kind?: string | null
>     } | null,
>     serverCaCert?: {
>       kind?: string | null,
>       cert?: string | null,
>       commonName?: string | null,
>       createTime?: string | null,
>       expirationTime?: string | null,
>       instance?: string | null,
>       certSerialNumber?: string | null,
>       selfLink?: string | null,
>       sha1Fingerprint?: string | null
>     } | null,
>     replicationCluster?: {
>       psaWriteEndpoint?: string | null,
>       drReplica?: boolean | null,
>       failoverDrReplicaName?: string | null
>     } | null,
>     etag?: string | null,
>     geminiConfig?: {
>       flagRecommenderEnabled?: boolean | null,
>       activeQueryEnabled?: boolean | null,
>       googleVacuumMgmtEnabled?: boolean | null,
>       oomSessionCancelEnabled?: boolean | null,
>       indexAdvisorEnabled?: boolean | null,
>       entitled?: boolean | null
>     } | null,
>     nodes?: {
>       ipAddresses?: {
>         ipAddress?: string | null,
>         timeToRetire?: string | null,
>         type?: string | null
>       }[] | null,
>       dnsNames?: {
>         recordManager?: string | null,
>         dnsScope?: string | null,
>         name?: string | null,
>         connectionType?: string | null
>       }[] | null,
>       dnsName?: string | null,
>       state?: string | null,
>       gceZone?: string | null,
>       pscServiceAttachmentLink?: string | null,
>       name?: string | null,
>       pscAutoConnections?: {
>         writeEndpointAutoDnsStatus?: string | null,
>         serviceConnectionPolicyCreationResult?: string | null,
>         consumerNetworkStatus?: string | null,
>         status?: string | null,
>         ipAddress?: string | null,
>         consumerProject?: string | null,
>         instanceAutoDnsStatus?: string | null,
>         serviceConnectionPolicy?: string | null,
>         consumerNetwork?: string | null
>       }[] | null
>     }[] | null,
>     maintenanceVersion?: string | null,
>     maxDiskSize?: string | number | null,
>     createTime?: string | null,
>     failoverReplica?: {
>       name?: string | null,
>       available?: boolean | null
>     } | null,
>     skipPrecheck?: boolean | null,
>     databaseVersion?: string | null,
>     availableMaintenanceVersions?: string[] | null,
>     suspensionReason?: string[] | null,
>     region?: string | null,
>     tags?: Record<string, string> | null,
>     pscServiceAttachmentLink?: string | null,
>     scheduledMaintenance?: {
>       canDefer?: boolean | null,
>       scheduleDeadlineTime?: string | null,
>       startTime?: string | null,
>       canReschedule?: boolean | null
>     } | null,
>     outOfDiskReport?: {
>       sqlOutOfDiskState?: string | null,
>       sqlMinRecommendedIncreaseSizeGb?: number | null
>     } | null,
>     replicaNames?: string[] | null
>   } | null
> }[] | null
> ```

***

### backups.updateBackup

`sql.backups.updateBackup`

Updates the retention period and description of the backup. You can use this API to update final backups only

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.backups.updateBackup({ name: 'projects/demo-project/backups/backup-1', updateMask: 'description', description: 'Kept for audit' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Output only. The resource name of the backup. Format: projects/\{project}/backups/\{backup}. Format: `projects/<id>/backups/<id>`. |
| `updateMask` | `string` | No | The list of fields that you can update. You can update only the description and retention period of the final backup. |
| `instance` | `string` | No | The name of the source database instance. |
| `location` | `string` | No | The storage location of the backups. The location can be multi-regional. |
| `ttlDays` | `string \| number` | No | Input only. The time-to-live (TTL) interval for this resource (in days). For example: ttlDays:7, means 7 days from the current time. The expiration time can't exceed 365 days from the time that the backup is created. |
| `description` | `string` | No | The description of this backup. |
| `expiryTime` | `string` | No | Backup expiration time. A UTC timestamp of when this backup expired. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### blueGreenDeployments.create

`sql.blueGreenDeployments.create`

Creates a blue-green deployment under a given project and location

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.blueGreenDeployments.create({
	parent: 'projects/demo-project/locations/us-central1',
	blueGreenDeploymentId: 'pg18',
	sourceInstance: 'projects/demo-project/instances/app-db',
	requestedConfig: { databaseVersion: 'POSTGRES_18' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource where this blue-green deployment will be created. Format: projects/\{project}/locations/\{location} Format: `projects/<id>/locations/<id>`. |
| `blueGreenDeploymentId` | `string` | No | Required. The ID to use for the blue-green deployment, which will become the final component of the deployment's resource name. The ID must be unique within the given project and location and between 2-63 characters. |
| `sourceInstance` | `string` | No | Required. Immutable. Required on create, and immutable. The full resource name of the source instance (the "blue" instance). Format: projects/\{project}/instances/\{instance} |
| `requestedConfig` | `object` | No | Configuration specified by the user at creation time for the target (green) instance. |
| `description` | `string` | No | Optional. User-provided description for the deployment. The description can be up to 255 characters long. |

> [accordion] requestedConfig full type
>
> ```ts theme={null}
> {
>   databaseVersion?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### blueGreenDeployments.delete

`sql.blueGreenDeployments.delete`

Deletes a blue-green deployment

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.blueGreenDeployments.delete({ name: 'projects/demo-project/locations/us-central1/blueGreenDeployments/pg18' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deleteOldSource` | `boolean` | No | Optional. If set to true, and the switchover is complete, this deletes the old source instance along with the deployment. |
| `name` | `string` | Yes | Required. The name of the blue-green deployment to delete. Format: projects/\{project}/locations/\{location}/blueGreenDeployments/\{blue\_green\_deployment} Format: `projects/<id>/locations/<id>/blueGreenDeployments/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### blueGreenDeployments.get

`sql.blueGreenDeployments.get`

Retrieves a blue-green deployment resource under a given project and location

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.blueGreenDeployments.get({ name: 'projects/demo-project/locations/us-central1/blueGreenDeployments/pg18' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the blue-green deployment to retrieve. Format: projects/\{project}/locations/\{location}/blueGreenDeployments/\{blue\_green\_deployment} Format: `projects/<id>/locations/<id>/blueGreenDeployments/<id>`. |
| `view` | `BLUE_GREEN_DEPLOYMENT_VIEW_UNSPECIFIED \| BASIC \| DETAILED` | No | Optional. Specifies whether to return the basic or detailed view of the resource in the response. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `switchoverTargetInstance` | `string \| null` | No | Output only. The full resource name of the primary target instance (the "green" instance) that will be promoted during switchover. This field is always populated once the deployment is created. Format: projects/\{project}/instances/\{instance} |
| `sourceInstance` | `string \| null` | No | Required. Immutable. Required on create, and immutable. The full resource name of the source instance (the "blue" instance). Format: projects/\{project}/instances/\{instance} |
| `deploymentMappings` | `object[] \| null` | No | Output only. A list representing the pairs of source and target instances in the deployment. |
| `deploymentTasks` | `object \| null` | No | Combined list of tasks for all paired nodes in the deployment. |
| `errorDetail` | `string \| null` | No | Output only. Provides details on why switchover is not possible. This field is empty unless a switchover attempt failed or the state is `SWITCHOVER_NOT_READY`. Example: "The target database version does not match the source instance database version." |
| `requestedConfig` | `object \| null` | No | Configuration specified by the user at creation time for the target (green) instance. |
| `state` | `string \| null` | No | Output only. The current state of the blue-green deployment. |
| `name` | `string \| null` | No | Output only. Identifier. The full resource name of the deployment. Format: projects/\{project}/locations/\{location}/blueGreenDeployments/\{deployment\_id} |
| `createTime` | `string \| null` | No | Output only. The time when the deployment was created. Example: `2024-01-01T00:00:00Z` |
| `description` | `string \| null` | No | Optional. User-provided description for the deployment. The description can be up to 255 characters long. |

> [accordion] deploymentMappings full type
>
> ```ts theme={null}
> {
>   target?: {
>     ipMappings?: {
>       ipAddress?: string | null,
>       timeToRetire?: string | null,
>       type?: string | null
>     }[] | null,
>     dns?: string | null,
>     connection?: string | null,
>     instance?: string | null
>   } | null,
>   diffs?: {
>     field?: string | null,
>     targetValue?: string | null,
>     sourceValue?: string | null
>   }[] | null,
>   state?: string | null,
>   source?: {
>     ipMappings?: {
>       ipAddress?: string | null,
>       timeToRetire?: string | null,
>       type?: string | null
>     }[] | null,
>     dns?: string | null,
>     connection?: string | null,
>     instance?: string | null
>   } | null
> }[] | null
> ```

> [accordion] deploymentTasks full type
>
> ```ts theme={null}
> {
>   task?: {
>     startTime?: string | null,
>     endTime?: string | null,
>     type?: string | null,
>     state?: string | null,
>     errorMessage?: string | null
>   }[] | null
> } | null
> ```

> [accordion] requestedConfig full type
>
> ```ts theme={null}
> {
>   databaseVersion?: string | null
> } | null
> ```

***

### blueGreenDeployments.list

`sql.blueGreenDeployments.list`

Lists blue-green deployments under a given project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.blueGreenDeployments.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderBy` | `string` | No | Optional. A comma-separated list of fields to order the results by. |
| `filter` | `string` | No | Optional. A filter expression that filters the results. |
| `parent` | `string` | Yes | Required. The parent resource whose blue-green deployments are to be listed. Format: projects/\{project}/locations/\{location} Format: `projects/<id>/locations/<id>`. |
| `pageSize` | `number` | No | Optional. The maximum number of deployments to return. The service may return fewer deployments than this value. If unspecified, at most 500 deployments are returned. The maximum value is 1000; values above 1000 are treated as 1000. |
| `pageToken` | `string` | No | Optional. A page token, received from a previous `ListBlueGreenDeployments` call. Provide this to retrieve the subsequent page. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of results, or empty if there are no more results. |
| `blueGreenDeployments` | `object[] \| null` | No | The list of blue-green deployment resources. |

> [accordion] blueGreenDeployments full type
>
> ```ts theme={null}
> {
>   switchoverTargetInstance?: string | null,
>   sourceInstance?: string | null,
>   deploymentMappings?: {
>     target?: {
>       ipMappings?: {
>         ipAddress?: string | null,
>         timeToRetire?: string | null,
>         type?: string | null
>       }[] | null,
>       dns?: string | null,
>       connection?: string | null,
>       instance?: string | null
>     } | null,
>     diffs?: {
>       field?: string | null,
>       targetValue?: string | null,
>       sourceValue?: string | null
>     }[] | null,
>     state?: string | null,
>     source?: {
>       ipMappings?: {
>         ipAddress?: string | null,
>         timeToRetire?: string | null,
>         type?: string | null
>       }[] | null,
>       dns?: string | null,
>       connection?: string | null,
>       instance?: string | null
>     } | null
>   }[] | null,
>   deploymentTasks?: {
>     task?: {
>       startTime?: string | null,
>       endTime?: string | null,
>       type?: string | null,
>       state?: string | null,
>       errorMessage?: string | null
>     }[] | null
>   } | null,
>   errorDetail?: string | null,
>   requestedConfig?: {
>     databaseVersion?: string | null
>   } | null,
>   state?: string | null,
>   name?: string | null,
>   createTime?: string | null,
>   description?: string | null
> }[] | null
> ```

***

### blueGreenDeployments.switchover

`sql.blueGreenDeployments.switchover`

Switches over to green instance for a blue-green deployment

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.blueGreenDeployments.switchover({ name: 'projects/demo-project/locations/us-central1/blueGreenDeployments/pg18' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the blue-green deployment to switch over. Format: projects/\{project}/locations/\{location}/blueGreenDeployments/\{blue\_green\_deployment} Format: `projects/<id>/locations/<id>/blueGreenDeployments/<id>`. |
| `body` | `object` | No | Request message for switching over a `BlueGreenDeployment` resource. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### connect.generateEphemeral

`sql.connect.generateEphemeral`

Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.connect.generateEphemeral({ instance: 'app-db', project: 'demo-project', public_key: 'the client public key in PEM' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `readTime` | `string` | No | Optional. Optional snapshot read timestamp to trade freshness for performance. |
| `public_key` | `string` | No | PEM encoded public key to include in the signed certificate. |
| `access_token` | `string` | No | Optional. Access token to include in the signed certificate. |
| `validDuration` | `string` | No | Optional. If set, it will contain the cert valid duration. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ephemeralCert` | `object \| null` | No | SslCerts Resource |

> [accordion] ephemeralCert full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> } | null
> ```

***

### connect.get

`sql.connect.get`

Retrieves connect settings about a Cloud SQL instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.connect.get({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `readTime` | `string` | No | Optional. Optional snapshot read timestamp to trade freshness for performance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nodes` | `object[] \| null` | No | Output only. Entries containing information about each read pool node of the read pool. |
| `serverCaCert` | `object \| null` | No | SslCerts Resource |
| `pscEnabled` | `boolean \| null` | No | Whether PSC connectivity is enabled for this instance. |
| `kind` | `string \| null` | No | This is always `sql#connectSettings`. |
| `backendType` | `string \| null` | No | `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type. |
| `dnsName` | `string \| null` | No | The dns name of the instance. |
| `ipAddresses` | `object[] \| null` | No | The assigned IP addresses for the instance. |
| `connectionName` | `string \| null` | No | Optional. Output only. Connection name of the Cloud SQL instance used in connection strings, in the format project:region:instance. |
| `dnsNames` | `object[] \| null` | No | Output only. The list of DNS names used by this instance. |
| `customSubjectAlternativeNames` | `string[] \| null` | No | Custom subject alternative names for the server certificate. |
| `serverCaMode` | `string \| null` | No | Specify what type of CA is used for the server certificate. |
| `nodeCount` | `number \| null` | No | The number of read pool nodes in a read pool. |
| `databaseVersion` | `string \| null` | No | The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`. |
| `region` | `string \| null` | No | The cloud region for the instance. For example, `us-central1`, `europe-west1`. The region cannot be changed after instance creation. |
| `mdxProtocolSupport` | `string[] \| null` | No | Optional. Output only. mdx\_protocol\_support controls how the client uses metadata exchange when connecting to the instance. The values in the list representing parts of the MDX protocol that are supported by this instance. When the list is empty, the instance does not support MDX, so the client must not send an MDX request. The default is empty. |

> [accordion] nodes full type
>
> ```ts theme={null}
> {
>   dnsName?: string | null,
>   ipAddresses?: {
>     ipAddress?: string | null,
>     timeToRetire?: string | null,
>     type?: string | null
>   }[] | null,
>   dnsNames?: {
>     recordManager?: string | null,
>     dnsScope?: string | null,
>     name?: string | null,
>     connectionType?: string | null
>   }[] | null,
>   name?: string | null
> }[] | null
> ```

> [accordion] serverCaCert full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> } | null
> ```

> [accordion] ipAddresses full type
>
> ```ts theme={null}
> {
>   ipAddress?: string | null,
>   timeToRetire?: string | null,
>   type?: string | null
> }[] | null
> ```

> [accordion] dnsNames full type
>
> ```ts theme={null}
> {
>   recordManager?: string | null,
>   dnsScope?: string | null,
>   name?: string | null,
>   connectionType?: string | null
> }[] | null
> ```

***

### connect.resolve

`sql.connect.resolve`

Retrieves connect settings about a Cloud SQL instance using the instance DNS name

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.connect.resolve({ location: 'us-central1', dnsName: 'app-db.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | Yes | Required. The region of the instance. |
| `dnsName` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nodes` | `object[] \| null` | No | Output only. Entries containing information about each read pool node of the read pool. |
| `serverCaCert` | `object \| null` | No | SslCerts Resource |
| `pscEnabled` | `boolean \| null` | No | Whether PSC connectivity is enabled for this instance. |
| `kind` | `string \| null` | No | This is always `sql#connectSettings`. |
| `backendType` | `string \| null` | No | `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type. |
| `dnsName` | `string \| null` | No | The dns name of the instance. |
| `ipAddresses` | `object[] \| null` | No | The assigned IP addresses for the instance. |
| `connectionName` | `string \| null` | No | Optional. Output only. Connection name of the Cloud SQL instance used in connection strings, in the format project:region:instance. |
| `dnsNames` | `object[] \| null` | No | Output only. The list of DNS names used by this instance. |
| `customSubjectAlternativeNames` | `string[] \| null` | No | Custom subject alternative names for the server certificate. |
| `serverCaMode` | `string \| null` | No | Specify what type of CA is used for the server certificate. |
| `nodeCount` | `number \| null` | No | The number of read pool nodes in a read pool. |
| `databaseVersion` | `string \| null` | No | The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`. |
| `region` | `string \| null` | No | The cloud region for the instance. For example, `us-central1`, `europe-west1`. The region cannot be changed after instance creation. |
| `mdxProtocolSupport` | `string[] \| null` | No | Optional. Output only. mdx\_protocol\_support controls how the client uses metadata exchange when connecting to the instance. The values in the list representing parts of the MDX protocol that are supported by this instance. When the list is empty, the instance does not support MDX, so the client must not send an MDX request. The default is empty. |

> [accordion] nodes full type
>
> ```ts theme={null}
> {
>   dnsName?: string | null,
>   ipAddresses?: {
>     ipAddress?: string | null,
>     timeToRetire?: string | null,
>     type?: string | null
>   }[] | null,
>   dnsNames?: {
>     recordManager?: string | null,
>     dnsScope?: string | null,
>     name?: string | null,
>     connectionType?: string | null
>   }[] | null,
>   name?: string | null
> }[] | null
> ```

> [accordion] serverCaCert full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> } | null
> ```

> [accordion] ipAddresses full type
>
> ```ts theme={null}
> {
>   ipAddress?: string | null,
>   timeToRetire?: string | null,
>   type?: string | null
> }[] | null
> ```

> [accordion] dnsNames full type
>
> ```ts theme={null}
> {
>   recordManager?: string | null,
>   dnsScope?: string | null,
>   name?: string | null,
>   connectionType?: string | null
> }[] | null
> ```

***

### databases.delete

`sql.databases.delete`

Deletes a database from a Cloud SQL instance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.databases.delete({ database: 'app', instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `database` | `string` | Yes | Name of the database to be deleted in the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### databases.get

`sql.databases.get`

Retrieves a resource containing information about a database inside a Cloud SQL instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.databases.get({ project: 'demo-project', database: 'app', instance: 'app-db' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `database` | `string` | Yes | Name of the database in the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `collation` | `string \| null` | No | The Cloud SQL collation value. |
| `etag` | `string \| null` | No | This field is deprecated and will be removed from a future version of the API. |
| `instance` | `string \| null` | No | The name of the Cloud SQL instance. This does not include the project ID. |
| `project` | `string \| null` | No | The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| `name` | `string \| null` | No | The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| `sqlserverDatabaseDetails` | `object \| null` | No | Represents a Sql Server database on the Cloud SQL instance. |
| `kind` | `string \| null` | No | This is always `sql#database`. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `charset` | `string \| null` | No | The Cloud SQL charset value. |

> [accordion] sqlserverDatabaseDetails full type
>
> ```ts theme={null}
> {
>   recoveryModel?: string | null,
>   compatibilityLevel?: number | null
> } | null
> ```

***

### databases.insert

`sql.databases.insert`

Inserts a resource containing information about a database inside a Cloud SQL instance. **Note:** You can't modify the default character set and collation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.databases.insert({
	project: 'demo-project',
	instance: 'app-db',
	name: 'app',
	charset: 'UTF8',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |
| `collation` | `string` | No | The Cloud SQL collation value. |
| `etag` | `string` | No | This field is deprecated and will be removed from a future version of the API. |
| `body_instance` | `string` | No | The name of the Cloud SQL instance. This does not include the project ID. |
| `body_project` | `string` | No | The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| `name` | `string` | No | The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| `sqlserverDatabaseDetails` | `object` | No | Represents a Sql Server database on the Cloud SQL instance. |
| `kind` | `string` | No | This is always `sql#database`. |
| `selfLink` | `string` | No | The URI of this resource. |
| `charset` | `string` | No | The Cloud SQL charset value. |

> [accordion] sqlserverDatabaseDetails full type
>
> ```ts theme={null}
> {
>   recoveryModel?: string,
>   compatibilityLevel?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### databases.list

`sql.databases.list`

Lists databases in the specified Cloud SQL instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.databases.list({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | List of database resources in the instance. |
| `kind` | `string \| null` | No | This is always `sql#databasesList`. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   collation?: string | null,
>   etag?: string | null,
>   instance?: string | null,
>   project?: string | null,
>   name?: string | null,
>   sqlserverDatabaseDetails?: {
>     recoveryModel?: string | null,
>     compatibilityLevel?: number | null
>   } | null,
>   kind?: string | null,
>   selfLink?: string | null,
>   charset?: string | null
> }[] | null
> ```

***

### databases.patch

`sql.databases.patch`

Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.databases.patch({
	database: 'app',
	instance: 'app-db',
	project: 'demo-project',
	charset: 'UTF8',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `database` | `string` | Yes | Name of the database to be updated in the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `collation` | `string` | No | The Cloud SQL collation value. |
| `etag` | `string` | No | This field is deprecated and will be removed from a future version of the API. |
| `body_instance` | `string` | No | The name of the Cloud SQL instance. This does not include the project ID. |
| `body_project` | `string` | No | The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| `name` | `string` | No | The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| `sqlserverDatabaseDetails` | `object` | No | Represents a Sql Server database on the Cloud SQL instance. |
| `kind` | `string` | No | This is always `sql#database`. |
| `selfLink` | `string` | No | The URI of this resource. |
| `charset` | `string` | No | The Cloud SQL charset value. |

> [accordion] sqlserverDatabaseDetails full type
>
> ```ts theme={null}
> {
>   recoveryModel?: string,
>   compatibilityLevel?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### databases.update

`sql.databases.update`

Updates a resource containing information about a database inside a Cloud SQL instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.databases.update({
	instance: 'app-db',
	project: 'demo-project',
	database: 'app',
	charset: 'UTF8',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `database` | `string` | Yes | Name of the database to be updated in the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `collation` | `string` | No | The Cloud SQL collation value. |
| `etag` | `string` | No | This field is deprecated and will be removed from a future version of the API. |
| `body_instance` | `string` | No | The name of the Cloud SQL instance. This does not include the project ID. |
| `body_project` | `string` | No | The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| `name` | `string` | No | The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| `sqlserverDatabaseDetails` | `object` | No | Represents a Sql Server database on the Cloud SQL instance. |
| `kind` | `string` | No | This is always `sql#database`. |
| `selfLink` | `string` | No | The URI of this resource. |
| `charset` | `string` | No | The Cloud SQL charset value. |

> [accordion] sqlserverDatabaseDetails full type
>
> ```ts theme={null}
> {
>   recoveryModel?: string,
>   compatibilityLevel?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### flags.list

`sql.flags.list`

Lists all available database flags for Cloud SQL instances

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.flags.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `flagScope` | `SQL_FLAG_SCOPE_UNSPECIFIED \| SQL_FLAG_SCOPE_DATABASE \| SQL_FLAG_SCOPE_CONNECTION_POOL` | No | Optional. Specify the scope of flags to be returned by SqlFlagsListService. Return list of database flags if unspecified. |
| `databaseVersion` | `string` | No | Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | This is always `sql#flagsList`. |
| `items` | `object[] \| null` | No | List of flags. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   flagScope?: string | null,
>   minValue?: string | number | null,
>   maxValue?: string | number | null,
>   inBeta?: boolean | null,
>   requiresRestart?: boolean | null,
>   kind?: string | null,
>   recommendedStringValue?: string | null,
>   allowedStringValues?: string[] | null,
>   recommendedIntValue?: string | number | null,
>   name?: string | null,
>   type?: string | null,
>   appliesTo?: string[] | null,
>   allowedIntValues?: (string | number)[] | null
> }[] | null
> ```

***

### instances.acquireSsrsLease

`sql.instances.acquireSsrsLease`

Acquire a lease for the setup of SQL Server Reporting Services (SSRS)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.acquireSsrsLease({
	instance: 'app-db',
	project: 'demo-project',
	acquireSsrsLeaseContext: { setupLogin: 'setup', serviceLogin: 'ssrs', reportDatabase: 'ReportServer' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This doesn't include the project ID. It's composed of lowercase letters, numbers, and hyphens, and it must start with a letter. The total length must be 98 characters or less (Example: instance-id). |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance (Example: project-id). |
| `acquireSsrsLeaseContext` | `object` | No | Acquire SSRS lease context. |

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string,
>   reportDatabase?: string,
>   setupLogin?: string,
>   duration?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operationId` | `string \| null` | No | The unique identifier for this operation. |

***

### instances.addEntraIdCertificate

`sql.instances.addEntraIdCertificate`

Adds a new Entra ID certificate for the specified instance. If an Entra ID certificate was previously added but never used in a certificate rotation, this operation replaces that version

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.addEntraIdCertificate({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.addServerCa

`sql.instances.addServerCa`

Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.addServerCa({ project: 'demo-project', instance: 'app-db' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.addServerCertificate

`sql.instances.addServerCertificate`

Add a new trusted server certificate version for the specified instance using Certificate Authority Service (CAS) server CA. Required to prepare for a certificate rotation

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.addServerCertificate({ project: 'demo-project', instance: 'app-db' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.clone

`sql.instances.clone`

Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.clone({
	project: 'demo-project',
	instance: 'app-db',
	cloneContext: { destinationInstanceName: 'app-db-copy' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Required. Project ID of the source Cloud SQL instance. |
| `instance` | `string` | Yes | Required. The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. |
| `cloneContext` | `object` | No | Database instance clone context. |

> [accordion] cloneContext full type
>
> ```ts theme={null}
> {
>   sourceInstanceDeletionTime?: string,
>   allocatedIpRange?: string,
>   binLogCoordinates?: {
>     binLogPosition?: string | number,
>     binLogFileName?: string,
>     kind?: string
>   },
>   preferredSecondaryZone?: string,
>   kind?: string,
>   destinationNetwork?: string,
>   databaseNames?: string[],
>   destinationProject?: string,
>   preferredZone?: string,
>   destinationInstanceName?: string,
>   pointInTime?: string,
>   pitrTimestampMs?: string | number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.delete

`sql.instances.delete`

Deletes a Cloud SQL instance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.instances.delete({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `finalBackupTtlDays` | `string \| number` | No | Optional. Retention period of the final backup. |
| `finalBackupExpiryTime` | `string` | No | Optional. Final Backup expiration time. Timestamp in UTC of when this resource is considered expired. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `enableFinalBackup` | `boolean` | No | Flag to opt-in for final backup. By default, it is turned off. |
| `project` | `string` | Yes | Project ID of the project that contains the instance to be deleted. |
| `finalBackupDescription` | `string` | No | Optional. The description of the final backup. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.demote

`sql.instances.demote`

Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.demote({
	project: 'demo-project',
	instance: 'app-db',
	demoteContext: { sourceRepresentativeInstanceName: 'on-prem' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Required. ID of the project that contains the instance. |
| `instance` | `string` | Yes | Required. Cloud SQL instance name. |
| `demoteContext` | `object` | No | This context is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server. |

> [accordion] demoteContext full type
>
> ```ts theme={null}
> {
>   sourceRepresentativeInstanceName?: string,
>   kind?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.demoteMaster

`sql.instances.demoteMaster`

Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.demoteMaster({
	project: 'demo-project',
	instance: 'app-db',
	demoteMasterContext: { masterInstanceName: 'on-prem' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance name. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `demoteMasterContext` | `object` | No | Database instance demote primary instance context. |

> [accordion] demoteMasterContext full type
>
> ```ts theme={null}
> {
>   kind?: string,
>   masterInstanceName?: string,
>   replicaConfiguration?: {
>     kind?: string,
>     mysqlReplicaConfiguration?: {
>       clientKey?: string,
>       caCertificate?: string,
>       clientCertificate?: string,
>       kind?: string,
>       username?: string,
>       password?: string
>     }
>   },
>   skipReplicationSetup?: boolean,
>   verifyGtidConsistency?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.executeSql

`sql.instances.executeSql`

Execute SQL statements

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.executeSql({
	instance: 'app-db',
	project: 'demo-project',
	user: 'app',
	database: 'app',
	sqlStatement: 'SELECT count(*) FROM orders',
	rowLimit: '100',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. Database instance ID. This does not include the project ID. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `partialResultMode` | `PARTIAL_RESULT_MODE_UNSPECIFIED \| FAIL_PARTIAL_RESULT \| ALLOW_PARTIAL_RESULT` | No | Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error. |
| `database` | `string` | No | Optional. Name of the database on which the statement will be executed. For Postgres and SQL Server it's required, for MySQL it's optional. |
| `rowLimit` | `string \| number` | No | Optional. The maximum number of rows returned per SQL statement. |
| `sqlStatement` | `string` | No | Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons. |
| `autoIamAuthn` | `boolean` | No | Optional. When set to `true`, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database. |
| `user` | `string` | No | Optional. The name of an existing database user to connect to the database. When `auto_iam_authn` is set to true, this field is ignored and the API caller's IAM user is used. |
| `application` | `string` | No | Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters. |
| `passwordSecretVersion` | `string` | No | Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}`. Used together with the `user` field. The secret resource name will not be stored. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `object \| null` | No | The additional metadata information regarding the execution of the SQL statements. |
| `results` | `object[] \| null` | No | The list of results after executing all the SQL statements. |
| `messages` | `object[] \| null` | No | A list of notices and warnings generated during query execution. For PostgreSQL, this includes all notices and warnings. For MySQL, this includes warnings generated by the last executed statement. To retrieve all warnings for a multi-statement query, `SHOW WARNINGS` must be executed after each statement. |

> [accordion] status full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   sqlStatementExecutionTime?: string | null
> } | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   rows?: {
>     values?: {
>       nullValue?: boolean | null,
>       value?: string | null
>     }[] | null
>   }[] | null,
>   message?: string | null,
>   columns?: {
>     name?: string | null,
>     type?: string | null
>   }[] | null,
>   status?: {
>     message?: string | null,
>     details?: Record<string, any>[] | null,
>     code?: number | null
>   } | null,
>   partialResult?: boolean | null
> }[] | null
> ```

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   severity?: string | null
> }[] | null
> ```

***

### instances.export

`sql.instances.export`

Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.export({
	instance: 'app-db',
	project: 'demo-project',
	exportContext: {
		fileType: 'SQL',
		uri: 'gs://demo-bucket/app.sql.gz',
		databases: ['app'],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance to be exported. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `exportContext` | `object` | No | Database instance export context. |

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string,
>     striped?: boolean,
>     differentialBase?: boolean,
>     exportLogEndTime?: string,
>     bakType?: BAK_TYPE_UNSPECIFIED | FULL | DIFF | TLOG,
>     stripeCount?: number,
>     copyOnly?: boolean
>   },
>   kind?: string,
>   uri?: string,
>   fileType?: SQL_FILE_TYPE_UNSPECIFIED | SQL | CSV | BAK | TDE,
>   csvExportOptions?: {
>     linesTerminatedBy?: string,
>     fieldsTerminatedBy?: string,
>     selectQuery?: string,
>     quoteCharacter?: string,
>     escapeCharacter?: string
>   },
>   sqlExportOptions?: {
>     schemaOnly?: boolean,
>     threads?: number,
>     parallel?: boolean,
>     tables?: string[],
>     mysqlExportOptions?: {
>       masterData?: number
>     },
>     postgresExportOptions?: {
>       clean?: boolean,
>       ifExists?: boolean
>     }
>   },
>   tdeExportOptions?: {
>     privateKeyPassword?: string,
>     privateKeyPath?: string,
>     name?: string,
>     certificatePath?: string
>   },
>   databases?: string[],
>   offload?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.failover

`sql.instances.failover`

Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.failover({
	project: 'demo-project',
	instance: 'app-db',
	failoverContext: { settingsVersion: '12' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | ID of the project that contains the read replica. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `failoverContext` | `object` | No | Database instance failover context. |

> [accordion] failoverContext full type
>
> ```ts theme={null}
> {
>   settingsVersion?: string | number,
>   kind?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.get

`sql.instances.get`

Retrieves a resource containing information about a Cloud SQL instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.get({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. Database instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `secondaryGceZone` | `string \| null` | No | The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. |
| `databaseInstalledVersion` | `string \| null` | No | Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`. |
| `currentDiskSize` | `string \| number \| null` | No | The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes\_used" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details. |
| `ipAddresses` | `object[] \| null` | No | The assigned IP addresses for the instance. |
| `instanceType` | `string \| null` | No | The instance type. |
| `sqlNetworkArchitecture` | `string \| null` | No | — |
| `kind` | `string \| null` | No | This is always `sql#instance`. |
| `connectionName` | `string \| null` | No | Connection name of the Cloud SQL instance used in connection strings. |
| `masterInstanceName` | `string \| null` | No | The name of the instance which will act as primary in the replication setup. |
| `nodeCount` | `number \| null` | No | The number of read pool nodes in a read pool. |
| `state` | `string \| null` | No | The current serving state of the Cloud SQL instance. |
| `switchTransactionLogsToCloudStorageEnabled` | `boolean \| null` | No | Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage. |
| `serviceAccountEmailAddress` | `string \| null` | No | The service account email address assigned to the instance.\This property is read-only. |
| `onPremisesConfiguration` | `object \| null` | No | On-premises instance configuration. |
| `upgradableDatabaseVersions` | `object[] \| null` | No | Output only. All database versions that are available for upgrade. |
| `rootPassword` | `string \| null` | No | Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances. |
| `replicaConfiguration` | `object \| null` | No | Read-replica configuration for connecting to the primary instance. |
| `gceZone` | `string \| null` | No | The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance. |
| `ipv6Address` | `string \| null` | No | The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| `diskEncryptionConfiguration` | `object \| null` | No | Disk encryption configuration for an instance. |
| `includeReplicasForMajorVersionUpgrade` | `boolean \| null` | No | Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated. |
| `name` | `string \| null` | No | Name of the Cloud SQL instance. This does not include the project ID. |
| `dnsNames` | `object[] \| null` | No | Output only. The list of DNS names used by this instance. |
| `backendType` | `string \| null` | No | The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type. |
| `satisfiesPzi` | `boolean \| null` | No | Output only. This status indicates whether the instance satisfies PZI. The status is reserved for future use. |
| `project` | `string \| null` | No | The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| `primaryDnsName` | `string \| null` | No | Output only. DEPRECATED: please use write\_endpoint instead. |
| `deploymentInfo` | `object \| null` | No | Blue-green deployment metadata for a database instance. In a blue-green deployment, we maintain two environments, one of which is live. This message contains details about the blue-green deployment. |
| `dnsName` | `string \| null` | No | Output only. The dns name of the instance. |
| `databaseCenterIntegration` | `string \| null` | No | Optional. State of the Database Center integration for this instance. When unspecified, Database Center integration is enabled by default. |
| `writeEndpoint` | `string \| null` | No | Output only. The dns name of the primary instance in a replication group. |
| `settings` | `object \| null` | No | Database instance settings. |
| `satisfiesPzs` | `boolean \| null` | No | This status indicates whether the instance satisfies PZS. The status is reserved for future use. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `databaseCenterIntegrationEnabled` | `boolean \| null` | No | Optional. If true, instance metadata is sent to the Database Center. If false, instance metadata is not sent to the Database Center. |
| `diskEncryptionStatus` | `object \| null` | No | Disk encryption status for an instance. |
| `serverCaCert` | `object \| null` | No | SslCerts Resource |
| `replicationCluster` | `object \| null` | No | A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL. |
| `etag` | `string \| null` | No | This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead. |
| `geminiConfig` | `object \| null` | No | Gemini instance configuration. |
| `nodes` | `object[] \| null` | No | Output only. Entries containing information about each read pool node of the read pool. |
| `maintenanceVersion` | `string \| null` | No | The current software version on the instance. |
| `maxDiskSize` | `string \| number \| null` | No | The maximum disk size of the instance in bytes. |
| `createTime` | `string \| null` | No | Output only. The time when the instance was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `failoverReplica` | `object \| null` | No | The name and status of the failover replica. |
| `skipPrecheck` | `boolean \| null` | No | Optional. Input only. Determines whether the precheck step is skipped during a major version upgrade. |
| `databaseVersion` | `string \| null` | No | The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. |
| `availableMaintenanceVersions` | `string[] \| null` | No | Output only. List all maintenance versions applicable on the instance |
| `suspensionReason` | `string[] \| null` | No | If the instance state is SUSPENDED, the reason for the suspension. |
| `region` | `string \| null` | No | The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`. |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `"" : ""`. For example, a single resource can have the following tags: `"123/environment": "production", "123/costCenter": "marketing",` For more information on tag creation and management, see [https://cloud.google.com/resource-manager/docs/tags/tags-overview](https://cloud.google.com/resource-manager/docs/tags/tags-overview). |
| `pscServiceAttachmentLink` | `string \| null` | No | Output only. The link to service attachment of PSC instance. |
| `scheduledMaintenance` | `object \| null` | No | Any scheduled maintenance for this instance. |
| `outOfDiskReport` | `object \| null` | No | This message wraps up the information written by out-of-disk detection job. |
| `replicaNames` | `string[] \| null` | No | The replicas of the instance. |

> [accordion] ipAddresses full type
>
> ```ts theme={null}
> {
>   ipAddress?: string | null,
>   timeToRetire?: string | null,
>   type?: string | null
> }[] | null
> ```

> [accordion] onPremisesConfiguration full type
>
> ```ts theme={null}
> {
>   dumpFilePath?: string | null,
>   sslOption?: string | null,
>   password?: string | null,
>   kind?: string | null,
>   selectedObjects?: {
>     database?: string | null
>   }[] | null,
>   sourceInstance?: {
>     region?: string | null,
>     name?: string | null,
>     project?: string | null
>   } | null,
>   caCertificate?: string | null,
>   hostPort?: string | null,
>   username?: string | null,
>   clientKey?: string | null,
>   clientCertificate?: string | null,
>   dmsManaged?: boolean | null
> } | null
> ```

> [accordion] upgradableDatabaseVersions full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   majorVersion?: string | null,
>   name?: string | null
> }[] | null
> ```

> [accordion] replicaConfiguration full type
>
> ```ts theme={null}
> {
>   mysqlReplicaConfiguration?: {
>     sslCipher?: string | null,
>     username?: string | null,
>     clientCertificate?: string | null,
>     masterHeartbeatPeriod?: string | number | null,
>     clientKey?: string | null,
>     password?: string | null,
>     connectRetryInterval?: number | null,
>     kind?: string | null,
>     verifyServerCertificate?: boolean | null,
>     dumpFilePath?: string | null,
>     caCertificate?: string | null
>   } | null,
>   failoverTarget?: boolean | null,
>   kind?: string | null,
>   cascadableReplica?: boolean | null
> } | null
> ```

> [accordion] diskEncryptionConfiguration full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string | null,
>   kind?: string | null,
>   confidentialMode?: boolean | null,
>   cmekSourceLogEncryptionEnforced?: boolean | null
> } | null
> ```

> [accordion] dnsNames full type
>
> ```ts theme={null}
> {
>   recordManager?: string | null,
>   dnsScope?: string | null,
>   name?: string | null,
>   connectionType?: string | null
> }[] | null
> ```

> [accordion] deploymentInfo full type
>
> ```ts theme={null}
> {
>   target?: {
>     sourceId?: {
>       region?: string | null,
>       name?: string | null,
>       project?: string | null
>     } | null
>   } | null,
>   deploymentId?: string | null,
>   state?: string | null,
>   source?: {
>     targetId?: {
>       region?: string | null,
>       name?: string | null,
>       project?: string | null
>     } | null
>   } | null
> } | null
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   dataDiskType?: string | null,
>   availabilityType?: string | null,
>   enableGoogleMlIntegration?: boolean | null,
>   dataDiskSizeGb?: string | number | null,
>   enableDataplexIntegration?: boolean | null,
>   dataDiskProvisionedIops?: string | number | null,
>   performanceCaptureConfig?: {
>     transactionKillExcludedUserHosts?: string[] | null,
>     probeThreshold?: number | null,
>     historyListLengthThresholdCount?: number | null,
>     transactionKillType?: string | null,
>     secondsBehindSourceThreshold?: number | null,
>     memoryUsageThresholdPercent?: number | null,
>     transactionLockWaitThresholdCount?: number | null,
>     transactionDurationThreshold?: number | null,
>     probingIntervalSeconds?: number | null,
>     enabled?: boolean | null,
>     runningThreadsThreshold?: number | null,
>     cpuUtilizationThresholdPercent?: number | null,
>     semaphoreWaitThresholdCount?: number | null,
>     transactionKillThresholdSeconds?: number | null
>   } | null,
>   retainBackupsOnDelete?: boolean | null,
>   sqlServerAuditConfig?: {
>     bucket?: string | null,
>     retentionInterval?: string | null,
>     kind?: string | null,
>     uploadInterval?: string | null
>   } | null,
>   timeZone?: string | null,
>   replicationType?: string | null,
>   replicationLagMaxSeconds?: number | null,
>   dataApiAccess?: string | null,
>   tier?: string | null,
>   backupConfiguration?: {
>     backupTier?: string | null,
>     enabled?: boolean | null,
>     backupRetentionSettings?: {
>       retainedBackups?: number | null,
>       retentionUnit?: string | null
>     } | null,
>     kind?: string | null,
>     transactionLogRetentionDays?: number | null,
>     location?: string | null,
>     startTime?: string | null,
>     transactionalLogStorageState?: string | null,
>     pointInTimeRecoveryEnabled?: boolean | null,
>     replicationLogArchivingEnabled?: boolean | null,
>     binaryLogEnabled?: boolean | null
>   } | null,
>   userLabels?: Record<string, string> | null,
>   autoUpgradeEnabled?: boolean | null,
>   pricingPlan?: string | null,
>   kind?: string | null,
>   dataCacheConfig?: {
>     dataCacheEnabled?: boolean | null
>   } | null,
>   readPoolAutoScaleConfig?: {
>     disableScaleIn?: boolean | null,
>     targetMetrics?: {
>       targetValue?: number | null,
>       metric?: string | null
>     }[] | null,
>     scaleInCooldownSeconds?: number | null,
>     maxNodeCount?: number | null,
>     scaleOutCooldownSeconds?: number | null,
>     minNodeCount?: number | null,
>     enabled?: boolean | null
>   } | null,
>   collation?: string | null,
>   activeDirectoryConfig?: {
>     mode?: string | null,
>     dnsServers?: string[] | null,
>     domain?: string | null,
>     kind?: string | null,
>     organizationalUnit?: string | null,
>     adminCredentialSecretName?: string | null
>   } | null,
>   edition?: string | null,
>   crashSafeReplicationEnabled?: boolean | null,
>   locationPreference?: {
>     zone?: string | null,
>     followGaeApplication?: string | null,
>     kind?: string | null,
>     secondaryZone?: string | null
>   } | null,
>   insightsConfig?: {
>     queryPlansPerMinute?: number | null,
>     queryInsightsEnabled?: boolean | null,
>     recordApplicationTags?: boolean | null,
>     queryStringLength?: number | null,
>     recordClientAddress?: boolean | null,
>     enhancedQueryInsightsEnabled?: boolean | null
>   } | null,
>   maintenanceWindow?: {
>     kind?: string | null,
>     updateTrack?: string | null,
>     day?: number | null,
>     hour?: number | null
>   } | null,
>   denyMaintenancePeriods?: {
>     startDate?: string | null,
>     endDate?: string | null,
>     time?: string | null
>   }[] | null,
>   databaseFlags?: {
>     value?: string | null,
>     name?: string | null
>   }[] | null,
>   databaseReplicationEnabled?: boolean | null,
>   authorizedGaeApplications?: string[] | null,
>   storageAutoResizeLimit?: string | number | null,
>   connectorEnforcement?: string | null,
>   ipConfiguration?: {
>     ipv4Enabled?: boolean | null,
>     requireSsl?: boolean | null,
>     pscConfig?: {
>       pscWriteEndpointDnsEnabled?: boolean | null,
>       pscAutoConnectionPolicyEnabled?: boolean | null,
>       pscAutoConnections?: {
>         writeEndpointAutoDnsStatus?: string | null,
>         serviceConnectionPolicyCreationResult?: string | null,
>         consumerNetworkStatus?: string | null,
>         status?: string | null,
>         ipAddress?: string | null,
>         consumerProject?: string | null,
>         instanceAutoDnsStatus?: string | null,
>         serviceConnectionPolicy?: string | null,
>         consumerNetwork?: string | null
>       }[] | null,
>       allowedConsumerProjects?: string[] | null,
>       networkAttachmentUri?: string | null,
>       pscEnabled?: boolean | null,
>       pscAutoDnsEnabled?: boolean | null
>     } | null,
>     serverCaMode?: string | null,
>     enablePrivatePathForGoogleCloudServices?: boolean | null,
>     customSubjectAlternativeNames?: string[] | null,
>     privateNetwork?: string | null,
>     sslMode?: string | null,
>     serverCertificateRotationMode?: string | null,
>     authorizedNetworks?: {
>       kind?: string | null,
>       value?: string | null,
>       expirationTime?: string | null,
>       name?: string | null
>     }[] | null,
>     allocatedIpRange?: string | null,
>     serverCaPool?: string | null
>   } | null,
>   entraidConfig?: {
>     tenantId?: string | null,
>     kind?: string | null,
>     applicationId?: string | null
>   } | null,
>   passwordValidationPolicy?: {
>     minLength?: number | null,
>     enablePasswordPolicy?: boolean | null,
>     disallowUsernameSubstring?: boolean | null,
>     passwordChangeInterval?: string | null,
>     disallowCompromisedCredentials?: boolean | null,
>     reuseInterval?: number | null,
>     complexity?: string | null
>   } | null,
>   finalBackupConfig?: {
>     enabled?: boolean | null,
>     retentionDays?: number | null
>   } | null,
>   dataDiskProvisionedThroughput?: string | number | null,
>   advancedMachineFeatures?: {
>     threadsPerCore?: number | null
>   } | null,
>   storageAutoResize?: boolean | null,
>   activationPolicy?: string | null,
>   settingsVersion?: string | number | null,
>   acceleratedReplicaMode?: boolean | null,
>   deletionProtectionEnabled?: boolean | null,
>   connectionPoolConfig?: {
>     poolerCount?: number | null,
>     connectionPoolingEnabled?: boolean | null,
>     flags?: {
>       value?: string | null,
>       name?: string | null
>     }[] | null
>   } | null
> } | null
> ```

> [accordion] diskEncryptionStatus full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string | null,
>   kind?: string | null
> } | null
> ```

> [accordion] serverCaCert full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> } | null
> ```

> [accordion] replicationCluster full type
>
> ```ts theme={null}
> {
>   psaWriteEndpoint?: string | null,
>   drReplica?: boolean | null,
>   failoverDrReplicaName?: string | null
> } | null
> ```

> [accordion] geminiConfig full type
>
> ```ts theme={null}
> {
>   flagRecommenderEnabled?: boolean | null,
>   activeQueryEnabled?: boolean | null,
>   googleVacuumMgmtEnabled?: boolean | null,
>   oomSessionCancelEnabled?: boolean | null,
>   indexAdvisorEnabled?: boolean | null,
>   entitled?: boolean | null
> } | null
> ```

> [accordion] nodes full type
>
> ```ts theme={null}
> {
>   ipAddresses?: {
>     ipAddress?: string | null,
>     timeToRetire?: string | null,
>     type?: string | null
>   }[] | null,
>   dnsNames?: {
>     recordManager?: string | null,
>     dnsScope?: string | null,
>     name?: string | null,
>     connectionType?: string | null
>   }[] | null,
>   dnsName?: string | null,
>   state?: string | null,
>   gceZone?: string | null,
>   pscServiceAttachmentLink?: string | null,
>   name?: string | null,
>   pscAutoConnections?: {
>     writeEndpointAutoDnsStatus?: string | null,
>     serviceConnectionPolicyCreationResult?: string | null,
>     consumerNetworkStatus?: string | null,
>     status?: string | null,
>     ipAddress?: string | null,
>     consumerProject?: string | null,
>     instanceAutoDnsStatus?: string | null,
>     serviceConnectionPolicy?: string | null,
>     consumerNetwork?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] failoverReplica full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   available?: boolean | null
> } | null
> ```

> [accordion] scheduledMaintenance full type
>
> ```ts theme={null}
> {
>   canDefer?: boolean | null,
>   scheduleDeadlineTime?: string | null,
>   startTime?: string | null,
>   canReschedule?: boolean | null
> } | null
> ```

> [accordion] outOfDiskReport full type
>
> ```ts theme={null}
> {
>   sqlOutOfDiskState?: string | null,
>   sqlMinRecommendedIncreaseSizeGb?: number | null
> } | null
> ```

***

### instances.getDiskShrinkConfig

`sql.instances.getDiskShrinkConfig`

Get Disk Shrink Config for a given instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.getDiskShrinkConfig({ project: 'demo-project', instance: 'app-db' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Additional message to customers. |
| `minimalTargetSizeGb` | `string \| number \| null` | No | The minimum size to which a disk can be shrunk in GigaBytes. |
| `kind` | `string \| null` | No | This is always `sql#getDiskShrinkConfig`. |

***

### instances.getLatestRecoveryTime

`sql.instances.getLatestRecoveryTime`

Get Latest Recovery Time for a given instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.getLatestRecoveryTime({ project: 'demo-project', instance: 'app-db' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `sourceInstanceDeletionTime` | `string` | No | The timestamp used to identify the time when the source instance is deleted. If this instance is deleted, then you must set the timestamp. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `earliestRecoveryTime` | `string \| null` | No | Timestamp, identifies the earliest recovery time of the source instance. |
| `latestRecoveryTime` | `string \| null` | No | Timestamp, identifies the latest recovery time of the source instance. |
| `kind` | `string \| null` | No | This is always `sql#getLatestRecoveryTime`. |

***

### instances.import

`sql.instances.import`

Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.instances.import({
	project: 'demo-project',
	instance: 'app-db',
	importContext: { fileType: 'SQL', uri: 'gs://demo-bucket/app.sql.gz', database: 'app' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `importContext` | `object` | No | Database instance import context. |

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string,
>   fileType?: SQL_FILE_TYPE_UNSPECIFIED | SQL | CSV | BAK | TDE,
>   bakImportOptions?: {
>     stopAt?: string,
>     bakType?: BAK_TYPE_UNSPECIFIED | FULL | DIFF | TLOG,
>     encryptionOptions?: {
>       keepEncrypted?: boolean,
>       pvkPath?: string,
>       certPath?: string,
>       pvkPassword?: string
>     },
>     noRecovery?: boolean,
>     stopAtMark?: string,
>     striped?: boolean,
>     recoveryOnly?: boolean
>   },
>   kind?: string,
>   sqlImportOptions?: {
>     threads?: number,
>     postgresImportOptions?: {
>       ifExists?: boolean,
>       clean?: boolean
>     },
>     parallel?: boolean
>   },
>   tdeImportOptions?: {
>     name?: string,
>     privateKeyPassword?: string,
>     certificatePath?: string,
>     privateKeyPath?: string
>   },
>   csvImportOptions?: {
>     quoteCharacter?: string,
>     escapeCharacter?: string,
>     columns?: string[],
>     table?: string,
>     linesTerminatedBy?: string,
>     fieldsTerminatedBy?: string
>   },
>   database?: string,
>   uri?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.insert

`sql.instances.insert`

Creates a new Cloud SQL instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.insert({
	project: 'demo-project',
	name: 'app-db',
	databaseVersion: 'POSTGRES_17',
	region: 'us-central1',
	settings: { tier: 'db-f1-micro', edition: 'ENTERPRISE' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID of the project to which the newly created Cloud SQL instances should belong. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `secondaryGceZone` | `string` | No | The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. |
| `currentDiskSize` | `string \| number` | No | The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes\_used" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details. |
| `ipAddresses` | `object[]` | No | The assigned IP addresses for the instance. |
| `instanceType` | `SQL_INSTANCE_TYPE_UNSPECIFIED \| CLOUD_SQL_INSTANCE \| ON_PREMISES_INSTANCE \| READ_REPLICA_INSTANCE \| READ_POOL_INSTANCE \| GREEN_INSTANCE` | No | The instance type. |
| `sqlNetworkArchitecture` | `SQL_NETWORK_ARCHITECTURE_UNSPECIFIED \| NEW_NETWORK_ARCHITECTURE \| OLD_NETWORK_ARCHITECTURE` | No | — |
| `kind` | `string` | No | This is always `sql#instance`. |
| `connectionName` | `string` | No | Connection name of the Cloud SQL instance used in connection strings. |
| `masterInstanceName` | `string` | No | The name of the instance which will act as primary in the replication setup. |
| `nodeCount` | `number` | No | The number of read pool nodes in a read pool. |
| `state` | `SQL_INSTANCE_STATE_UNSPECIFIED \| RUNNABLE \| SUSPENDED \| PENDING_DELETE \| PENDING_CREATE \| MAINTENANCE \| FAILED \| ONLINE_MAINTENANCE \| REPAIRING` | No | The current serving state of the Cloud SQL instance. |
| `switchTransactionLogsToCloudStorageEnabled` | `boolean` | No | Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage. |
| `serviceAccountEmailAddress` | `string` | No | The service account email address assigned to the instance.\This property is read-only. |
| `onPremisesConfiguration` | `object` | No | On-premises instance configuration. |
| `rootPassword` | `string` | No | Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances. |
| `replicaConfiguration` | `object` | No | Read-replica configuration for connecting to the primary instance. |
| `gceZone` | `string` | No | The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance. |
| `ipv6Address` | `string` | No | The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| `diskEncryptionConfiguration` | `object` | No | Disk encryption configuration for an instance. |
| `includeReplicasForMajorVersionUpgrade` | `boolean` | No | Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated. |
| `name` | `string` | No | Name of the Cloud SQL instance. This does not include the project ID. |
| `backendType` | `SQL_BACKEND_TYPE_UNSPECIFIED \| FIRST_GEN \| SECOND_GEN \| EXTERNAL` | No | The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type. |
| `body_project` | `string` | No | The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| `databaseCenterIntegration` | `DATABASE_CENTER_INTEGRATION_UNSPECIFIED \| ENABLED \| DISABLED` | No | Optional. State of the Database Center integration for this instance. When unspecified, Database Center integration is enabled by default. |
| `settings` | `object` | No | Database instance settings. |
| `satisfiesPzs` | `boolean` | No | This status indicates whether the instance satisfies PZS. The status is reserved for future use. |
| `selfLink` | `string` | No | The URI of this resource. |
| `databaseCenterIntegrationEnabled` | `boolean` | No | Optional. If true, instance metadata is sent to the Database Center. If false, instance metadata is not sent to the Database Center. |
| `diskEncryptionStatus` | `object` | No | Disk encryption status for an instance. |
| `serverCaCert` | `object` | No | SslCerts Resource |
| `replicationCluster` | `object` | No | A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL. |
| `etag` | `string` | No | This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead. |
| `geminiConfig` | `object` | No | Gemini instance configuration. |
| `maintenanceVersion` | `string` | No | The current software version on the instance. |
| `maxDiskSize` | `string \| number` | No | The maximum disk size of the instance in bytes. |
| `failoverReplica` | `object` | No | The name and status of the failover replica. |
| `skipPrecheck` | `boolean` | No | Optional. Input only. Determines whether the precheck step is skipped during a major version upgrade. |
| `databaseVersion` | `SQL_DATABASE_VERSION_UNSPECIFIED \| MYSQL_5_1 \| MYSQL_5_5 \| MYSQL_5_6 \| MYSQL_5_7 \| MYSQL_8_0 \| MYSQL_8_0_18 \| MYSQL_8_0_26 \| MYSQL_8_0_27 \| MYSQL_8_0_28 \| MYSQL_8_0_29 \| MYSQL_8_0_30 \| MYSQL_8_0_31 \| MYSQL_8_0_32 \| MYSQL_8_0_33 \| MYSQL_8_0_34 \| MYSQL_8_0_35 \| MYSQL_8_0_36 \| MYSQL_8_0_37 \| MYSQL_8_0_39 \| MYSQL_8_0_40 \| MYSQL_8_0_41 \| MYSQL_8_0_42 \| MYSQL_8_0_43 \| MYSQL_8_0_44 \| MYSQL_8_0_45 \| MYSQL_8_0_46 \| MYSQL_8_4 \| MYSQL_9_7 \| SQLSERVER_2017_STANDARD \| SQLSERVER_2017_ENTERPRISE \| SQLSERVER_2017_EXPRESS \| SQLSERVER_2017_WEB \| POSTGRES_9_6 \| POSTGRES_10 \| POSTGRES_11 \| POSTGRES_12 \| POSTGRES_13 \| POSTGRES_14 \| POSTGRES_15 \| POSTGRES_16 \| POSTGRES_17 \| POSTGRES_18 \| POSTGRES_19 \| POSTGRES_20 \| SQLSERVER_2019_STANDARD \| SQLSERVER_2019_ENTERPRISE \| SQLSERVER_2019_EXPRESS \| SQLSERVER_2019_WEB \| SQLSERVER_2022_STANDARD \| SQLSERVER_2022_ENTERPRISE \| SQLSERVER_2022_EXPRESS \| SQLSERVER_2022_WEB \| SQLSERVER_2025_STANDARD \| SQLSERVER_2025_ENTERPRISE \| SQLSERVER_2025_EXPRESS` | No | The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. |
| `suspensionReason` | `(SQL_SUSPENSION_REASON_UNSPECIFIED \| BILLING_ISSUE \| LEGAL_ISSUE \| OPERATIONAL_ISSUE \| KMS_KEY_ISSUE \| PROJECT_ABUSE)[]` | No | If the instance state is SUSPENDED, the reason for the suspension. |
| `region` | `string` | No | The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `"" : ""`. For example, a single resource can have the following tags: `"123/environment": "production", "123/costCenter": "marketing",` For more information on tag creation and management, see [https://cloud.google.com/resource-manager/docs/tags/tags-overview](https://cloud.google.com/resource-manager/docs/tags/tags-overview). |
| `scheduledMaintenance` | `object` | No | Any scheduled maintenance for this instance. |
| `outOfDiskReport` | `object` | No | This message wraps up the information written by out-of-disk detection job. |
| `replicaNames` | `string[]` | No | The replicas of the instance. |

> [accordion] ipAddresses full type
>
> ```ts theme={null}
> {
>   ipAddress?: string,
>   timeToRetire?: string,
>   type?: SQL_IP_ADDRESS_TYPE_UNSPECIFIED | PRIMARY | OUTGOING | PRIVATE | MIGRATED_1ST_GEN
> }[]
> ```

> [accordion] onPremisesConfiguration full type
>
> ```ts theme={null}
> {
>   dumpFilePath?: string,
>   sslOption?: SSL_OPTION_UNSPECIFIED | DISABLE | REQUIRE | VERIFY_CA,
>   password?: string,
>   kind?: string,
>   selectedObjects?: {
>     database?: string
>   }[],
>   sourceInstance?: {
>     region?: string,
>     name?: string,
>     project?: string
>   },
>   caCertificate?: string,
>   hostPort?: string,
>   username?: string,
>   clientKey?: string,
>   clientCertificate?: string
> }
> ```

> [accordion] replicaConfiguration full type
>
> ```ts theme={null}
> {
>   mysqlReplicaConfiguration?: {
>     sslCipher?: string,
>     username?: string,
>     clientCertificate?: string,
>     masterHeartbeatPeriod?: string | number,
>     clientKey?: string,
>     password?: string,
>     connectRetryInterval?: number,
>     kind?: string,
>     verifyServerCertificate?: boolean,
>     dumpFilePath?: string,
>     caCertificate?: string
>   },
>   failoverTarget?: boolean,
>   kind?: string,
>   cascadableReplica?: boolean
> }
> ```

> [accordion] diskEncryptionConfiguration full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string,
>   kind?: string,
>   confidentialMode?: boolean,
>   cmekSourceLogEncryptionEnforced?: boolean
> }
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   dataDiskType?: SQL_DATA_DISK_TYPE_UNSPECIFIED | PD_SSD | PD_HDD | OBSOLETE_LOCAL_SSD | HYPERDISK_BALANCED,
>   availabilityType?: SQL_AVAILABILITY_TYPE_UNSPECIFIED | ZONAL | REGIONAL,
>   enableGoogleMlIntegration?: boolean,
>   dataDiskSizeGb?: string | number,
>   enableDataplexIntegration?: boolean,
>   dataDiskProvisionedIops?: string | number,
>   performanceCaptureConfig?: {
>     transactionKillExcludedUserHosts?: string[],
>     probeThreshold?: number,
>     historyListLengthThresholdCount?: number,
>     transactionKillType?: TRANSACTION_KILL_TYPE_UNSPECIFIED | READ_ONLY_TRANSACTIONS | ALL_TRANSACTIONS,
>     secondsBehindSourceThreshold?: number,
>     memoryUsageThresholdPercent?: number,
>     transactionLockWaitThresholdCount?: number,
>     transactionDurationThreshold?: number,
>     probingIntervalSeconds?: number,
>     enabled?: boolean,
>     runningThreadsThreshold?: number,
>     cpuUtilizationThresholdPercent?: number,
>     semaphoreWaitThresholdCount?: number,
>     transactionKillThresholdSeconds?: number
>   },
>   retainBackupsOnDelete?: boolean,
>   sqlServerAuditConfig?: {
>     bucket?: string,
>     retentionInterval?: string,
>     kind?: string,
>     uploadInterval?: string
>   },
>   timeZone?: string,
>   replicationType?: SQL_REPLICATION_TYPE_UNSPECIFIED | SYNCHRONOUS | ASYNCHRONOUS,
>   replicationLagMaxSeconds?: number,
>   dataApiAccess?: DATA_API_ACCESS_UNSPECIFIED | DISALLOW_DATA_API | ALLOW_DATA_API,
>   tier?: string,
>   backupConfiguration?: {
>     enabled?: boolean,
>     backupRetentionSettings?: {
>       retainedBackups?: number,
>       retentionUnit?: RETENTION_UNIT_UNSPECIFIED | COUNT
>     },
>     kind?: string,
>     transactionLogRetentionDays?: number,
>     location?: string,
>     startTime?: string,
>     pointInTimeRecoveryEnabled?: boolean,
>     replicationLogArchivingEnabled?: boolean,
>     binaryLogEnabled?: boolean
>   },
>   userLabels?: Record<string, string>,
>   autoUpgradeEnabled?: boolean,
>   pricingPlan?: SQL_PRICING_PLAN_UNSPECIFIED | PACKAGE | PER_USE,
>   kind?: string,
>   dataCacheConfig?: {
>     dataCacheEnabled?: boolean
>   },
>   readPoolAutoScaleConfig?: {
>     disableScaleIn?: boolean,
>     targetMetrics?: {
>       targetValue?: number,
>       metric?: string
>     }[],
>     scaleInCooldownSeconds?: number,
>     maxNodeCount?: number,
>     scaleOutCooldownSeconds?: number,
>     minNodeCount?: number,
>     enabled?: boolean
>   },
>   collation?: string,
>   activeDirectoryConfig?: {
>     mode?: ACTIVE_DIRECTORY_MODE_UNSPECIFIED | MANAGED_ACTIVE_DIRECTORY | SELF_MANAGED_ACTIVE_DIRECTORY | CUSTOMER_MANAGED_ACTIVE_DIRECTORY,
>     dnsServers?: string[],
>     domain?: string,
>     kind?: string,
>     organizationalUnit?: string,
>     adminCredentialSecretName?: string
>   },
>   edition?: EDITION_UNSPECIFIED | ENTERPRISE | ENTERPRISE_PLUS | DEVELOPER,
>   crashSafeReplicationEnabled?: boolean,
>   locationPreference?: {
>     zone?: string,
>     followGaeApplication?: string,
>     kind?: string,
>     secondaryZone?: string
>   },
>   insightsConfig?: {
>     queryPlansPerMinute?: number,
>     queryInsightsEnabled?: boolean,
>     recordApplicationTags?: boolean,
>     queryStringLength?: number,
>     recordClientAddress?: boolean,
>     enhancedQueryInsightsEnabled?: boolean
>   },
>   maintenanceWindow?: {
>     kind?: string,
>     updateTrack?: SQL_UPDATE_TRACK_UNSPECIFIED | canary | stable | week5,
>     day?: number,
>     hour?: number
>   },
>   denyMaintenancePeriods?: {
>     startDate?: string,
>     endDate?: string,
>     time?: string
>   }[],
>   databaseFlags?: {
>     value?: string,
>     name?: string
>   }[],
>   databaseReplicationEnabled?: boolean,
>   authorizedGaeApplications?: string[],
>   storageAutoResizeLimit?: string | number,
>   connectorEnforcement?: CONNECTOR_ENFORCEMENT_UNSPECIFIED | NOT_REQUIRED | REQUIRED,
>   ipConfiguration?: {
>     ipv4Enabled?: boolean,
>     requireSsl?: boolean,
>     pscConfig?: {
>       pscWriteEndpointDnsEnabled?: boolean,
>       pscAutoConnectionPolicyEnabled?: boolean,
>       pscAutoConnections?: {
>         consumerNetworkStatus?: string,
>         status?: string,
>         ipAddress?: string,
>         consumerProject?: string,
>         consumerNetwork?: string
>       }[],
>       allowedConsumerProjects?: string[],
>       networkAttachmentUri?: string,
>       pscEnabled?: boolean,
>       pscAutoDnsEnabled?: boolean
>     },
>     serverCaMode?: CA_MODE_UNSPECIFIED | GOOGLE_MANAGED_INTERNAL_CA | GOOGLE_MANAGED_CAS_CA | CUSTOMER_MANAGED_CAS_CA,
>     enablePrivatePathForGoogleCloudServices?: boolean,
>     customSubjectAlternativeNames?: string[],
>     privateNetwork?: string,
>     sslMode?: SSL_MODE_UNSPECIFIED | ALLOW_UNENCRYPTED_AND_ENCRYPTED | ENCRYPTED_ONLY | TRUSTED_CLIENT_CERTIFICATE_REQUIRED,
>     serverCertificateRotationMode?: SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED | NO_AUTOMATIC_ROTATION | AUTOMATIC_ROTATION_DURING_MAINTENANCE,
>     authorizedNetworks?: {
>       kind?: string,
>       value?: string,
>       expirationTime?: string,
>       name?: string
>     }[],
>     allocatedIpRange?: string,
>     serverCaPool?: string
>   },
>   entraidConfig?: {
>     tenantId?: string,
>     applicationId?: string
>   },
>   passwordValidationPolicy?: {
>     minLength?: number,
>     enablePasswordPolicy?: boolean,
>     disallowUsernameSubstring?: boolean,
>     passwordChangeInterval?: string,
>     disallowCompromisedCredentials?: boolean,
>     reuseInterval?: number,
>     complexity?: COMPLEXITY_UNSPECIFIED | COMPLEXITY_DEFAULT
>   },
>   finalBackupConfig?: {
>     enabled?: boolean,
>     retentionDays?: number
>   },
>   dataDiskProvisionedThroughput?: string | number,
>   advancedMachineFeatures?: {
>     threadsPerCore?: number
>   },
>   storageAutoResize?: boolean,
>   activationPolicy?: SQL_ACTIVATION_POLICY_UNSPECIFIED | ALWAYS | NEVER | ON_DEMAND,
>   settingsVersion?: string | number,
>   acceleratedReplicaMode?: boolean,
>   deletionProtectionEnabled?: boolean,
>   connectionPoolConfig?: {
>     connectionPoolingEnabled?: boolean,
>     flags?: {
>       value?: string,
>       name?: string
>     }[]
>   }
> }
> ```

> [accordion] diskEncryptionStatus full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string,
>   kind?: string
> }
> ```

> [accordion] serverCaCert full type
>
> ```ts theme={null}
> {
>   kind?: string,
>   cert?: string,
>   commonName?: string,
>   createTime?: string,
>   expirationTime?: string,
>   instance?: string,
>   certSerialNumber?: string,
>   selfLink?: string,
>   sha1Fingerprint?: string
> }
> ```

> [accordion] replicationCluster full type
>
> ```ts theme={null}
> {
>   failoverDrReplicaName?: string
> }
> ```

> [accordion] geminiConfig full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] failoverReplica full type
>
> ```ts theme={null}
> {
>   name?: string,
>   available?: boolean
> }
> ```

> [accordion] scheduledMaintenance full type
>
> ```ts theme={null}
> {
>   canDefer?: boolean,
>   scheduleDeadlineTime?: string,
>   startTime?: string,
>   canReschedule?: boolean
> }
> ```

> [accordion] outOfDiskReport full type
>
> ```ts theme={null}
> {
>   sqlOutOfDiskState?: SQL_OUT_OF_DISK_STATE_UNSPECIFIED | NORMAL | SOFT_SHUTDOWN,
>   sqlMinRecommendedIncreaseSizeGb?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.list

`sql.instances.list`

Lists instances under a given project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD\_SQL\_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto\_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD\_SQL\_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. |
| `maxResults` | `number` | No | The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |
| `project` | `string` | Yes | Project ID of the project for which to list Cloud SQL instances. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
| `warnings` | `object[] \| null` | No | List of warnings that occurred while handling the request. |
| `kind` | `string \| null` | No | This is always `sql#instancesList`. |
| `items` | `object[] \| null` | No | List of database instance resources. |

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   secondaryGceZone?: string | null,
>   databaseInstalledVersion?: string | null,
>   currentDiskSize?: string | number | null,
>   ipAddresses?: {
>     ipAddress?: string | null,
>     timeToRetire?: string | null,
>     type?: string | null
>   }[] | null,
>   instanceType?: string | null,
>   sqlNetworkArchitecture?: string | null,
>   kind?: string | null,
>   connectionName?: string | null,
>   masterInstanceName?: string | null,
>   nodeCount?: number | null,
>   state?: string | null,
>   switchTransactionLogsToCloudStorageEnabled?: boolean | null,
>   serviceAccountEmailAddress?: string | null,
>   onPremisesConfiguration?: {
>     dumpFilePath?: string | null,
>     sslOption?: string | null,
>     password?: string | null,
>     kind?: string | null,
>     selectedObjects?: {
>       database?: string | null
>     }[] | null,
>     sourceInstance?: {
>       region?: string | null,
>       name?: string | null,
>       project?: string | null
>     } | null,
>     caCertificate?: string | null,
>     hostPort?: string | null,
>     username?: string | null,
>     clientKey?: string | null,
>     clientCertificate?: string | null,
>     dmsManaged?: boolean | null
>   } | null,
>   upgradableDatabaseVersions?: {
>     displayName?: string | null,
>     majorVersion?: string | null,
>     name?: string | null
>   }[] | null,
>   rootPassword?: string | null,
>   replicaConfiguration?: {
>     mysqlReplicaConfiguration?: {
>       sslCipher?: string | null,
>       username?: string | null,
>       clientCertificate?: string | null,
>       masterHeartbeatPeriod?: string | number | null,
>       clientKey?: string | null,
>       password?: string | null,
>       connectRetryInterval?: number | null,
>       kind?: string | null,
>       verifyServerCertificate?: boolean | null,
>       dumpFilePath?: string | null,
>       caCertificate?: string | null
>     } | null,
>     failoverTarget?: boolean | null,
>     kind?: string | null,
>     cascadableReplica?: boolean | null
>   } | null,
>   gceZone?: string | null,
>   ipv6Address?: string | null,
>   diskEncryptionConfiguration?: {
>     kmsKeyName?: string | null,
>     kind?: string | null,
>     confidentialMode?: boolean | null,
>     cmekSourceLogEncryptionEnforced?: boolean | null
>   } | null,
>   includeReplicasForMajorVersionUpgrade?: boolean | null,
>   name?: string | null,
>   dnsNames?: {
>     recordManager?: string | null,
>     dnsScope?: string | null,
>     name?: string | null,
>     connectionType?: string | null
>   }[] | null,
>   backendType?: string | null,
>   satisfiesPzi?: boolean | null,
>   project?: string | null,
>   primaryDnsName?: string | null,
>   deploymentInfo?: {
>     target?: {
>       sourceId?: {
>         region?: string | null,
>         name?: string | null,
>         project?: string | null
>       } | null
>     } | null,
>     deploymentId?: string | null,
>     state?: string | null,
>     source?: {
>       targetId?: {
>         region?: string | null,
>         name?: string | null,
>         project?: string | null
>       } | null
>     } | null
>   } | null,
>   dnsName?: string | null,
>   databaseCenterIntegration?: string | null,
>   writeEndpoint?: string | null,
>   settings?: {
>     dataDiskType?: string | null,
>     availabilityType?: string | null,
>     enableGoogleMlIntegration?: boolean | null,
>     dataDiskSizeGb?: string | number | null,
>     enableDataplexIntegration?: boolean | null,
>     dataDiskProvisionedIops?: string | number | null,
>     performanceCaptureConfig?: {
>       transactionKillExcludedUserHosts?: string[] | null,
>       probeThreshold?: number | null,
>       historyListLengthThresholdCount?: number | null,
>       transactionKillType?: string | null,
>       secondsBehindSourceThreshold?: number | null,
>       memoryUsageThresholdPercent?: number | null,
>       transactionLockWaitThresholdCount?: number | null,
>       transactionDurationThreshold?: number | null,
>       probingIntervalSeconds?: number | null,
>       enabled?: boolean | null,
>       runningThreadsThreshold?: number | null,
>       cpuUtilizationThresholdPercent?: number | null,
>       semaphoreWaitThresholdCount?: number | null,
>       transactionKillThresholdSeconds?: number | null
>     } | null,
>     retainBackupsOnDelete?: boolean | null,
>     sqlServerAuditConfig?: {
>       bucket?: string | null,
>       retentionInterval?: string | null,
>       kind?: string | null,
>       uploadInterval?: string | null
>     } | null,
>     timeZone?: string | null,
>     replicationType?: string | null,
>     replicationLagMaxSeconds?: number | null,
>     dataApiAccess?: string | null,
>     tier?: string | null,
>     backupConfiguration?: {
>       backupTier?: string | null,
>       enabled?: boolean | null,
>       backupRetentionSettings?: {
>         retainedBackups?: number | null,
>         retentionUnit?: string | null
>       } | null,
>       kind?: string | null,
>       transactionLogRetentionDays?: number | null,
>       location?: string | null,
>       startTime?: string | null,
>       transactionalLogStorageState?: string | null,
>       pointInTimeRecoveryEnabled?: boolean | null,
>       replicationLogArchivingEnabled?: boolean | null,
>       binaryLogEnabled?: boolean | null
>     } | null,
>     userLabels?: Record<string, string> | null,
>     autoUpgradeEnabled?: boolean | null,
>     pricingPlan?: string | null,
>     kind?: string | null,
>     dataCacheConfig?: {
>       dataCacheEnabled?: boolean | null
>     } | null,
>     readPoolAutoScaleConfig?: {
>       disableScaleIn?: boolean | null,
>       targetMetrics?: {
>         targetValue?: number | null,
>         metric?: string | null
>       }[] | null,
>       scaleInCooldownSeconds?: number | null,
>       maxNodeCount?: number | null,
>       scaleOutCooldownSeconds?: number | null,
>       minNodeCount?: number | null,
>       enabled?: boolean | null
>     } | null,
>     collation?: string | null,
>     activeDirectoryConfig?: {
>       mode?: string | null,
>       dnsServers?: string[] | null,
>       domain?: string | null,
>       kind?: string | null,
>       organizationalUnit?: string | null,
>       adminCredentialSecretName?: string | null
>     } | null,
>     edition?: string | null,
>     crashSafeReplicationEnabled?: boolean | null,
>     locationPreference?: {
>       zone?: string | null,
>       followGaeApplication?: string | null,
>       kind?: string | null,
>       secondaryZone?: string | null
>     } | null,
>     insightsConfig?: {
>       queryPlansPerMinute?: number | null,
>       queryInsightsEnabled?: boolean | null,
>       recordApplicationTags?: boolean | null,
>       queryStringLength?: number | null,
>       recordClientAddress?: boolean | null,
>       enhancedQueryInsightsEnabled?: boolean | null
>     } | null,
>     maintenanceWindow?: {
>       kind?: string | null,
>       updateTrack?: string | null,
>       day?: number | null,
>       hour?: number | null
>     } | null,
>     denyMaintenancePeriods?: {
>       startDate?: string | null,
>       endDate?: string | null,
>       time?: string | null
>     }[] | null,
>     databaseFlags?: {
>       value?: string | null,
>       name?: string | null
>     }[] | null,
>     databaseReplicationEnabled?: boolean | null,
>     authorizedGaeApplications?: string[] | null,
>     storageAutoResizeLimit?: string | number | null,
>     connectorEnforcement?: string | null,
>     ipConfiguration?: {
>       ipv4Enabled?: boolean | null,
>       requireSsl?: boolean | null,
>       pscConfig?: {
>         pscWriteEndpointDnsEnabled?: boolean | null,
>         pscAutoConnectionPolicyEnabled?: boolean | null,
>         pscAutoConnections?: {
>           writeEndpointAutoDnsStatus?: string | null,
>           serviceConnectionPolicyCreationResult?: string | null,
>           consumerNetworkStatus?: string | null,
>           status?: string | null,
>           ipAddress?: string | null,
>           consumerProject?: string | null,
>           instanceAutoDnsStatus?: string | null,
>           serviceConnectionPolicy?: string | null,
>           consumerNetwork?: string | null
>         }[] | null,
>         allowedConsumerProjects?: string[] | null,
>         networkAttachmentUri?: string | null,
>         pscEnabled?: boolean | null,
>         pscAutoDnsEnabled?: boolean | null
>       } | null,
>       serverCaMode?: string | null,
>       enablePrivatePathForGoogleCloudServices?: boolean | null,
>       customSubjectAlternativeNames?: string[] | null,
>       privateNetwork?: string | null,
>       sslMode?: string | null,
>       serverCertificateRotationMode?: string | null,
>       authorizedNetworks?: {
>         kind?: string | null,
>         value?: string | null,
>         expirationTime?: string | null,
>         name?: string | null
>       }[] | null,
>       allocatedIpRange?: string | null,
>       serverCaPool?: string | null
>     } | null,
>     entraidConfig?: {
>       tenantId?: string | null,
>       kind?: string | null,
>       applicationId?: string | null
>     } | null,
>     passwordValidationPolicy?: {
>       minLength?: number | null,
>       enablePasswordPolicy?: boolean | null,
>       disallowUsernameSubstring?: boolean | null,
>       passwordChangeInterval?: string | null,
>       disallowCompromisedCredentials?: boolean | null,
>       reuseInterval?: number | null,
>       complexity?: string | null
>     } | null,
>     finalBackupConfig?: {
>       enabled?: boolean | null,
>       retentionDays?: number | null
>     } | null,
>     dataDiskProvisionedThroughput?: string | number | null,
>     advancedMachineFeatures?: {
>       threadsPerCore?: number | null
>     } | null,
>     storageAutoResize?: boolean | null,
>     activationPolicy?: string | null,
>     settingsVersion?: string | number | null,
>     acceleratedReplicaMode?: boolean | null,
>     deletionProtectionEnabled?: boolean | null,
>     connectionPoolConfig?: {
>       poolerCount?: number | null,
>       connectionPoolingEnabled?: boolean | null,
>       flags?: {
>         value?: string | null,
>         name?: string | null
>       }[] | null
>     } | null
>   } | null,
>   satisfiesPzs?: boolean | null,
>   selfLink?: string | null,
>   databaseCenterIntegrationEnabled?: boolean | null,
>   diskEncryptionStatus?: {
>     kmsKeyVersionName?: string | null,
>     kind?: string | null
>   } | null,
>   serverCaCert?: {
>     kind?: string | null,
>     cert?: string | null,
>     commonName?: string | null,
>     createTime?: string | null,
>     expirationTime?: string | null,
>     instance?: string | null,
>     certSerialNumber?: string | null,
>     selfLink?: string | null,
>     sha1Fingerprint?: string | null
>   } | null,
>   replicationCluster?: {
>     psaWriteEndpoint?: string | null,
>     drReplica?: boolean | null,
>     failoverDrReplicaName?: string | null
>   } | null,
>   etag?: string | null,
>   geminiConfig?: {
>     flagRecommenderEnabled?: boolean | null,
>     activeQueryEnabled?: boolean | null,
>     googleVacuumMgmtEnabled?: boolean | null,
>     oomSessionCancelEnabled?: boolean | null,
>     indexAdvisorEnabled?: boolean | null,
>     entitled?: boolean | null
>   } | null,
>   nodes?: {
>     ipAddresses?: {
>       ipAddress?: string | null,
>       timeToRetire?: string | null,
>       type?: string | null
>     }[] | null,
>     dnsNames?: {
>       recordManager?: string | null,
>       dnsScope?: string | null,
>       name?: string | null,
>       connectionType?: string | null
>     }[] | null,
>     dnsName?: string | null,
>     state?: string | null,
>     gceZone?: string | null,
>     pscServiceAttachmentLink?: string | null,
>     name?: string | null,
>     pscAutoConnections?: {
>       writeEndpointAutoDnsStatus?: string | null,
>       serviceConnectionPolicyCreationResult?: string | null,
>       consumerNetworkStatus?: string | null,
>       status?: string | null,
>       ipAddress?: string | null,
>       consumerProject?: string | null,
>       instanceAutoDnsStatus?: string | null,
>       serviceConnectionPolicy?: string | null,
>       consumerNetwork?: string | null
>     }[] | null
>   }[] | null,
>   maintenanceVersion?: string | null,
>   maxDiskSize?: string | number | null,
>   createTime?: string | null,
>   failoverReplica?: {
>     name?: string | null,
>     available?: boolean | null
>   } | null,
>   skipPrecheck?: boolean | null,
>   databaseVersion?: string | null,
>   availableMaintenanceVersions?: string[] | null,
>   suspensionReason?: string[] | null,
>   region?: string | null,
>   tags?: Record<string, string> | null,
>   pscServiceAttachmentLink?: string | null,
>   scheduledMaintenance?: {
>     canDefer?: boolean | null,
>     scheduleDeadlineTime?: string | null,
>     startTime?: string | null,
>     canReschedule?: boolean | null
>   } | null,
>   outOfDiskReport?: {
>     sqlOutOfDiskState?: string | null,
>     sqlMinRecommendedIncreaseSizeGb?: number | null
>   } | null,
>   replicaNames?: string[] | null
> }[] | null
> ```

***

### instances.listEntraIdCertificates

`sql.instances.listEntraIdCertificates`

Lists all versions of EntraID certificates for the specified instance. There can be up to three sets of certificates listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.listEntraIdCertificates({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `certs` | `object[] \| null` | No | List of Entra ID certificates for the instance. |
| `kind` | `string \| null` | No | This is always `sql#instancesListEntraIdCertificates`. |
| `activeVersion` | `string \| null` | No | The `sha1_fingerprint` of the active certificate from `certs`. |

> [accordion] certs full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> }[] | null
> ```

***

### instances.listServerCas

`sql.instances.listServerCas`

Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.listServerCas({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `activeVersion` | `string \| null` | No | — |
| `certs` | `object[] \| null` | No | List of server CA certificates for the instance. |
| `kind` | `string \| null` | No | This is always `sql#instancesListServerCas`. |

> [accordion] certs full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> }[] | null
> ```

***

### instances.listServerCertificates

`sql.instances.listServerCertificates`

Lists all versions of server certificates and certificate authorities (CAs) for the specified instance. There can be up to three sets of certs listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.listServerCertificates({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `serverCerts` | `object[] \| null` | No | List of server certificates for the instance, signed by the corresponding CA from the `ca_certs` list. |
| `activeVersion` | `string \| null` | No | The `sha1_fingerprint` of the active certificate from `server_certs`. |
| `kind` | `string \| null` | No | This is always `sql#instancesListServerCertificates`. |
| `caCerts` | `object[] \| null` | No | List of server CA certificates for the instance. |

> [accordion] serverCerts full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> }[] | null
> ```

> [accordion] caCerts full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> }[] | null
> ```

***

### instances.patch

`sql.instances.patch`

Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.patch({
	project: 'demo-project',
	instance: 'app-db',
	settings: { activationPolicy: 'NEVER' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reconcilePscNetworkingForce` | `boolean` | No | Optional. Set PSC config to the same value as the existing config and force reconcile the PSC networking. |
| `reconcilePscNetworking` | `boolean` | No | Optional. Set PSC config to the same value as the existing config to reconcile the PSC networking. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `secondaryGceZone` | `string` | No | The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. |
| `currentDiskSize` | `string \| number` | No | The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes\_used" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details. |
| `ipAddresses` | `object[]` | No | The assigned IP addresses for the instance. |
| `instanceType` | `SQL_INSTANCE_TYPE_UNSPECIFIED \| CLOUD_SQL_INSTANCE \| ON_PREMISES_INSTANCE \| READ_REPLICA_INSTANCE \| READ_POOL_INSTANCE \| GREEN_INSTANCE` | No | The instance type. |
| `sqlNetworkArchitecture` | `SQL_NETWORK_ARCHITECTURE_UNSPECIFIED \| NEW_NETWORK_ARCHITECTURE \| OLD_NETWORK_ARCHITECTURE` | No | — |
| `kind` | `string` | No | This is always `sql#instance`. |
| `connectionName` | `string` | No | Connection name of the Cloud SQL instance used in connection strings. |
| `masterInstanceName` | `string` | No | The name of the instance which will act as primary in the replication setup. |
| `nodeCount` | `number` | No | The number of read pool nodes in a read pool. |
| `state` | `SQL_INSTANCE_STATE_UNSPECIFIED \| RUNNABLE \| SUSPENDED \| PENDING_DELETE \| PENDING_CREATE \| MAINTENANCE \| FAILED \| ONLINE_MAINTENANCE \| REPAIRING` | No | The current serving state of the Cloud SQL instance. |
| `switchTransactionLogsToCloudStorageEnabled` | `boolean` | No | Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage. |
| `serviceAccountEmailAddress` | `string` | No | The service account email address assigned to the instance.\This property is read-only. |
| `onPremisesConfiguration` | `object` | No | On-premises instance configuration. |
| `rootPassword` | `string` | No | Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances. |
| `replicaConfiguration` | `object` | No | Read-replica configuration for connecting to the primary instance. |
| `gceZone` | `string` | No | The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance. |
| `ipv6Address` | `string` | No | The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| `diskEncryptionConfiguration` | `object` | No | Disk encryption configuration for an instance. |
| `includeReplicasForMajorVersionUpgrade` | `boolean` | No | Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated. |
| `name` | `string` | No | Name of the Cloud SQL instance. This does not include the project ID. |
| `backendType` | `SQL_BACKEND_TYPE_UNSPECIFIED \| FIRST_GEN \| SECOND_GEN \| EXTERNAL` | No | The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type. |
| `body_project` | `string` | No | The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| `databaseCenterIntegration` | `DATABASE_CENTER_INTEGRATION_UNSPECIFIED \| ENABLED \| DISABLED` | No | Optional. State of the Database Center integration for this instance. When unspecified, Database Center integration is enabled by default. |
| `settings` | `object` | No | Database instance settings. |
| `satisfiesPzs` | `boolean` | No | This status indicates whether the instance satisfies PZS. The status is reserved for future use. |
| `selfLink` | `string` | No | The URI of this resource. |
| `databaseCenterIntegrationEnabled` | `boolean` | No | Optional. If true, instance metadata is sent to the Database Center. If false, instance metadata is not sent to the Database Center. |
| `diskEncryptionStatus` | `object` | No | Disk encryption status for an instance. |
| `serverCaCert` | `object` | No | SslCerts Resource |
| `replicationCluster` | `object` | No | A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL. |
| `etag` | `string` | No | This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead. |
| `geminiConfig` | `object` | No | Gemini instance configuration. |
| `maintenanceVersion` | `string` | No | The current software version on the instance. |
| `maxDiskSize` | `string \| number` | No | The maximum disk size of the instance in bytes. |
| `failoverReplica` | `object` | No | The name and status of the failover replica. |
| `skipPrecheck` | `boolean` | No | Optional. Input only. Determines whether the precheck step is skipped during a major version upgrade. |
| `databaseVersion` | `SQL_DATABASE_VERSION_UNSPECIFIED \| MYSQL_5_1 \| MYSQL_5_5 \| MYSQL_5_6 \| MYSQL_5_7 \| MYSQL_8_0 \| MYSQL_8_0_18 \| MYSQL_8_0_26 \| MYSQL_8_0_27 \| MYSQL_8_0_28 \| MYSQL_8_0_29 \| MYSQL_8_0_30 \| MYSQL_8_0_31 \| MYSQL_8_0_32 \| MYSQL_8_0_33 \| MYSQL_8_0_34 \| MYSQL_8_0_35 \| MYSQL_8_0_36 \| MYSQL_8_0_37 \| MYSQL_8_0_39 \| MYSQL_8_0_40 \| MYSQL_8_0_41 \| MYSQL_8_0_42 \| MYSQL_8_0_43 \| MYSQL_8_0_44 \| MYSQL_8_0_45 \| MYSQL_8_0_46 \| MYSQL_8_4 \| MYSQL_9_7 \| SQLSERVER_2017_STANDARD \| SQLSERVER_2017_ENTERPRISE \| SQLSERVER_2017_EXPRESS \| SQLSERVER_2017_WEB \| POSTGRES_9_6 \| POSTGRES_10 \| POSTGRES_11 \| POSTGRES_12 \| POSTGRES_13 \| POSTGRES_14 \| POSTGRES_15 \| POSTGRES_16 \| POSTGRES_17 \| POSTGRES_18 \| POSTGRES_19 \| POSTGRES_20 \| SQLSERVER_2019_STANDARD \| SQLSERVER_2019_ENTERPRISE \| SQLSERVER_2019_EXPRESS \| SQLSERVER_2019_WEB \| SQLSERVER_2022_STANDARD \| SQLSERVER_2022_ENTERPRISE \| SQLSERVER_2022_EXPRESS \| SQLSERVER_2022_WEB \| SQLSERVER_2025_STANDARD \| SQLSERVER_2025_ENTERPRISE \| SQLSERVER_2025_EXPRESS` | No | The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. |
| `suspensionReason` | `(SQL_SUSPENSION_REASON_UNSPECIFIED \| BILLING_ISSUE \| LEGAL_ISSUE \| OPERATIONAL_ISSUE \| KMS_KEY_ISSUE \| PROJECT_ABUSE)[]` | No | If the instance state is SUSPENDED, the reason for the suspension. |
| `region` | `string` | No | The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `"" : ""`. For example, a single resource can have the following tags: `"123/environment": "production", "123/costCenter": "marketing",` For more information on tag creation and management, see [https://cloud.google.com/resource-manager/docs/tags/tags-overview](https://cloud.google.com/resource-manager/docs/tags/tags-overview). |
| `scheduledMaintenance` | `object` | No | Any scheduled maintenance for this instance. |
| `outOfDiskReport` | `object` | No | This message wraps up the information written by out-of-disk detection job. |
| `replicaNames` | `string[]` | No | The replicas of the instance. |

> [accordion] ipAddresses full type
>
> ```ts theme={null}
> {
>   ipAddress?: string,
>   timeToRetire?: string,
>   type?: SQL_IP_ADDRESS_TYPE_UNSPECIFIED | PRIMARY | OUTGOING | PRIVATE | MIGRATED_1ST_GEN
> }[]
> ```

> [accordion] onPremisesConfiguration full type
>
> ```ts theme={null}
> {
>   dumpFilePath?: string,
>   sslOption?: SSL_OPTION_UNSPECIFIED | DISABLE | REQUIRE | VERIFY_CA,
>   password?: string,
>   kind?: string,
>   selectedObjects?: {
>     database?: string
>   }[],
>   sourceInstance?: {
>     region?: string,
>     name?: string,
>     project?: string
>   },
>   caCertificate?: string,
>   hostPort?: string,
>   username?: string,
>   clientKey?: string,
>   clientCertificate?: string
> }
> ```

> [accordion] replicaConfiguration full type
>
> ```ts theme={null}
> {
>   mysqlReplicaConfiguration?: {
>     sslCipher?: string,
>     username?: string,
>     clientCertificate?: string,
>     masterHeartbeatPeriod?: string | number,
>     clientKey?: string,
>     password?: string,
>     connectRetryInterval?: number,
>     kind?: string,
>     verifyServerCertificate?: boolean,
>     dumpFilePath?: string,
>     caCertificate?: string
>   },
>   failoverTarget?: boolean,
>   kind?: string,
>   cascadableReplica?: boolean
> }
> ```

> [accordion] diskEncryptionConfiguration full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string,
>   kind?: string,
>   confidentialMode?: boolean,
>   cmekSourceLogEncryptionEnforced?: boolean
> }
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   dataDiskType?: SQL_DATA_DISK_TYPE_UNSPECIFIED | PD_SSD | PD_HDD | OBSOLETE_LOCAL_SSD | HYPERDISK_BALANCED,
>   availabilityType?: SQL_AVAILABILITY_TYPE_UNSPECIFIED | ZONAL | REGIONAL,
>   enableGoogleMlIntegration?: boolean,
>   dataDiskSizeGb?: string | number,
>   enableDataplexIntegration?: boolean,
>   dataDiskProvisionedIops?: string | number,
>   performanceCaptureConfig?: {
>     transactionKillExcludedUserHosts?: string[],
>     probeThreshold?: number,
>     historyListLengthThresholdCount?: number,
>     transactionKillType?: TRANSACTION_KILL_TYPE_UNSPECIFIED | READ_ONLY_TRANSACTIONS | ALL_TRANSACTIONS,
>     secondsBehindSourceThreshold?: number,
>     memoryUsageThresholdPercent?: number,
>     transactionLockWaitThresholdCount?: number,
>     transactionDurationThreshold?: number,
>     probingIntervalSeconds?: number,
>     enabled?: boolean,
>     runningThreadsThreshold?: number,
>     cpuUtilizationThresholdPercent?: number,
>     semaphoreWaitThresholdCount?: number,
>     transactionKillThresholdSeconds?: number
>   },
>   retainBackupsOnDelete?: boolean,
>   sqlServerAuditConfig?: {
>     bucket?: string,
>     retentionInterval?: string,
>     kind?: string,
>     uploadInterval?: string
>   },
>   timeZone?: string,
>   replicationType?: SQL_REPLICATION_TYPE_UNSPECIFIED | SYNCHRONOUS | ASYNCHRONOUS,
>   replicationLagMaxSeconds?: number,
>   dataApiAccess?: DATA_API_ACCESS_UNSPECIFIED | DISALLOW_DATA_API | ALLOW_DATA_API,
>   tier?: string,
>   backupConfiguration?: {
>     enabled?: boolean,
>     backupRetentionSettings?: {
>       retainedBackups?: number,
>       retentionUnit?: RETENTION_UNIT_UNSPECIFIED | COUNT
>     },
>     kind?: string,
>     transactionLogRetentionDays?: number,
>     location?: string,
>     startTime?: string,
>     pointInTimeRecoveryEnabled?: boolean,
>     replicationLogArchivingEnabled?: boolean,
>     binaryLogEnabled?: boolean
>   },
>   userLabels?: Record<string, string>,
>   autoUpgradeEnabled?: boolean,
>   pricingPlan?: SQL_PRICING_PLAN_UNSPECIFIED | PACKAGE | PER_USE,
>   kind?: string,
>   dataCacheConfig?: {
>     dataCacheEnabled?: boolean
>   },
>   readPoolAutoScaleConfig?: {
>     disableScaleIn?: boolean,
>     targetMetrics?: {
>       targetValue?: number,
>       metric?: string
>     }[],
>     scaleInCooldownSeconds?: number,
>     maxNodeCount?: number,
>     scaleOutCooldownSeconds?: number,
>     minNodeCount?: number,
>     enabled?: boolean
>   },
>   collation?: string,
>   activeDirectoryConfig?: {
>     mode?: ACTIVE_DIRECTORY_MODE_UNSPECIFIED | MANAGED_ACTIVE_DIRECTORY | SELF_MANAGED_ACTIVE_DIRECTORY | CUSTOMER_MANAGED_ACTIVE_DIRECTORY,
>     dnsServers?: string[],
>     domain?: string,
>     kind?: string,
>     organizationalUnit?: string,
>     adminCredentialSecretName?: string
>   },
>   edition?: EDITION_UNSPECIFIED | ENTERPRISE | ENTERPRISE_PLUS | DEVELOPER,
>   crashSafeReplicationEnabled?: boolean,
>   locationPreference?: {
>     zone?: string,
>     followGaeApplication?: string,
>     kind?: string,
>     secondaryZone?: string
>   },
>   insightsConfig?: {
>     queryPlansPerMinute?: number,
>     queryInsightsEnabled?: boolean,
>     recordApplicationTags?: boolean,
>     queryStringLength?: number,
>     recordClientAddress?: boolean,
>     enhancedQueryInsightsEnabled?: boolean
>   },
>   maintenanceWindow?: {
>     kind?: string,
>     updateTrack?: SQL_UPDATE_TRACK_UNSPECIFIED | canary | stable | week5,
>     day?: number,
>     hour?: number
>   },
>   denyMaintenancePeriods?: {
>     startDate?: string,
>     endDate?: string,
>     time?: string
>   }[],
>   databaseFlags?: {
>     value?: string,
>     name?: string
>   }[],
>   databaseReplicationEnabled?: boolean,
>   authorizedGaeApplications?: string[],
>   storageAutoResizeLimit?: string | number,
>   connectorEnforcement?: CONNECTOR_ENFORCEMENT_UNSPECIFIED | NOT_REQUIRED | REQUIRED,
>   ipConfiguration?: {
>     ipv4Enabled?: boolean,
>     requireSsl?: boolean,
>     pscConfig?: {
>       pscWriteEndpointDnsEnabled?: boolean,
>       pscAutoConnectionPolicyEnabled?: boolean,
>       pscAutoConnections?: {
>         consumerNetworkStatus?: string,
>         status?: string,
>         ipAddress?: string,
>         consumerProject?: string,
>         consumerNetwork?: string
>       }[],
>       allowedConsumerProjects?: string[],
>       networkAttachmentUri?: string,
>       pscEnabled?: boolean,
>       pscAutoDnsEnabled?: boolean
>     },
>     serverCaMode?: CA_MODE_UNSPECIFIED | GOOGLE_MANAGED_INTERNAL_CA | GOOGLE_MANAGED_CAS_CA | CUSTOMER_MANAGED_CAS_CA,
>     enablePrivatePathForGoogleCloudServices?: boolean,
>     customSubjectAlternativeNames?: string[],
>     privateNetwork?: string,
>     sslMode?: SSL_MODE_UNSPECIFIED | ALLOW_UNENCRYPTED_AND_ENCRYPTED | ENCRYPTED_ONLY | TRUSTED_CLIENT_CERTIFICATE_REQUIRED,
>     serverCertificateRotationMode?: SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED | NO_AUTOMATIC_ROTATION | AUTOMATIC_ROTATION_DURING_MAINTENANCE,
>     authorizedNetworks?: {
>       kind?: string,
>       value?: string,
>       expirationTime?: string,
>       name?: string
>     }[],
>     allocatedIpRange?: string,
>     serverCaPool?: string
>   },
>   entraidConfig?: {
>     tenantId?: string,
>     applicationId?: string
>   },
>   passwordValidationPolicy?: {
>     minLength?: number,
>     enablePasswordPolicy?: boolean,
>     disallowUsernameSubstring?: boolean,
>     passwordChangeInterval?: string,
>     disallowCompromisedCredentials?: boolean,
>     reuseInterval?: number,
>     complexity?: COMPLEXITY_UNSPECIFIED | COMPLEXITY_DEFAULT
>   },
>   finalBackupConfig?: {
>     enabled?: boolean,
>     retentionDays?: number
>   },
>   dataDiskProvisionedThroughput?: string | number,
>   advancedMachineFeatures?: {
>     threadsPerCore?: number
>   },
>   storageAutoResize?: boolean,
>   activationPolicy?: SQL_ACTIVATION_POLICY_UNSPECIFIED | ALWAYS | NEVER | ON_DEMAND,
>   settingsVersion?: string | number,
>   acceleratedReplicaMode?: boolean,
>   deletionProtectionEnabled?: boolean,
>   connectionPoolConfig?: {
>     connectionPoolingEnabled?: boolean,
>     flags?: {
>       value?: string,
>       name?: string
>     }[]
>   }
> }
> ```

> [accordion] diskEncryptionStatus full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string,
>   kind?: string
> }
> ```

> [accordion] serverCaCert full type
>
> ```ts theme={null}
> {
>   kind?: string,
>   cert?: string,
>   commonName?: string,
>   createTime?: string,
>   expirationTime?: string,
>   instance?: string,
>   certSerialNumber?: string,
>   selfLink?: string,
>   sha1Fingerprint?: string
> }
> ```

> [accordion] replicationCluster full type
>
> ```ts theme={null}
> {
>   failoverDrReplicaName?: string
> }
> ```

> [accordion] geminiConfig full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] failoverReplica full type
>
> ```ts theme={null}
> {
>   name?: string,
>   available?: boolean
> }
> ```

> [accordion] scheduledMaintenance full type
>
> ```ts theme={null}
> {
>   canDefer?: boolean,
>   scheduleDeadlineTime?: string,
>   startTime?: string,
>   canReschedule?: boolean
> }
> ```

> [accordion] outOfDiskReport full type
>
> ```ts theme={null}
> {
>   sqlOutOfDiskState?: SQL_OUT_OF_DISK_STATE_UNSPECIFIED | NORMAL | SOFT_SHUTDOWN,
>   sqlMinRecommendedIncreaseSizeGb?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.performDiskShrink

`sql.instances.performDiskShrink`

Perform Disk Shrink on primary instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.performDiskShrink({ project: 'demo-project', instance: 'app-db', targetSizeGb: '20' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `targetSizeGb` | `string \| number` | No | The target disk shrink size in GigaBytes. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.pointInTimeRestore

`sql.instances.pointInTimeRestore`

Point in time restore for an instance managed by Google Cloud Backup and Disaster Recovery

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.pointInTimeRestore({
	parent: 'projects/demo-project',
	datasource: 'projects/demo-project/locations/us-central1/backupVaults/vault/dataSources/app-db',
	pointInTime: '2026-12-02T09:00:00Z',
	targetInstance: 'app-db-restored',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource where you created this instance. Format: projects/\{project} Format: `projects/<id>`. |
| `targetInstance` | `string` | No | Target instance name. |
| `targetInstanceSettings` | `object` | No | A Cloud SQL instance resource. |
| `privateNetwork` | `string` | No | Optional. The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. |
| `preferredZone` | `string` | No | Optional. Point-in-time recovery of an instance to the specified zone. If no zone is specified, then clone to the same primary zone as the source instance. |
| `region` | `string` | No | Optional. The region of the target instance where the datasource will be restored. For example: "us-central1". |
| `allocatedIpRange` | `string` | No | Optional. The name of the allocated IP range for the internal IP Cloud SQL instance. For example: "google-managed-services-default". If you set this, then Cloud SQL creates the IP address for the cloned instance in the allocated range. This range must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035) standards. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. Reserved for future use. |
| `preferredSecondaryZone` | `string` | No | Optional. Point-in-time recovery of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred\_zone field. |
| `pointInTime` | `string` | No | Required. The date and time to which you want to restore the instance. |
| `targetInstanceClearSettingsFieldNames` | `string[]` | No | Optional. Specifies the instance settings that will be cleared from the source instance. This field is only applicable for cross project PITRs. |
| `datasource` | `string` | No | The Backup and Disaster Recovery (DR) Service Datasource URI. Format: projects/\{project}/locations/\{region}/backupVaults/\{backupvault}/dataSources/\{datasource}. |

> [accordion] targetInstanceSettings full type
>
> ```ts theme={null}
> {
>   secondaryGceZone?: string,
>   currentDiskSize?: string | number,
>   ipAddresses?: {
>     ipAddress?: string,
>     timeToRetire?: string,
>     type?: SQL_IP_ADDRESS_TYPE_UNSPECIFIED | PRIMARY | OUTGOING | PRIVATE | MIGRATED_1ST_GEN
>   }[],
>   instanceType?: SQL_INSTANCE_TYPE_UNSPECIFIED | CLOUD_SQL_INSTANCE | ON_PREMISES_INSTANCE | READ_REPLICA_INSTANCE | READ_POOL_INSTANCE | GREEN_INSTANCE,
>   sqlNetworkArchitecture?: SQL_NETWORK_ARCHITECTURE_UNSPECIFIED | NEW_NETWORK_ARCHITECTURE | OLD_NETWORK_ARCHITECTURE,
>   kind?: string,
>   connectionName?: string,
>   masterInstanceName?: string,
>   nodeCount?: number,
>   state?: SQL_INSTANCE_STATE_UNSPECIFIED | RUNNABLE | SUSPENDED | PENDING_DELETE | PENDING_CREATE | MAINTENANCE | FAILED | ONLINE_MAINTENANCE | REPAIRING,
>   switchTransactionLogsToCloudStorageEnabled?: boolean,
>   serviceAccountEmailAddress?: string,
>   onPremisesConfiguration?: {
>     dumpFilePath?: string,
>     sslOption?: SSL_OPTION_UNSPECIFIED | DISABLE | REQUIRE | VERIFY_CA,
>     password?: string,
>     kind?: string,
>     selectedObjects?: {
>       database?: string
>     }[],
>     sourceInstance?: {
>       region?: string,
>       name?: string,
>       project?: string
>     },
>     caCertificate?: string,
>     hostPort?: string,
>     username?: string,
>     clientKey?: string,
>     clientCertificate?: string
>   },
>   rootPassword?: string,
>   replicaConfiguration?: {
>     mysqlReplicaConfiguration?: {
>       sslCipher?: string,
>       username?: string,
>       clientCertificate?: string,
>       masterHeartbeatPeriod?: string | number,
>       clientKey?: string,
>       password?: string,
>       connectRetryInterval?: number,
>       kind?: string,
>       verifyServerCertificate?: boolean,
>       dumpFilePath?: string,
>       caCertificate?: string
>     },
>     failoverTarget?: boolean,
>     kind?: string,
>     cascadableReplica?: boolean
>   },
>   gceZone?: string,
>   ipv6Address?: string,
>   diskEncryptionConfiguration?: {
>     kmsKeyName?: string,
>     kind?: string,
>     confidentialMode?: boolean,
>     cmekSourceLogEncryptionEnforced?: boolean
>   },
>   includeReplicasForMajorVersionUpgrade?: boolean,
>   name?: string,
>   backendType?: SQL_BACKEND_TYPE_UNSPECIFIED | FIRST_GEN | SECOND_GEN | EXTERNAL,
>   project?: string,
>   databaseCenterIntegration?: DATABASE_CENTER_INTEGRATION_UNSPECIFIED | ENABLED | DISABLED,
>   settings?: {
>     dataDiskType?: SQL_DATA_DISK_TYPE_UNSPECIFIED | PD_SSD | PD_HDD | OBSOLETE_LOCAL_SSD | HYPERDISK_BALANCED,
>     availabilityType?: SQL_AVAILABILITY_TYPE_UNSPECIFIED | ZONAL | REGIONAL,
>     enableGoogleMlIntegration?: boolean,
>     dataDiskSizeGb?: string | number,
>     enableDataplexIntegration?: boolean,
>     dataDiskProvisionedIops?: string | number,
>     performanceCaptureConfig?: {
>       transactionKillExcludedUserHosts?: string[],
>       probeThreshold?: number,
>       historyListLengthThresholdCount?: number,
>       transactionKillType?: TRANSACTION_KILL_TYPE_UNSPECIFIED | READ_ONLY_TRANSACTIONS | ALL_TRANSACTIONS,
>       secondsBehindSourceThreshold?: number,
>       memoryUsageThresholdPercent?: number,
>       transactionLockWaitThresholdCount?: number,
>       transactionDurationThreshold?: number,
>       probingIntervalSeconds?: number,
>       enabled?: boolean,
>       runningThreadsThreshold?: number,
>       cpuUtilizationThresholdPercent?: number,
>       semaphoreWaitThresholdCount?: number,
>       transactionKillThresholdSeconds?: number
>     },
>     retainBackupsOnDelete?: boolean,
>     sqlServerAuditConfig?: {
>       bucket?: string,
>       retentionInterval?: string,
>       kind?: string,
>       uploadInterval?: string
>     },
>     timeZone?: string,
>     replicationType?: SQL_REPLICATION_TYPE_UNSPECIFIED | SYNCHRONOUS | ASYNCHRONOUS,
>     replicationLagMaxSeconds?: number,
>     dataApiAccess?: DATA_API_ACCESS_UNSPECIFIED | DISALLOW_DATA_API | ALLOW_DATA_API,
>     tier?: string,
>     backupConfiguration?: {
>       enabled?: boolean,
>       backupRetentionSettings?: {
>         retainedBackups?: number,
>         retentionUnit?: RETENTION_UNIT_UNSPECIFIED | COUNT
>       },
>       kind?: string,
>       transactionLogRetentionDays?: number,
>       location?: string,
>       startTime?: string,
>       pointInTimeRecoveryEnabled?: boolean,
>       replicationLogArchivingEnabled?: boolean,
>       binaryLogEnabled?: boolean
>     },
>     userLabels?: Record<string, string>,
>     autoUpgradeEnabled?: boolean,
>     pricingPlan?: SQL_PRICING_PLAN_UNSPECIFIED | PACKAGE | PER_USE,
>     kind?: string,
>     dataCacheConfig?: {
>       dataCacheEnabled?: boolean
>     },
>     readPoolAutoScaleConfig?: {
>       disableScaleIn?: boolean,
>       targetMetrics?: {
>         targetValue?: number,
>         metric?: string
>       }[],
>       scaleInCooldownSeconds?: number,
>       maxNodeCount?: number,
>       scaleOutCooldownSeconds?: number,
>       minNodeCount?: number,
>       enabled?: boolean
>     },
>     collation?: string,
>     activeDirectoryConfig?: {
>       mode?: ACTIVE_DIRECTORY_MODE_UNSPECIFIED | MANAGED_ACTIVE_DIRECTORY | SELF_MANAGED_ACTIVE_DIRECTORY | CUSTOMER_MANAGED_ACTIVE_DIRECTORY,
>       dnsServers?: string[],
>       domain?: string,
>       kind?: string,
>       organizationalUnit?: string,
>       adminCredentialSecretName?: string
>     },
>     edition?: EDITION_UNSPECIFIED | ENTERPRISE | ENTERPRISE_PLUS | DEVELOPER,
>     crashSafeReplicationEnabled?: boolean,
>     locationPreference?: {
>       zone?: string,
>       followGaeApplication?: string,
>       kind?: string,
>       secondaryZone?: string
>     },
>     insightsConfig?: {
>       queryPlansPerMinute?: number,
>       queryInsightsEnabled?: boolean,
>       recordApplicationTags?: boolean,
>       queryStringLength?: number,
>       recordClientAddress?: boolean,
>       enhancedQueryInsightsEnabled?: boolean
>     },
>     maintenanceWindow?: {
>       kind?: string,
>       updateTrack?: SQL_UPDATE_TRACK_UNSPECIFIED | canary | stable | week5,
>       day?: number,
>       hour?: number
>     },
>     denyMaintenancePeriods?: {
>       startDate?: string,
>       endDate?: string,
>       time?: string
>     }[],
>     databaseFlags?: {
>       value?: string,
>       name?: string
>     }[],
>     databaseReplicationEnabled?: boolean,
>     authorizedGaeApplications?: string[],
>     storageAutoResizeLimit?: string | number,
>     connectorEnforcement?: CONNECTOR_ENFORCEMENT_UNSPECIFIED | NOT_REQUIRED | REQUIRED,
>     ipConfiguration?: {
>       ipv4Enabled?: boolean,
>       requireSsl?: boolean,
>       pscConfig?: {
>         pscWriteEndpointDnsEnabled?: boolean,
>         pscAutoConnectionPolicyEnabled?: boolean,
>         pscAutoConnections?: {
>           consumerNetworkStatus?: string,
>           status?: string,
>           ipAddress?: string,
>           consumerProject?: string,
>           consumerNetwork?: string
>         }[],
>         allowedConsumerProjects?: string[],
>         networkAttachmentUri?: string,
>         pscEnabled?: boolean,
>         pscAutoDnsEnabled?: boolean
>       },
>       serverCaMode?: CA_MODE_UNSPECIFIED | GOOGLE_MANAGED_INTERNAL_CA | GOOGLE_MANAGED_CAS_CA | CUSTOMER_MANAGED_CAS_CA,
>       enablePrivatePathForGoogleCloudServices?: boolean,
>       customSubjectAlternativeNames?: string[],
>       privateNetwork?: string,
>       sslMode?: SSL_MODE_UNSPECIFIED | ALLOW_UNENCRYPTED_AND_ENCRYPTED | ENCRYPTED_ONLY | TRUSTED_CLIENT_CERTIFICATE_REQUIRED,
>       serverCertificateRotationMode?: SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED | NO_AUTOMATIC_ROTATION | AUTOMATIC_ROTATION_DURING_MAINTENANCE,
>       authorizedNetworks?: {
>         kind?: string,
>         value?: string,
>         expirationTime?: string,
>         name?: string
>       }[],
>       allocatedIpRange?: string,
>       serverCaPool?: string
>     },
>     entraidConfig?: {
>       tenantId?: string,
>       applicationId?: string
>     },
>     passwordValidationPolicy?: {
>       minLength?: number,
>       enablePasswordPolicy?: boolean,
>       disallowUsernameSubstring?: boolean,
>       passwordChangeInterval?: string,
>       disallowCompromisedCredentials?: boolean,
>       reuseInterval?: number,
>       complexity?: COMPLEXITY_UNSPECIFIED | COMPLEXITY_DEFAULT
>     },
>     finalBackupConfig?: {
>       enabled?: boolean,
>       retentionDays?: number
>     },
>     dataDiskProvisionedThroughput?: string | number,
>     advancedMachineFeatures?: {
>       threadsPerCore?: number
>     },
>     storageAutoResize?: boolean,
>     activationPolicy?: SQL_ACTIVATION_POLICY_UNSPECIFIED | ALWAYS | NEVER | ON_DEMAND,
>     settingsVersion?: string | number,
>     acceleratedReplicaMode?: boolean,
>     deletionProtectionEnabled?: boolean,
>     connectionPoolConfig?: {
>       connectionPoolingEnabled?: boolean,
>       flags?: {
>         value?: string,
>         name?: string
>       }[]
>     }
>   },
>   satisfiesPzs?: boolean,
>   selfLink?: string,
>   databaseCenterIntegrationEnabled?: boolean,
>   diskEncryptionStatus?: {
>     kmsKeyVersionName?: string,
>     kind?: string
>   },
>   serverCaCert?: {
>     kind?: string,
>     cert?: string,
>     commonName?: string,
>     createTime?: string,
>     expirationTime?: string,
>     instance?: string,
>     certSerialNumber?: string,
>     selfLink?: string,
>     sha1Fingerprint?: string
>   },
>   replicationCluster?: {
>     failoverDrReplicaName?: string
>   },
>   etag?: string,
>   geminiConfig?: {
>   },
>   maintenanceVersion?: string,
>   maxDiskSize?: string | number,
>   failoverReplica?: {
>     name?: string,
>     available?: boolean
>   },
>   skipPrecheck?: boolean,
>   databaseVersion?: SQL_DATABASE_VERSION_UNSPECIFIED | MYSQL_5_1 | MYSQL_5_5 | MYSQL_5_6 | MYSQL_5_7 | MYSQL_8_0 | MYSQL_8_0_18 | MYSQL_8_0_26 | MYSQL_8_0_27 | MYSQL_8_0_28 | MYSQL_8_0_29 | MYSQL_8_0_30 | MYSQL_8_0_31 | MYSQL_8_0_32 | MYSQL_8_0_33 | MYSQL_8_0_34 | MYSQL_8_0_35 | MYSQL_8_0_36 | MYSQL_8_0_37 | MYSQL_8_0_39 | MYSQL_8_0_40 | MYSQL_8_0_41 | MYSQL_8_0_42 | MYSQL_8_0_43 | MYSQL_8_0_44 | MYSQL_8_0_45 | MYSQL_8_0_46 | MYSQL_8_4 | MYSQL_9_7 | SQLSERVER_2017_STANDARD | SQLSERVER_2017_ENTERPRISE | SQLSERVER_2017_EXPRESS | SQLSERVER_2017_WEB | POSTGRES_9_6 | POSTGRES_10 | POSTGRES_11 | POSTGRES_12 | POSTGRES_13 | POSTGRES_14 | POSTGRES_15 | POSTGRES_16 | POSTGRES_17 | POSTGRES_18 | POSTGRES_19 | POSTGRES_20 | SQLSERVER_2019_STANDARD | SQLSERVER_2019_ENTERPRISE | SQLSERVER_2019_EXPRESS | SQLSERVER_2019_WEB | SQLSERVER_2022_STANDARD | SQLSERVER_2022_ENTERPRISE | SQLSERVER_2022_EXPRESS | SQLSERVER_2022_WEB | SQLSERVER_2025_STANDARD | SQLSERVER_2025_ENTERPRISE | SQLSERVER_2025_EXPRESS,
>   suspensionReason?: (SQL_SUSPENSION_REASON_UNSPECIFIED | BILLING_ISSUE | LEGAL_ISSUE | OPERATIONAL_ISSUE | KMS_KEY_ISSUE | PROJECT_ABUSE)[],
>   region?: string,
>   tags?: Record<string, string>,
>   scheduledMaintenance?: {
>     canDefer?: boolean,
>     scheduleDeadlineTime?: string,
>     startTime?: string,
>     canReschedule?: boolean
>   },
>   outOfDiskReport?: {
>     sqlOutOfDiskState?: SQL_OUT_OF_DISK_STATE_UNSPECIFIED | NORMAL | SOFT_SHUTDOWN,
>     sqlMinRecommendedIncreaseSizeGb?: number
>   },
>   replicaNames?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.preCheckMajorVersionUpgrade

`sql.instances.preCheckMajorVersionUpgrade`

Execute MVU Pre-checks

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.preCheckMajorVersionUpgrade({
	project: 'demo-project',
	instance: 'app-db',
	preCheckMajorVersionUpgradeContext: { targetDatabaseVersion: 'POSTGRES_18' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `preCheckMajorVersionUpgradeContext` | `object` | No | Pre-check major version upgrade context. |

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: SQL_DATABASE_VERSION_UNSPECIFIED | MYSQL_5_1 | MYSQL_5_5 | MYSQL_5_6 | MYSQL_5_7 | MYSQL_8_0 | MYSQL_8_0_18 | MYSQL_8_0_26 | MYSQL_8_0_27 | MYSQL_8_0_28 | MYSQL_8_0_29 | MYSQL_8_0_30 | MYSQL_8_0_31 | MYSQL_8_0_32 | MYSQL_8_0_33 | MYSQL_8_0_34 | MYSQL_8_0_35 | MYSQL_8_0_36 | MYSQL_8_0_37 | MYSQL_8_0_39 | MYSQL_8_0_40 | MYSQL_8_0_41 | MYSQL_8_0_42 | MYSQL_8_0_43 | MYSQL_8_0_44 | MYSQL_8_0_45 | MYSQL_8_0_46 | MYSQL_8_4 | MYSQL_9_7 | SQLSERVER_2017_STANDARD | SQLSERVER_2017_ENTERPRISE | SQLSERVER_2017_EXPRESS | SQLSERVER_2017_WEB | POSTGRES_9_6 | POSTGRES_10 | POSTGRES_11 | POSTGRES_12 | POSTGRES_13 | POSTGRES_14 | POSTGRES_15 | POSTGRES_16 | POSTGRES_17 | POSTGRES_18 | POSTGRES_19 | POSTGRES_20 | SQLSERVER_2019_STANDARD | SQLSERVER_2019_ENTERPRISE | SQLSERVER_2019_EXPRESS | SQLSERVER_2019_WEB | SQLSERVER_2022_STANDARD | SQLSERVER_2022_ENTERPRISE | SQLSERVER_2022_EXPRESS | SQLSERVER_2022_WEB | SQLSERVER_2025_STANDARD | SQLSERVER_2025_ENTERPRISE | SQLSERVER_2025_EXPRESS,
>   kind?: string,
>   maxRuntime?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.promoteReplica

`sql.instances.promoteReplica`

Promotes the read replica instance to be an independent Cloud SQL primary instance. Using this operation might cause your instance to restart

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.promoteReplica({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `failover` | `boolean` | No | Set to true to invoke a replica failover to the DR replica. As part of replica failover, the promote operation attempts to add the original primary instance as a replica of the promoted DR replica when the original primary instance comes back online. If set to false or not specified, then the original primary instance becomes an independent Cloud SQL primary instance. |
| `instance` | `string` | Yes | Cloud SQL read replica instance name. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | ID of the project that contains the read replica. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.reencrypt

`sql.instances.reencrypt`

Reencrypt CMEK instance with latest key version

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.reencrypt({
	instance: 'app-db',
	project: 'demo-project',
	backupReencryptionConfig: { backupLimit: 10, backupType: 'AUTOMATED' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `backupReencryptionConfig` | `object` | No | Backup Reencryption Config |

> [accordion] backupReencryptionConfig full type
>
> ```ts theme={null}
> {
>   backupLimit?: number,
>   backupType?: BACKUP_TYPE_UNSPECIFIED | AUTOMATED | ON_DEMAND
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.releaseSsrsLease

`sql.instances.releaseSsrsLease`

Release a lease for the setup of SQL Server Reporting Services (SSRS)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.releaseSsrsLease({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. The Cloud SQL instance ID. This doesn't include the project ID. The instance ID contains lowercase letters, numbers, and hyphens, and it must start with a letter. This ID can have a maximum length of 98 characters. |
| `project` | `string` | Yes | Required. The project ID that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operationId` | `string \| null` | No | The unique identifier for this operation. |

***

### instances.rescheduleMaintenance

`sql.instances.rescheduleMaintenance`

Reschedules the maintenance on the given instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.rescheduleMaintenance({
	project: 'demo-project',
	instance: 'app-db',
	reschedule: { rescheduleType: 'SPECIFIC_TIME', scheduleTime: '2026-12-06T02:00:00Z' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `reschedule` | `object` | No | — |

> [accordion] reschedule full type
>
> ```ts theme={null}
> {
>   rescheduleType?: RESCHEDULE_TYPE_UNSPECIFIED | IMMEDIATE | NEXT_AVAILABLE_WINDOW | SPECIFIC_TIME,
>   scheduleTime?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.resetReplicaSize

`sql.instances.resetReplicaSize`

Reset Replica Size to primary instance disk size

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.resetReplicaSize({ project: 'demo-project', instance: 'app-db', location: 'us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | ID of the project that contains the read replica. |
| `instance` | `string` | Yes | Cloud SQL read replica instance name. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.resetSslConfig

`sql.instances.resetSslConfig`

Deletes all client certificates and generates a new server SSL certificate for the instance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.instances.resetSslConfig({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `mode` | `RESET_SSL_MODE_UNSPECIFIED \| ALL \| SYNC_FROM_PRIMARY` | No | Optional. Reset SSL mode to use. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.restart

`sql.instances.restart`

Restarts a Cloud SQL instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.restart({ project: 'demo-project', instance: 'app-db' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID of the project that contains the instance to be restarted. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.restoreBackup

`sql.instances.restoreBackup`

Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.instances.restoreBackup({
	instance: 'app-db',
	project: 'demo-project',
	restoreBackupContext: { backupRunId: '1700000000000', instanceId: 'app-db', project: 'demo-project' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `restoreInstanceSettings` | `object` | No | A Cloud SQL instance resource. |
| `ignoreMaintenanceVersion` | `boolean` | No | Optional. If true, the restore operation proceeds even if the target instance's maintenance version is older than the source instance's maintenance version. |
| `backupdrBackup` | `string` | No | The name of the backup that's used to restore a Cloud SQL instance: Format: "projects/\{project-id}/locations/\{location}/backupVaults/\{backupvault}/dataSources/\{datasource}/backups/\{backup-uid}". Only one of restore\_backup\_context, backup, backupdr\_backup can be passed to the input. |
| `backup` | `string` | No | The name of the backup that's used to restore a Cloud SQL instance: Format: projects/\{project-id}/backups/\{backup-uid}. Only one of restore\_backup\_context, backup, backupdr\_backup can be passed to the input. |
| `restoreBackupContext` | `object` | No | Database instance restore from backup context. Backup context contains source instance id and project id. |
| `restoreInstanceClearOverridesFieldNames` | `string[]` | No | Optional. This field has the same purpose as restore\_instance\_settings, changes any instance settings stored in the backup you are restoring from. With the difference that these fields are cleared in the settings. |

> [accordion] restoreInstanceSettings full type
>
> ```ts theme={null}
> {
>   secondaryGceZone?: string,
>   currentDiskSize?: string | number,
>   ipAddresses?: {
>     ipAddress?: string,
>     timeToRetire?: string,
>     type?: SQL_IP_ADDRESS_TYPE_UNSPECIFIED | PRIMARY | OUTGOING | PRIVATE | MIGRATED_1ST_GEN
>   }[],
>   instanceType?: SQL_INSTANCE_TYPE_UNSPECIFIED | CLOUD_SQL_INSTANCE | ON_PREMISES_INSTANCE | READ_REPLICA_INSTANCE | READ_POOL_INSTANCE | GREEN_INSTANCE,
>   sqlNetworkArchitecture?: SQL_NETWORK_ARCHITECTURE_UNSPECIFIED | NEW_NETWORK_ARCHITECTURE | OLD_NETWORK_ARCHITECTURE,
>   kind?: string,
>   connectionName?: string,
>   masterInstanceName?: string,
>   nodeCount?: number,
>   state?: SQL_INSTANCE_STATE_UNSPECIFIED | RUNNABLE | SUSPENDED | PENDING_DELETE | PENDING_CREATE | MAINTENANCE | FAILED | ONLINE_MAINTENANCE | REPAIRING,
>   switchTransactionLogsToCloudStorageEnabled?: boolean,
>   serviceAccountEmailAddress?: string,
>   onPremisesConfiguration?: {
>     dumpFilePath?: string,
>     sslOption?: SSL_OPTION_UNSPECIFIED | DISABLE | REQUIRE | VERIFY_CA,
>     password?: string,
>     kind?: string,
>     selectedObjects?: {
>       database?: string
>     }[],
>     sourceInstance?: {
>       region?: string,
>       name?: string,
>       project?: string
>     },
>     caCertificate?: string,
>     hostPort?: string,
>     username?: string,
>     clientKey?: string,
>     clientCertificate?: string
>   },
>   rootPassword?: string,
>   replicaConfiguration?: {
>     mysqlReplicaConfiguration?: {
>       sslCipher?: string,
>       username?: string,
>       clientCertificate?: string,
>       masterHeartbeatPeriod?: string | number,
>       clientKey?: string,
>       password?: string,
>       connectRetryInterval?: number,
>       kind?: string,
>       verifyServerCertificate?: boolean,
>       dumpFilePath?: string,
>       caCertificate?: string
>     },
>     failoverTarget?: boolean,
>     kind?: string,
>     cascadableReplica?: boolean
>   },
>   gceZone?: string,
>   ipv6Address?: string,
>   diskEncryptionConfiguration?: {
>     kmsKeyName?: string,
>     kind?: string,
>     confidentialMode?: boolean,
>     cmekSourceLogEncryptionEnforced?: boolean
>   },
>   includeReplicasForMajorVersionUpgrade?: boolean,
>   name?: string,
>   backendType?: SQL_BACKEND_TYPE_UNSPECIFIED | FIRST_GEN | SECOND_GEN | EXTERNAL,
>   project?: string,
>   databaseCenterIntegration?: DATABASE_CENTER_INTEGRATION_UNSPECIFIED | ENABLED | DISABLED,
>   settings?: {
>     dataDiskType?: SQL_DATA_DISK_TYPE_UNSPECIFIED | PD_SSD | PD_HDD | OBSOLETE_LOCAL_SSD | HYPERDISK_BALANCED,
>     availabilityType?: SQL_AVAILABILITY_TYPE_UNSPECIFIED | ZONAL | REGIONAL,
>     enableGoogleMlIntegration?: boolean,
>     dataDiskSizeGb?: string | number,
>     enableDataplexIntegration?: boolean,
>     dataDiskProvisionedIops?: string | number,
>     performanceCaptureConfig?: {
>       transactionKillExcludedUserHosts?: string[],
>       probeThreshold?: number,
>       historyListLengthThresholdCount?: number,
>       transactionKillType?: TRANSACTION_KILL_TYPE_UNSPECIFIED | READ_ONLY_TRANSACTIONS | ALL_TRANSACTIONS,
>       secondsBehindSourceThreshold?: number,
>       memoryUsageThresholdPercent?: number,
>       transactionLockWaitThresholdCount?: number,
>       transactionDurationThreshold?: number,
>       probingIntervalSeconds?: number,
>       enabled?: boolean,
>       runningThreadsThreshold?: number,
>       cpuUtilizationThresholdPercent?: number,
>       semaphoreWaitThresholdCount?: number,
>       transactionKillThresholdSeconds?: number
>     },
>     retainBackupsOnDelete?: boolean,
>     sqlServerAuditConfig?: {
>       bucket?: string,
>       retentionInterval?: string,
>       kind?: string,
>       uploadInterval?: string
>     },
>     timeZone?: string,
>     replicationType?: SQL_REPLICATION_TYPE_UNSPECIFIED | SYNCHRONOUS | ASYNCHRONOUS,
>     replicationLagMaxSeconds?: number,
>     dataApiAccess?: DATA_API_ACCESS_UNSPECIFIED | DISALLOW_DATA_API | ALLOW_DATA_API,
>     tier?: string,
>     backupConfiguration?: {
>       enabled?: boolean,
>       backupRetentionSettings?: {
>         retainedBackups?: number,
>         retentionUnit?: RETENTION_UNIT_UNSPECIFIED | COUNT
>       },
>       kind?: string,
>       transactionLogRetentionDays?: number,
>       location?: string,
>       startTime?: string,
>       pointInTimeRecoveryEnabled?: boolean,
>       replicationLogArchivingEnabled?: boolean,
>       binaryLogEnabled?: boolean
>     },
>     userLabels?: Record<string, string>,
>     autoUpgradeEnabled?: boolean,
>     pricingPlan?: SQL_PRICING_PLAN_UNSPECIFIED | PACKAGE | PER_USE,
>     kind?: string,
>     dataCacheConfig?: {
>       dataCacheEnabled?: boolean
>     },
>     readPoolAutoScaleConfig?: {
>       disableScaleIn?: boolean,
>       targetMetrics?: {
>         targetValue?: number,
>         metric?: string
>       }[],
>       scaleInCooldownSeconds?: number,
>       maxNodeCount?: number,
>       scaleOutCooldownSeconds?: number,
>       minNodeCount?: number,
>       enabled?: boolean
>     },
>     collation?: string,
>     activeDirectoryConfig?: {
>       mode?: ACTIVE_DIRECTORY_MODE_UNSPECIFIED | MANAGED_ACTIVE_DIRECTORY | SELF_MANAGED_ACTIVE_DIRECTORY | CUSTOMER_MANAGED_ACTIVE_DIRECTORY,
>       dnsServers?: string[],
>       domain?: string,
>       kind?: string,
>       organizationalUnit?: string,
>       adminCredentialSecretName?: string
>     },
>     edition?: EDITION_UNSPECIFIED | ENTERPRISE | ENTERPRISE_PLUS | DEVELOPER,
>     crashSafeReplicationEnabled?: boolean,
>     locationPreference?: {
>       zone?: string,
>       followGaeApplication?: string,
>       kind?: string,
>       secondaryZone?: string
>     },
>     insightsConfig?: {
>       queryPlansPerMinute?: number,
>       queryInsightsEnabled?: boolean,
>       recordApplicationTags?: boolean,
>       queryStringLength?: number,
>       recordClientAddress?: boolean,
>       enhancedQueryInsightsEnabled?: boolean
>     },
>     maintenanceWindow?: {
>       kind?: string,
>       updateTrack?: SQL_UPDATE_TRACK_UNSPECIFIED | canary | stable | week5,
>       day?: number,
>       hour?: number
>     },
>     denyMaintenancePeriods?: {
>       startDate?: string,
>       endDate?: string,
>       time?: string
>     }[],
>     databaseFlags?: {
>       value?: string,
>       name?: string
>     }[],
>     databaseReplicationEnabled?: boolean,
>     authorizedGaeApplications?: string[],
>     storageAutoResizeLimit?: string | number,
>     connectorEnforcement?: CONNECTOR_ENFORCEMENT_UNSPECIFIED | NOT_REQUIRED | REQUIRED,
>     ipConfiguration?: {
>       ipv4Enabled?: boolean,
>       requireSsl?: boolean,
>       pscConfig?: {
>         pscWriteEndpointDnsEnabled?: boolean,
>         pscAutoConnectionPolicyEnabled?: boolean,
>         pscAutoConnections?: {
>           consumerNetworkStatus?: string,
>           status?: string,
>           ipAddress?: string,
>           consumerProject?: string,
>           consumerNetwork?: string
>         }[],
>         allowedConsumerProjects?: string[],
>         networkAttachmentUri?: string,
>         pscEnabled?: boolean,
>         pscAutoDnsEnabled?: boolean
>       },
>       serverCaMode?: CA_MODE_UNSPECIFIED | GOOGLE_MANAGED_INTERNAL_CA | GOOGLE_MANAGED_CAS_CA | CUSTOMER_MANAGED_CAS_CA,
>       enablePrivatePathForGoogleCloudServices?: boolean,
>       customSubjectAlternativeNames?: string[],
>       privateNetwork?: string,
>       sslMode?: SSL_MODE_UNSPECIFIED | ALLOW_UNENCRYPTED_AND_ENCRYPTED | ENCRYPTED_ONLY | TRUSTED_CLIENT_CERTIFICATE_REQUIRED,
>       serverCertificateRotationMode?: SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED | NO_AUTOMATIC_ROTATION | AUTOMATIC_ROTATION_DURING_MAINTENANCE,
>       authorizedNetworks?: {
>         kind?: string,
>         value?: string,
>         expirationTime?: string,
>         name?: string
>       }[],
>       allocatedIpRange?: string,
>       serverCaPool?: string
>     },
>     entraidConfig?: {
>       tenantId?: string,
>       applicationId?: string
>     },
>     passwordValidationPolicy?: {
>       minLength?: number,
>       enablePasswordPolicy?: boolean,
>       disallowUsernameSubstring?: boolean,
>       passwordChangeInterval?: string,
>       disallowCompromisedCredentials?: boolean,
>       reuseInterval?: number,
>       complexity?: COMPLEXITY_UNSPECIFIED | COMPLEXITY_DEFAULT
>     },
>     finalBackupConfig?: {
>       enabled?: boolean,
>       retentionDays?: number
>     },
>     dataDiskProvisionedThroughput?: string | number,
>     advancedMachineFeatures?: {
>       threadsPerCore?: number
>     },
>     storageAutoResize?: boolean,
>     activationPolicy?: SQL_ACTIVATION_POLICY_UNSPECIFIED | ALWAYS | NEVER | ON_DEMAND,
>     settingsVersion?: string | number,
>     acceleratedReplicaMode?: boolean,
>     deletionProtectionEnabled?: boolean,
>     connectionPoolConfig?: {
>       connectionPoolingEnabled?: boolean,
>       flags?: {
>         value?: string,
>         name?: string
>       }[]
>     }
>   },
>   satisfiesPzs?: boolean,
>   selfLink?: string,
>   databaseCenterIntegrationEnabled?: boolean,
>   diskEncryptionStatus?: {
>     kmsKeyVersionName?: string,
>     kind?: string
>   },
>   serverCaCert?: {
>     kind?: string,
>     cert?: string,
>     commonName?: string,
>     createTime?: string,
>     expirationTime?: string,
>     instance?: string,
>     certSerialNumber?: string,
>     selfLink?: string,
>     sha1Fingerprint?: string
>   },
>   replicationCluster?: {
>     failoverDrReplicaName?: string
>   },
>   etag?: string,
>   geminiConfig?: {
>   },
>   maintenanceVersion?: string,
>   maxDiskSize?: string | number,
>   failoverReplica?: {
>     name?: string,
>     available?: boolean
>   },
>   skipPrecheck?: boolean,
>   databaseVersion?: SQL_DATABASE_VERSION_UNSPECIFIED | MYSQL_5_1 | MYSQL_5_5 | MYSQL_5_6 | MYSQL_5_7 | MYSQL_8_0 | MYSQL_8_0_18 | MYSQL_8_0_26 | MYSQL_8_0_27 | MYSQL_8_0_28 | MYSQL_8_0_29 | MYSQL_8_0_30 | MYSQL_8_0_31 | MYSQL_8_0_32 | MYSQL_8_0_33 | MYSQL_8_0_34 | MYSQL_8_0_35 | MYSQL_8_0_36 | MYSQL_8_0_37 | MYSQL_8_0_39 | MYSQL_8_0_40 | MYSQL_8_0_41 | MYSQL_8_0_42 | MYSQL_8_0_43 | MYSQL_8_0_44 | MYSQL_8_0_45 | MYSQL_8_0_46 | MYSQL_8_4 | MYSQL_9_7 | SQLSERVER_2017_STANDARD | SQLSERVER_2017_ENTERPRISE | SQLSERVER_2017_EXPRESS | SQLSERVER_2017_WEB | POSTGRES_9_6 | POSTGRES_10 | POSTGRES_11 | POSTGRES_12 | POSTGRES_13 | POSTGRES_14 | POSTGRES_15 | POSTGRES_16 | POSTGRES_17 | POSTGRES_18 | POSTGRES_19 | POSTGRES_20 | SQLSERVER_2019_STANDARD | SQLSERVER_2019_ENTERPRISE | SQLSERVER_2019_EXPRESS | SQLSERVER_2019_WEB | SQLSERVER_2022_STANDARD | SQLSERVER_2022_ENTERPRISE | SQLSERVER_2022_EXPRESS | SQLSERVER_2022_WEB | SQLSERVER_2025_STANDARD | SQLSERVER_2025_ENTERPRISE | SQLSERVER_2025_EXPRESS,
>   suspensionReason?: (SQL_SUSPENSION_REASON_UNSPECIFIED | BILLING_ISSUE | LEGAL_ISSUE | OPERATIONAL_ISSUE | KMS_KEY_ISSUE | PROJECT_ABUSE)[],
>   region?: string,
>   tags?: Record<string, string>,
>   scheduledMaintenance?: {
>     canDefer?: boolean,
>     scheduleDeadlineTime?: string,
>     startTime?: string,
>     canReschedule?: boolean
>   },
>   outOfDiskReport?: {
>     sqlOutOfDiskState?: SQL_OUT_OF_DISK_STATE_UNSPECIFIED | NORMAL | SOFT_SHUTDOWN,
>     sqlMinRecommendedIncreaseSizeGb?: number
>   },
>   replicaNames?: string[]
> }
> ```

> [accordion] restoreBackupContext full type
>
> ```ts theme={null}
> {
>   project?: string,
>   backupRunId?: string | number,
>   instanceId?: string,
>   kind?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.rotateEntraIdCertificate

`sql.instances.rotateEntraIdCertificate`

Rotates the server certificate version to one previously added with the addEntraIdCertificate method

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.rotateEntraIdCertificate({
	project: 'demo-project',
	instance: 'app-db',
	rotateEntraIdCertificateContext: { nextVersion: 'abc123' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `rotateEntraIdCertificateContext` | `object` | No | Instance rotate Entra ID certificate context. |

> [accordion] rotateEntraIdCertificateContext full type
>
> ```ts theme={null}
> {
>   nextVersion?: string,
>   kind?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.rotateServerCa

`sql.instances.rotateServerCa`

Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. For instances that have enabled Certificate Authority Service (CAS) based server CA, use RotateServerCertificate to rotate the server certificate

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.rotateServerCa({
	instance: 'app-db',
	project: 'demo-project',
	rotateServerCaContext: { nextVersion: 'abc123' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `rotateServerCaContext` | `object` | No | Instance rotate server CA context. |

> [accordion] rotateServerCaContext full type
>
> ```ts theme={null}
> {
>   kind?: string,
>   nextVersion?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.rotateServerCertificate

`sql.instances.rotateServerCertificate`

Rotates the server certificate version to one previously added with the addServerCertificate method. For instances not using Certificate Authority Service (CAS) server CA, use RotateServerCa instead

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.rotateServerCertificate({
	project: 'demo-project',
	instance: 'app-db',
	rotateServerCertificateContext: { nextVersion: 'abc123' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `rotateServerCertificateContext` | `object` | No | Instance rotate server certificate context. |

> [accordion] rotateServerCertificateContext full type
>
> ```ts theme={null}
> {
>   nextVersion?: string,
>   kind?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.startExternalSync

`sql.instances.startExternalSync`

Start External primary instance migration

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.startExternalSync({ project: 'demo-project', instance: 'app-db', syncMode: 'ONLINE' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `skipVerification` | `boolean` | No | Whether to skip the verification step (VESS). |
| `syncParallelLevel` | `EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED \| MIN \| OPTIMAL \| MAX` | No | Optional. Parallel level for initial data sync. Currently only applicable for MySQL. |
| `replicaOverwriteEnabled` | `boolean` | No | Optional. MySQL only. True if end-user has confirmed that this SES call will wipe replica databases overlapping with the proposed selected\_objects. If this field is not set and there are both overlapping and additional databases proposed, an error will be returned. |
| `mysqlSyncConfig` | `object` | No | MySQL-specific external server sync settings. |
| `syncMode` | `EXTERNAL_SYNC_MODE_UNSPECIFIED \| ONLINE \| OFFLINE` | No | External sync mode. |
| `migrationType` | `MIGRATION_TYPE_UNSPECIFIED \| LOGICAL \| PHYSICAL` | No | Optional. MigrationType configures the migration to use physical files or logical dump files. If not set, then the logical dump file configuration is used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

> [accordion] mysqlSyncConfig full type
>
> ```ts theme={null}
> {
>   initialSyncFlags?: {
>     value?: string,
>     name?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.startReplica

`sql.instances.startReplica`

Starts the replication in the read replica instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.startReplica({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL read replica instance name. |
| `project` | `string` | Yes | ID of the project that contains the read replica. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.stopReplica

`sql.instances.stopReplica`

Stops the replication in the read replica instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.stopReplica({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL read replica instance name. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | ID of the project that contains the read replica. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.switchover

`sql.instances.switchover`

Switches over from the primary instance to the DR replica instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.switchover({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL read replica instance name. |
| `dbTimeout` | `string` | No | Optional. (MySQL and PostgreSQL only) Cloud SQL instance operations timeout, which is a sum of all database operations. Default value is 10 minutes and can be modified to a maximum value of 24 hours. |
| `project` | `string` | Yes | ID of the project that contains the replica. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.truncateLog

`sql.instances.truncateLog`

Truncate MySQL general and slow query log tables MySQL only

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.instances.truncateLog({
	project: 'demo-project',
	instance: 'app-db',
	truncateLogContext: { logType: 'MYSQL_GENERAL_TABLE' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the Cloud SQL project. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `truncateLogContext` | `object` | No | Database Instance truncate log context. |

> [accordion] truncateLogContext full type
>
> ```ts theme={null}
> {
>   logType?: string,
>   kind?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.update

`sql.instances.update`

Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.update({
	project: 'demo-project',
	instance: 'app-db',
	databaseVersion: 'POSTGRES_17',
	region: 'us-central1',
	settings: { tier: 'db-g1-small', edition: 'ENTERPRISE', settingsVersion: '12' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `secondaryGceZone` | `string` | No | The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. |
| `currentDiskSize` | `string \| number` | No | The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes\_used" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details. |
| `ipAddresses` | `object[]` | No | The assigned IP addresses for the instance. |
| `instanceType` | `SQL_INSTANCE_TYPE_UNSPECIFIED \| CLOUD_SQL_INSTANCE \| ON_PREMISES_INSTANCE \| READ_REPLICA_INSTANCE \| READ_POOL_INSTANCE \| GREEN_INSTANCE` | No | The instance type. |
| `sqlNetworkArchitecture` | `SQL_NETWORK_ARCHITECTURE_UNSPECIFIED \| NEW_NETWORK_ARCHITECTURE \| OLD_NETWORK_ARCHITECTURE` | No | — |
| `kind` | `string` | No | This is always `sql#instance`. |
| `connectionName` | `string` | No | Connection name of the Cloud SQL instance used in connection strings. |
| `masterInstanceName` | `string` | No | The name of the instance which will act as primary in the replication setup. |
| `nodeCount` | `number` | No | The number of read pool nodes in a read pool. |
| `state` | `SQL_INSTANCE_STATE_UNSPECIFIED \| RUNNABLE \| SUSPENDED \| PENDING_DELETE \| PENDING_CREATE \| MAINTENANCE \| FAILED \| ONLINE_MAINTENANCE \| REPAIRING` | No | The current serving state of the Cloud SQL instance. |
| `switchTransactionLogsToCloudStorageEnabled` | `boolean` | No | Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage. |
| `serviceAccountEmailAddress` | `string` | No | The service account email address assigned to the instance.\This property is read-only. |
| `onPremisesConfiguration` | `object` | No | On-premises instance configuration. |
| `rootPassword` | `string` | No | Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances. |
| `replicaConfiguration` | `object` | No | Read-replica configuration for connecting to the primary instance. |
| `gceZone` | `string` | No | The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance. |
| `ipv6Address` | `string` | No | The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| `diskEncryptionConfiguration` | `object` | No | Disk encryption configuration for an instance. |
| `includeReplicasForMajorVersionUpgrade` | `boolean` | No | Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated. |
| `name` | `string` | No | Name of the Cloud SQL instance. This does not include the project ID. |
| `backendType` | `SQL_BACKEND_TYPE_UNSPECIFIED \| FIRST_GEN \| SECOND_GEN \| EXTERNAL` | No | The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type. |
| `body_project` | `string` | No | The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| `databaseCenterIntegration` | `DATABASE_CENTER_INTEGRATION_UNSPECIFIED \| ENABLED \| DISABLED` | No | Optional. State of the Database Center integration for this instance. When unspecified, Database Center integration is enabled by default. |
| `settings` | `object` | No | Database instance settings. |
| `satisfiesPzs` | `boolean` | No | This status indicates whether the instance satisfies PZS. The status is reserved for future use. |
| `selfLink` | `string` | No | The URI of this resource. |
| `databaseCenterIntegrationEnabled` | `boolean` | No | Optional. If true, instance metadata is sent to the Database Center. If false, instance metadata is not sent to the Database Center. |
| `diskEncryptionStatus` | `object` | No | Disk encryption status for an instance. |
| `serverCaCert` | `object` | No | SslCerts Resource |
| `replicationCluster` | `object` | No | A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL. |
| `etag` | `string` | No | This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead. |
| `geminiConfig` | `object` | No | Gemini instance configuration. |
| `maintenanceVersion` | `string` | No | The current software version on the instance. |
| `maxDiskSize` | `string \| number` | No | The maximum disk size of the instance in bytes. |
| `failoverReplica` | `object` | No | The name and status of the failover replica. |
| `skipPrecheck` | `boolean` | No | Optional. Input only. Determines whether the precheck step is skipped during a major version upgrade. |
| `databaseVersion` | `SQL_DATABASE_VERSION_UNSPECIFIED \| MYSQL_5_1 \| MYSQL_5_5 \| MYSQL_5_6 \| MYSQL_5_7 \| MYSQL_8_0 \| MYSQL_8_0_18 \| MYSQL_8_0_26 \| MYSQL_8_0_27 \| MYSQL_8_0_28 \| MYSQL_8_0_29 \| MYSQL_8_0_30 \| MYSQL_8_0_31 \| MYSQL_8_0_32 \| MYSQL_8_0_33 \| MYSQL_8_0_34 \| MYSQL_8_0_35 \| MYSQL_8_0_36 \| MYSQL_8_0_37 \| MYSQL_8_0_39 \| MYSQL_8_0_40 \| MYSQL_8_0_41 \| MYSQL_8_0_42 \| MYSQL_8_0_43 \| MYSQL_8_0_44 \| MYSQL_8_0_45 \| MYSQL_8_0_46 \| MYSQL_8_4 \| MYSQL_9_7 \| SQLSERVER_2017_STANDARD \| SQLSERVER_2017_ENTERPRISE \| SQLSERVER_2017_EXPRESS \| SQLSERVER_2017_WEB \| POSTGRES_9_6 \| POSTGRES_10 \| POSTGRES_11 \| POSTGRES_12 \| POSTGRES_13 \| POSTGRES_14 \| POSTGRES_15 \| POSTGRES_16 \| POSTGRES_17 \| POSTGRES_18 \| POSTGRES_19 \| POSTGRES_20 \| SQLSERVER_2019_STANDARD \| SQLSERVER_2019_ENTERPRISE \| SQLSERVER_2019_EXPRESS \| SQLSERVER_2019_WEB \| SQLSERVER_2022_STANDARD \| SQLSERVER_2022_ENTERPRISE \| SQLSERVER_2022_EXPRESS \| SQLSERVER_2022_WEB \| SQLSERVER_2025_STANDARD \| SQLSERVER_2025_ENTERPRISE \| SQLSERVER_2025_EXPRESS` | No | The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. |
| `suspensionReason` | `(SQL_SUSPENSION_REASON_UNSPECIFIED \| BILLING_ISSUE \| LEGAL_ISSUE \| OPERATIONAL_ISSUE \| KMS_KEY_ISSUE \| PROJECT_ABUSE)[]` | No | If the instance state is SUSPENDED, the reason for the suspension. |
| `region` | `string` | No | The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `"" : ""`. For example, a single resource can have the following tags: `"123/environment": "production", "123/costCenter": "marketing",` For more information on tag creation and management, see [https://cloud.google.com/resource-manager/docs/tags/tags-overview](https://cloud.google.com/resource-manager/docs/tags/tags-overview). |
| `scheduledMaintenance` | `object` | No | Any scheduled maintenance for this instance. |
| `outOfDiskReport` | `object` | No | This message wraps up the information written by out-of-disk detection job. |
| `replicaNames` | `string[]` | No | The replicas of the instance. |

> [accordion] ipAddresses full type
>
> ```ts theme={null}
> {
>   ipAddress?: string,
>   timeToRetire?: string,
>   type?: SQL_IP_ADDRESS_TYPE_UNSPECIFIED | PRIMARY | OUTGOING | PRIVATE | MIGRATED_1ST_GEN
> }[]
> ```

> [accordion] onPremisesConfiguration full type
>
> ```ts theme={null}
> {
>   dumpFilePath?: string,
>   sslOption?: SSL_OPTION_UNSPECIFIED | DISABLE | REQUIRE | VERIFY_CA,
>   password?: string,
>   kind?: string,
>   selectedObjects?: {
>     database?: string
>   }[],
>   sourceInstance?: {
>     region?: string,
>     name?: string,
>     project?: string
>   },
>   caCertificate?: string,
>   hostPort?: string,
>   username?: string,
>   clientKey?: string,
>   clientCertificate?: string
> }
> ```

> [accordion] replicaConfiguration full type
>
> ```ts theme={null}
> {
>   mysqlReplicaConfiguration?: {
>     sslCipher?: string,
>     username?: string,
>     clientCertificate?: string,
>     masterHeartbeatPeriod?: string | number,
>     clientKey?: string,
>     password?: string,
>     connectRetryInterval?: number,
>     kind?: string,
>     verifyServerCertificate?: boolean,
>     dumpFilePath?: string,
>     caCertificate?: string
>   },
>   failoverTarget?: boolean,
>   kind?: string,
>   cascadableReplica?: boolean
> }
> ```

> [accordion] diskEncryptionConfiguration full type
>
> ```ts theme={null}
> {
>   kmsKeyName?: string,
>   kind?: string,
>   confidentialMode?: boolean,
>   cmekSourceLogEncryptionEnforced?: boolean
> }
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   dataDiskType?: SQL_DATA_DISK_TYPE_UNSPECIFIED | PD_SSD | PD_HDD | OBSOLETE_LOCAL_SSD | HYPERDISK_BALANCED,
>   availabilityType?: SQL_AVAILABILITY_TYPE_UNSPECIFIED | ZONAL | REGIONAL,
>   enableGoogleMlIntegration?: boolean,
>   dataDiskSizeGb?: string | number,
>   enableDataplexIntegration?: boolean,
>   dataDiskProvisionedIops?: string | number,
>   performanceCaptureConfig?: {
>     transactionKillExcludedUserHosts?: string[],
>     probeThreshold?: number,
>     historyListLengthThresholdCount?: number,
>     transactionKillType?: TRANSACTION_KILL_TYPE_UNSPECIFIED | READ_ONLY_TRANSACTIONS | ALL_TRANSACTIONS,
>     secondsBehindSourceThreshold?: number,
>     memoryUsageThresholdPercent?: number,
>     transactionLockWaitThresholdCount?: number,
>     transactionDurationThreshold?: number,
>     probingIntervalSeconds?: number,
>     enabled?: boolean,
>     runningThreadsThreshold?: number,
>     cpuUtilizationThresholdPercent?: number,
>     semaphoreWaitThresholdCount?: number,
>     transactionKillThresholdSeconds?: number
>   },
>   retainBackupsOnDelete?: boolean,
>   sqlServerAuditConfig?: {
>     bucket?: string,
>     retentionInterval?: string,
>     kind?: string,
>     uploadInterval?: string
>   },
>   timeZone?: string,
>   replicationType?: SQL_REPLICATION_TYPE_UNSPECIFIED | SYNCHRONOUS | ASYNCHRONOUS,
>   replicationLagMaxSeconds?: number,
>   dataApiAccess?: DATA_API_ACCESS_UNSPECIFIED | DISALLOW_DATA_API | ALLOW_DATA_API,
>   tier?: string,
>   backupConfiguration?: {
>     enabled?: boolean,
>     backupRetentionSettings?: {
>       retainedBackups?: number,
>       retentionUnit?: RETENTION_UNIT_UNSPECIFIED | COUNT
>     },
>     kind?: string,
>     transactionLogRetentionDays?: number,
>     location?: string,
>     startTime?: string,
>     pointInTimeRecoveryEnabled?: boolean,
>     replicationLogArchivingEnabled?: boolean,
>     binaryLogEnabled?: boolean
>   },
>   userLabels?: Record<string, string>,
>   autoUpgradeEnabled?: boolean,
>   pricingPlan?: SQL_PRICING_PLAN_UNSPECIFIED | PACKAGE | PER_USE,
>   kind?: string,
>   dataCacheConfig?: {
>     dataCacheEnabled?: boolean
>   },
>   readPoolAutoScaleConfig?: {
>     disableScaleIn?: boolean,
>     targetMetrics?: {
>       targetValue?: number,
>       metric?: string
>     }[],
>     scaleInCooldownSeconds?: number,
>     maxNodeCount?: number,
>     scaleOutCooldownSeconds?: number,
>     minNodeCount?: number,
>     enabled?: boolean
>   },
>   collation?: string,
>   activeDirectoryConfig?: {
>     mode?: ACTIVE_DIRECTORY_MODE_UNSPECIFIED | MANAGED_ACTIVE_DIRECTORY | SELF_MANAGED_ACTIVE_DIRECTORY | CUSTOMER_MANAGED_ACTIVE_DIRECTORY,
>     dnsServers?: string[],
>     domain?: string,
>     kind?: string,
>     organizationalUnit?: string,
>     adminCredentialSecretName?: string
>   },
>   edition?: EDITION_UNSPECIFIED | ENTERPRISE | ENTERPRISE_PLUS | DEVELOPER,
>   crashSafeReplicationEnabled?: boolean,
>   locationPreference?: {
>     zone?: string,
>     followGaeApplication?: string,
>     kind?: string,
>     secondaryZone?: string
>   },
>   insightsConfig?: {
>     queryPlansPerMinute?: number,
>     queryInsightsEnabled?: boolean,
>     recordApplicationTags?: boolean,
>     queryStringLength?: number,
>     recordClientAddress?: boolean,
>     enhancedQueryInsightsEnabled?: boolean
>   },
>   maintenanceWindow?: {
>     kind?: string,
>     updateTrack?: SQL_UPDATE_TRACK_UNSPECIFIED | canary | stable | week5,
>     day?: number,
>     hour?: number
>   },
>   denyMaintenancePeriods?: {
>     startDate?: string,
>     endDate?: string,
>     time?: string
>   }[],
>   databaseFlags?: {
>     value?: string,
>     name?: string
>   }[],
>   databaseReplicationEnabled?: boolean,
>   authorizedGaeApplications?: string[],
>   storageAutoResizeLimit?: string | number,
>   connectorEnforcement?: CONNECTOR_ENFORCEMENT_UNSPECIFIED | NOT_REQUIRED | REQUIRED,
>   ipConfiguration?: {
>     ipv4Enabled?: boolean,
>     requireSsl?: boolean,
>     pscConfig?: {
>       pscWriteEndpointDnsEnabled?: boolean,
>       pscAutoConnectionPolicyEnabled?: boolean,
>       pscAutoConnections?: {
>         consumerNetworkStatus?: string,
>         status?: string,
>         ipAddress?: string,
>         consumerProject?: string,
>         consumerNetwork?: string
>       }[],
>       allowedConsumerProjects?: string[],
>       networkAttachmentUri?: string,
>       pscEnabled?: boolean,
>       pscAutoDnsEnabled?: boolean
>     },
>     serverCaMode?: CA_MODE_UNSPECIFIED | GOOGLE_MANAGED_INTERNAL_CA | GOOGLE_MANAGED_CAS_CA | CUSTOMER_MANAGED_CAS_CA,
>     enablePrivatePathForGoogleCloudServices?: boolean,
>     customSubjectAlternativeNames?: string[],
>     privateNetwork?: string,
>     sslMode?: SSL_MODE_UNSPECIFIED | ALLOW_UNENCRYPTED_AND_ENCRYPTED | ENCRYPTED_ONLY | TRUSTED_CLIENT_CERTIFICATE_REQUIRED,
>     serverCertificateRotationMode?: SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED | NO_AUTOMATIC_ROTATION | AUTOMATIC_ROTATION_DURING_MAINTENANCE,
>     authorizedNetworks?: {
>       kind?: string,
>       value?: string,
>       expirationTime?: string,
>       name?: string
>     }[],
>     allocatedIpRange?: string,
>     serverCaPool?: string
>   },
>   entraidConfig?: {
>     tenantId?: string,
>     applicationId?: string
>   },
>   passwordValidationPolicy?: {
>     minLength?: number,
>     enablePasswordPolicy?: boolean,
>     disallowUsernameSubstring?: boolean,
>     passwordChangeInterval?: string,
>     disallowCompromisedCredentials?: boolean,
>     reuseInterval?: number,
>     complexity?: COMPLEXITY_UNSPECIFIED | COMPLEXITY_DEFAULT
>   },
>   finalBackupConfig?: {
>     enabled?: boolean,
>     retentionDays?: number
>   },
>   dataDiskProvisionedThroughput?: string | number,
>   advancedMachineFeatures?: {
>     threadsPerCore?: number
>   },
>   storageAutoResize?: boolean,
>   activationPolicy?: SQL_ACTIVATION_POLICY_UNSPECIFIED | ALWAYS | NEVER | ON_DEMAND,
>   settingsVersion?: string | number,
>   acceleratedReplicaMode?: boolean,
>   deletionProtectionEnabled?: boolean,
>   connectionPoolConfig?: {
>     connectionPoolingEnabled?: boolean,
>     flags?: {
>       value?: string,
>       name?: string
>     }[]
>   }
> }
> ```

> [accordion] diskEncryptionStatus full type
>
> ```ts theme={null}
> {
>   kmsKeyVersionName?: string,
>   kind?: string
> }
> ```

> [accordion] serverCaCert full type
>
> ```ts theme={null}
> {
>   kind?: string,
>   cert?: string,
>   commonName?: string,
>   createTime?: string,
>   expirationTime?: string,
>   instance?: string,
>   certSerialNumber?: string,
>   selfLink?: string,
>   sha1Fingerprint?: string
> }
> ```

> [accordion] replicationCluster full type
>
> ```ts theme={null}
> {
>   failoverDrReplicaName?: string
> }
> ```

> [accordion] geminiConfig full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] failoverReplica full type
>
> ```ts theme={null}
> {
>   name?: string,
>   available?: boolean
> }
> ```

> [accordion] scheduledMaintenance full type
>
> ```ts theme={null}
> {
>   canDefer?: boolean,
>   scheduleDeadlineTime?: string,
>   startTime?: string,
>   canReschedule?: boolean
> }
> ```

> [accordion] outOfDiskReport full type
>
> ```ts theme={null}
> {
>   sqlOutOfDiskState?: SQL_OUT_OF_DISK_STATE_UNSPECIFIED | NORMAL | SOFT_SHUTDOWN,
>   sqlMinRecommendedIncreaseSizeGb?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### instances.verifyExternalSyncSettings

`sql.instances.verifyExternalSyncSettings`

Verify External primary instance external sync settings

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.instances.verifyExternalSyncSettings({
	instance: 'app-db',
	project: 'demo-project',
	syncMode: 'ONLINE',
	verifyConnectionOnly: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `selectedObjects` | `object[]` | No | Optional. Migrate only the specified objects from the source instance. If this field is empty, then migrate all objects. |
| `migrationType` | `MIGRATION_TYPE_UNSPECIFIED \| LOGICAL \| PHYSICAL` | No | Optional. MigrationType configures the migration to use physical files or logical dump files. If not set, then the logical dump file configuration is used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. |
| `verifyConnectionOnly` | `boolean` | No | Flag to enable verifying connection only |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `syncParallelLevel` | `EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED \| MIN \| OPTIMAL \| MAX` | No | Optional. Parallel level for initial data sync. Only applicable for PostgreSQL. |
| `mysqlSyncConfig` | `object` | No | MySQL-specific external server sync settings. |
| `syncMode` | `EXTERNAL_SYNC_MODE_UNSPECIFIED \| ONLINE \| OFFLINE` | No | External sync mode |
| `verifyReplicationOnly` | `boolean` | No | Optional. Flag to verify settings required by replication setup only |

> [accordion] selectedObjects full type
>
> ```ts theme={null}
> {
>   database?: string
> }[]
> ```

> [accordion] mysqlSyncConfig full type
>
> ```ts theme={null}
> {
>   initialSyncFlags?: {
>     value?: string,
>     name?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | This is always `sql#migrationSettingErrorList`. |
| `errors` | `object[] \| null` | No | List of migration violations. |
| `warnings` | `object[] \| null` | No | List of migration warnings. |

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   detail?: string | null,
>   kind?: string | null
> }[] | null
> ```

> [accordion] warnings full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   detail?: string | null,
>   kind?: string | null
> }[] | null
> ```

***

### operations.cancel

`sql.operations.cancel`

Cancels an instance operation that has been performed on an instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.operations.cancel({ operation: 'operation-123', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation` | `string` | Yes | Instance operation ID. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### operations.get

`sql.operations.get`

Retrieves an instance operation that has been performed on an instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.operations.get({ project: 'demo-project', operation: 'operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `operation` | `string` | Yes | Required. Instance operation ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### operations.list

`sql.operations.list`

Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.operations.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `maxResults` | `number` | No | Maximum number of operations per response. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |
| `instance` | `string` | No | Cloud SQL instance ID. This does not include the project ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | This is always `sql#operationsList`. |
| `items` | `object[] \| null` | No | List of operation resources. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   apiWarning?: {
>     code?: string | null,
>     region?: string | null,
>     message?: string | null
>   } | null,
>   importContext?: {
>     importUser?: string | null,
>     fileType?: string | null,
>     bakImportOptions?: {
>       stopAt?: string | null,
>       bakType?: string | null,
>       encryptionOptions?: {
>         keepEncrypted?: boolean | null,
>         pvkPath?: string | null,
>         certPath?: string | null,
>         pvkPassword?: string | null
>       } | null,
>       noRecovery?: boolean | null,
>       stopAtMark?: string | null,
>       striped?: boolean | null,
>       recoveryOnly?: boolean | null
>     } | null,
>     kind?: string | null,
>     sqlImportOptions?: {
>       threads?: number | null,
>       postgresImportOptions?: {
>         ifExists?: boolean | null,
>         clean?: boolean | null
>       } | null,
>       parallel?: boolean | null
>     } | null,
>     tdeImportOptions?: {
>       name?: string | null,
>       privateKeyPassword?: string | null,
>       certificatePath?: string | null,
>       privateKeyPath?: string | null
>     } | null,
>     csvImportOptions?: {
>       quoteCharacter?: string | null,
>       escapeCharacter?: string | null,
>       columns?: string[] | null,
>       table?: string | null,
>       linesTerminatedBy?: string | null,
>       fieldsTerminatedBy?: string | null
>     } | null,
>     database?: string | null,
>     uri?: string | null
>   } | null,
>   operationType?: string | null,
>   startWorkloadCaptureContext?: {
>     enableLiveReplay?: boolean | null,
>     replayInstance?: string | null
>   } | null,
>   backupContext?: {
>     kind?: string | null,
>     backupId?: string | number | null,
>     name?: string | null
>   } | null,
>   stopWorkloadCaptureContext?: {
>     abortLiveReplay?: boolean | null
>   } | null,
>   stopWorkloadReplayContext?: {
>   } | null,
>   startTime?: string | null,
>   preCheckMajorVersionUpgradeContext?: {
>     targetDatabaseVersion?: string | null,
>     kind?: string | null,
>     preCheckResponse?: {
>       actionsRequired?: string[] | null,
>       message?: string | null,
>       messageType?: string | null
>     }[] | null,
>     maxRuntime?: string | null
>   } | null,
>   targetId?: string | null,
>   targetProject?: string | null,
>   insertTime?: string | null,
>   name?: string | null,
>   subOperationType?: {
>     maintenanceType?: string | null
>   } | null,
>   error?: {
>     errors?: {
>       kind?: string | null,
>       message?: string | null,
>       code?: string | null
>     }[] | null,
>     kind?: string | null
>   } | null,
>   selfLink?: string | null,
>   status?: string | null,
>   endTime?: string | null,
>   kind?: string | null,
>   user?: string | null,
>   startWorkloadReplayContext?: {
>     replayInstance?: string | null,
>     workloadId?: string | null
>   } | null,
>   targetLink?: string | null,
>   acquireSsrsLeaseContext?: {
>     serviceLogin?: string | null,
>     reportDatabase?: string | null,
>     setupLogin?: string | null,
>     duration?: string | null
>   } | null,
>   exportContext?: {
>     bakExportOptions?: {
>       exportLogStartTime?: string | null,
>       striped?: boolean | null,
>       differentialBase?: boolean | null,
>       exportLogEndTime?: string | null,
>       bakType?: string | null,
>       stripeCount?: number | null,
>       copyOnly?: boolean | null
>     } | null,
>     kind?: string | null,
>     uri?: string | null,
>     fileType?: string | null,
>     csvExportOptions?: {
>       linesTerminatedBy?: string | null,
>       fieldsTerminatedBy?: string | null,
>       selectQuery?: string | null,
>       quoteCharacter?: string | null,
>       escapeCharacter?: string | null
>     } | null,
>     sqlExportOptions?: {
>       schemaOnly?: boolean | null,
>       threads?: number | null,
>       parallel?: boolean | null,
>       tables?: string[] | null,
>       mysqlExportOptions?: {
>         masterData?: number | null
>       } | null,
>       postgresExportOptions?: {
>         clean?: boolean | null,
>         ifExists?: boolean | null
>       } | null
>     } | null,
>     tdeExportOptions?: {
>       privateKeyPassword?: string | null,
>       privateKeyPath?: string | null,
>       name?: string | null,
>       certificatePath?: string | null
>     } | null,
>     databases?: string[] | null,
>     offload?: boolean | null
>   } | null
> }[] | null
> ```

***

### sslCerts.createEphemeral

`sql.sslCerts.createEphemeral`

Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.sslCerts.createEphemeral({ instance: 'app-db', project: 'demo-project', public_key: 'the client public key in PEM' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the Cloud SQL project. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `public_key` | `string` | No | PEM encoded public key to include in the signed certificate. |
| `access_token` | `string` | No | Access token to include in the signed certificate. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | This is always `sql#sslCert`. |
| `cert` | `string \| null` | No | PEM representation. |
| `commonName` | `string \| null` | No | User supplied name. Constrained to \[a-zA-Z.-\_ ]+. |
| `createTime` | `string \| null` | No | The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z` |
| `expirationTime` | `string \| null` | No | The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `instance` | `string \| null` | No | Name of the database instance. |
| `certSerialNumber` | `string \| null` | No | Serial number, as extracted from the certificate. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `sha1Fingerprint` | `string \| null` | No | Sha1 Fingerprint. |

***

### sslCerts.delete

`sql.sslCerts.delete`

Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.sslCerts.delete({ sha1Fingerprint: 'a1b2c3d4e5f60718293a4b5c6d7e8f9012345678', instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sha1Fingerprint` | `string` | Yes | Sha1 FingerPrint. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### sslCerts.get

`sql.sslCerts.get`

Retrieves a particular SSL certificate. Does not include the private key (required for usage)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.sslCerts.get({ project: 'demo-project', instance: 'app-db', sha1Fingerprint: 'a1b2c3d4e5f60718293a4b5c6d7e8f9012345678' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `sha1Fingerprint` | `string` | Yes | Sha1 FingerPrint. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | This is always `sql#sslCert`. |
| `cert` | `string \| null` | No | PEM representation. |
| `commonName` | `string \| null` | No | User supplied name. Constrained to \[a-zA-Z.-\_ ]+. |
| `createTime` | `string \| null` | No | The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z` |
| `expirationTime` | `string \| null` | No | The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `instance` | `string \| null` | No | Name of the database instance. |
| `certSerialNumber` | `string \| null` | No | Serial number, as extracted from the certificate. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `sha1Fingerprint` | `string \| null` | No | Sha1 Fingerprint. |

***

### sslCerts.insert

`sql.sslCerts.insert`

Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.sslCerts.insert({ instance: 'app-db', project: 'demo-project', commonName: 'app-client' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `commonName` | `string` | No | User supplied name. Must be a distinct name from the other certificates for this instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | This is always `sql#sslCertsInsert`. |
| `operation` | `object \| null` | No | An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| `clientCert` | `object \| null` | No | SslCertDetail. |
| `serverCaCert` | `object \| null` | No | SslCerts Resource |

> [accordion] operation full type
>
> ```ts theme={null}
> {
>   apiWarning?: {
>     code?: string | null,
>     region?: string | null,
>     message?: string | null
>   } | null,
>   importContext?: {
>     importUser?: string | null,
>     fileType?: string | null,
>     bakImportOptions?: {
>       stopAt?: string | null,
>       bakType?: string | null,
>       encryptionOptions?: {
>         keepEncrypted?: boolean | null,
>         pvkPath?: string | null,
>         certPath?: string | null,
>         pvkPassword?: string | null
>       } | null,
>       noRecovery?: boolean | null,
>       stopAtMark?: string | null,
>       striped?: boolean | null,
>       recoveryOnly?: boolean | null
>     } | null,
>     kind?: string | null,
>     sqlImportOptions?: {
>       threads?: number | null,
>       postgresImportOptions?: {
>         ifExists?: boolean | null,
>         clean?: boolean | null
>       } | null,
>       parallel?: boolean | null
>     } | null,
>     tdeImportOptions?: {
>       name?: string | null,
>       privateKeyPassword?: string | null,
>       certificatePath?: string | null,
>       privateKeyPath?: string | null
>     } | null,
>     csvImportOptions?: {
>       quoteCharacter?: string | null,
>       escapeCharacter?: string | null,
>       columns?: string[] | null,
>       table?: string | null,
>       linesTerminatedBy?: string | null,
>       fieldsTerminatedBy?: string | null
>     } | null,
>     database?: string | null,
>     uri?: string | null
>   } | null,
>   operationType?: string | null,
>   startWorkloadCaptureContext?: {
>     enableLiveReplay?: boolean | null,
>     replayInstance?: string | null
>   } | null,
>   backupContext?: {
>     kind?: string | null,
>     backupId?: string | number | null,
>     name?: string | null
>   } | null,
>   stopWorkloadCaptureContext?: {
>     abortLiveReplay?: boolean | null
>   } | null,
>   stopWorkloadReplayContext?: {
>   } | null,
>   startTime?: string | null,
>   preCheckMajorVersionUpgradeContext?: {
>     targetDatabaseVersion?: string | null,
>     kind?: string | null,
>     preCheckResponse?: {
>       actionsRequired?: string[] | null,
>       message?: string | null,
>       messageType?: string | null
>     }[] | null,
>     maxRuntime?: string | null
>   } | null,
>   targetId?: string | null,
>   targetProject?: string | null,
>   insertTime?: string | null,
>   name?: string | null,
>   subOperationType?: {
>     maintenanceType?: string | null
>   } | null,
>   error?: {
>     errors?: {
>       kind?: string | null,
>       message?: string | null,
>       code?: string | null
>     }[] | null,
>     kind?: string | null
>   } | null,
>   selfLink?: string | null,
>   status?: string | null,
>   endTime?: string | null,
>   kind?: string | null,
>   user?: string | null,
>   startWorkloadReplayContext?: {
>     replayInstance?: string | null,
>     workloadId?: string | null
>   } | null,
>   targetLink?: string | null,
>   acquireSsrsLeaseContext?: {
>     serviceLogin?: string | null,
>     reportDatabase?: string | null,
>     setupLogin?: string | null,
>     duration?: string | null
>   } | null,
>   exportContext?: {
>     bakExportOptions?: {
>       exportLogStartTime?: string | null,
>       striped?: boolean | null,
>       differentialBase?: boolean | null,
>       exportLogEndTime?: string | null,
>       bakType?: string | null,
>       stripeCount?: number | null,
>       copyOnly?: boolean | null
>     } | null,
>     kind?: string | null,
>     uri?: string | null,
>     fileType?: string | null,
>     csvExportOptions?: {
>       linesTerminatedBy?: string | null,
>       fieldsTerminatedBy?: string | null,
>       selectQuery?: string | null,
>       quoteCharacter?: string | null,
>       escapeCharacter?: string | null
>     } | null,
>     sqlExportOptions?: {
>       schemaOnly?: boolean | null,
>       threads?: number | null,
>       parallel?: boolean | null,
>       tables?: string[] | null,
>       mysqlExportOptions?: {
>         masterData?: number | null
>       } | null,
>       postgresExportOptions?: {
>         clean?: boolean | null,
>         ifExists?: boolean | null
>       } | null
>     } | null,
>     tdeExportOptions?: {
>       privateKeyPassword?: string | null,
>       privateKeyPath?: string | null,
>       name?: string | null,
>       certificatePath?: string | null
>     } | null,
>     databases?: string[] | null,
>     offload?: boolean | null
>   } | null
> } | null
> ```

> [accordion] clientCert full type
>
> ```ts theme={null}
> {
>   certPrivateKey?: string | null,
>   certInfo?: {
>     kind?: string | null,
>     cert?: string | null,
>     commonName?: string | null,
>     createTime?: string | null,
>     expirationTime?: string | null,
>     instance?: string | null,
>     certSerialNumber?: string | null,
>     selfLink?: string | null,
>     sha1Fingerprint?: string | null
>   } | null
> } | null
> ```

> [accordion] serverCaCert full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> } | null
> ```

***

### sslCerts.list

`sql.sslCerts.list`

Lists all of the current SSL certificates for the instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.sslCerts.list({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | List of client certificates for the instance. |
| `kind` | `string \| null` | No | This is always `sql#sslCertsList`. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   cert?: string | null,
>   commonName?: string | null,
>   createTime?: string | null,
>   expirationTime?: string | null,
>   instance?: string | null,
>   certSerialNumber?: string | null,
>   selfLink?: string | null,
>   sha1Fingerprint?: string | null
> }[] | null
> ```

***

### tiers.list

`sql.tiers.list`

Lists all available machine types (tiers) for Cloud SQL, for example, `db-custom-1-3840`. For more information, see [https://cloud.google.com/sql/pricing](https://cloud.google.com/sql/pricing)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.tiers.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Project ID of the project for which to list tiers. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | List of tiers. |
| `kind` | `string \| null` | No | This is always `sql#tiersList`. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   DiskQuota?: string | number | null,
>   tier?: string | null,
>   kind?: string | null,
>   RAM?: string | number | null,
>   region?: string[] | null
> }[] | null
> ```

***

### users.delete

`sql.users.delete`

Deletes a user from a Cloud SQL instance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.sql.users.delete({ instance: 'app-db', project: 'demo-project', name: 'app' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `host` | `string` | No | Host of the user in the instance. |
| `name` | `string` | No | Name of the user in the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### users.get

`sql.users.get`

Retrieves a resource containing information about a user

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.users.get({ instance: 'app-db', project: 'demo-project', name: 'app' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `host` | `string` | No | Host of a user of the instance. |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `name` | `string` | Yes | User of the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `iamStatus` | `string \| null` | No | Indicates if a group is active or inactive for IAM database authentication. |
| `host` | `string \| null` | No | Optional. The host from which the user can connect. For `insert` operations, host defaults to an empty string. For `update` operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional. |
| `passwordPolicy` | `object \| null` | No | User level password validation policy. |
| `password` | `string \| null` | No | The password for the user. |
| `instance` | `string \| null` | No | The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for `update` because it is already specified on the URL. |
| `iamEmail` | `string \| null` | No | Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users. |
| `etag` | `string \| null` | No | This field is deprecated and will be removed from a future version of the API. |
| `project` | `string \| null` | No | The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for `update` because it is already specified on the URL. |
| `databaseRoles` | `string[] \| null` | No | Optional. Role memberships of the user |
| `dualPasswordType` | `string \| null` | No | Dual password status for the user. |
| `name` | `string \| null` | No | The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL. |
| `type` | `string \| null` | No | The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. |
| `kind` | `string \| null` | No | This is always `sql#user`. |
| `sqlserverUserDetails` | `object \| null` | No | Represents a Sql Server user on the Cloud SQL instance. |
| `serverRoles` | `string[] \| null` | No | Optional. The server roles for the SQL Server login. |

> [accordion] passwordPolicy full type
>
> ```ts theme={null}
> {
>   passwordExpirationDuration?: string | null,
>   status?: {
>     locked?: boolean | null,
>     passwordExpirationTime?: string | null
>   } | null,
>   allowedFailedAttempts?: number | null,
>   enablePasswordVerification?: boolean | null,
>   enableFailedAttemptsCheck?: boolean | null
> } | null
> ```

> [accordion] sqlserverUserDetails full type
>
> ```ts theme={null}
> {
>   serverRoles?: string[] | null,
>   disabled?: boolean | null
> } | null
> ```

***

### users.insert

`sql.users.insert`

Creates a new user in a Cloud SQL instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.users.insert({
	instance: 'app-db',
	project: 'demo-project',
	name: 'ada@example.com',
	type: 'CLOUD_IAM_USER',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `iamStatus` | `IAM_STATUS_UNSPECIFIED \| INACTIVE \| ACTIVE` | No | Indicates if a group is active or inactive for IAM database authentication. |
| `host` | `string` | No | Optional. The host from which the user can connect. For `insert` operations, host defaults to an empty string. For `update` operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional. |
| `passwordPolicy` | `object` | No | User level password validation policy. |
| `password` | `string` | No | The password for the user. |
| `body_instance` | `string` | No | The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for `update` because it is already specified on the URL. |
| `iamEmail` | `string` | No | Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users. |
| `etag` | `string` | No | This field is deprecated and will be removed from a future version of the API. |
| `body_project` | `string` | No | The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for `update` because it is already specified on the URL. |
| `databaseRoles` | `string[]` | No | Optional. Role memberships of the user |
| `dualPasswordType` | `DUAL_PASSWORD_TYPE_UNSPECIFIED \| NO_MODIFY_DUAL_PASSWORD \| NO_DUAL_PASSWORD \| DUAL_PASSWORD` | No | Dual password status for the user. |
| `name` | `string` | No | The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL. |
| `type` | `BUILT_IN \| CLOUD_IAM_USER \| CLOUD_IAM_SERVICE_ACCOUNT \| CLOUD_IAM_GROUP \| CLOUD_IAM_GROUP_USER \| CLOUD_IAM_GROUP_SERVICE_ACCOUNT \| CLOUD_IAM_WORKFORCE_IDENTITY \| ENTRAID_USER` | No | The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. |
| `kind` | `string` | No | This is always `sql#user`. |
| `sqlserverUserDetails` | `object` | No | Represents a Sql Server user on the Cloud SQL instance. |
| `serverRoles` | `string[]` | No | Optional. The server roles for the SQL Server login. |

> [accordion] passwordPolicy full type
>
> ```ts theme={null}
> {
>   passwordExpirationDuration?: string,
>   allowedFailedAttempts?: number,
>   enablePasswordVerification?: boolean,
>   enableFailedAttemptsCheck?: boolean
> }
> ```

> [accordion] sqlserverUserDetails full type
>
> ```ts theme={null}
> {
>   serverRoles?: string[],
>   disabled?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### users.list

`sql.users.list`

Lists users in the specified Cloud SQL instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.users.list({ project: 'demo-project', instance: 'app-db' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | This is always `sql#usersList`. |
| `items` | `object[] \| null` | No | List of user resources in the instance. |
| `nextPageToken` | `string \| null` | No | Unused. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   iamStatus?: string | null,
>   host?: string | null,
>   passwordPolicy?: {
>     passwordExpirationDuration?: string | null,
>     status?: {
>       locked?: boolean | null,
>       passwordExpirationTime?: string | null
>     } | null,
>     allowedFailedAttempts?: number | null,
>     enablePasswordVerification?: boolean | null,
>     enableFailedAttemptsCheck?: boolean | null
>   } | null,
>   password?: string | null,
>   instance?: string | null,
>   iamEmail?: string | null,
>   etag?: string | null,
>   project?: string | null,
>   databaseRoles?: string[] | null,
>   dualPasswordType?: string | null,
>   name?: string | null,
>   type?: string | null,
>   kind?: string | null,
>   sqlserverUserDetails?: {
>     serverRoles?: string[] | null,
>     disabled?: boolean | null
>   } | null,
>   serverRoles?: string[] | null
> }[] | null
> ```

***

### users.update

`sql.users.update`

Updates an existing user in a Cloud SQL instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.users.update({
	project: 'demo-project',
	instance: 'app-db',
	name: 'app',
	password: 'a-new-strong-password',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `revokeExistingRoles` | `boolean` | No | Optional. Specifies whether to revoke existing roles that are not present in the `database_roles` field. If `false` or unset, the database roles specified in `database_roles` are added to the user's existing roles. |
| `project` | `string` | Yes | Project ID of the project that contains the instance. |
| `location` | `string` | No | Optional. Region of the Cloud SQL instance. |
| `databaseRoles` | `string[]` | No | Optional. List of database roles to grant to the user. body.database\_roles will be ignored for update request. |
| `host` | `string` | No | Optional. Host of the user in the instance. |
| `serverRoles` | `string[]` | No | Optional. The server roles to grant to the SQL Server login. Existing server roles will not be revoked if revoke\_existing\_roles is false. body.server\_roles will be ignored for update request. |
| `name` | `string` | No | Name of the user in the instance. |
| `revokeExistingServerRoles` | `boolean` | No | Optional. Specifies whether to revoke existing roles that are not present in the `server_roles` field. If `false` or unset, the server roles specified in `server_roles` are added to the user's existing server roles. |
| `instance` | `string` | Yes | Database instance ID. This does not include the project ID. |
| `iamStatus` | `IAM_STATUS_UNSPECIFIED \| INACTIVE \| ACTIVE` | No | Indicates if a group is active or inactive for IAM database authentication. |
| `body_host` | `string` | No | Optional. The host from which the user can connect. For `insert` operations, host defaults to an empty string. For `update` operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional. |
| `passwordPolicy` | `object` | No | User level password validation policy. |
| `password` | `string` | No | The password for the user. |
| `body_instance` | `string` | No | The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for `update` because it is already specified on the URL. |
| `iamEmail` | `string` | No | Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users. |
| `etag` | `string` | No | This field is deprecated and will be removed from a future version of the API. |
| `body_project` | `string` | No | The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for `update` because it is already specified on the URL. |
| `body_databaseRoles` | `string[]` | No | Optional. Role memberships of the user |
| `dualPasswordType` | `DUAL_PASSWORD_TYPE_UNSPECIFIED \| NO_MODIFY_DUAL_PASSWORD \| NO_DUAL_PASSWORD \| DUAL_PASSWORD` | No | Dual password status for the user. |
| `body_name` | `string` | No | The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL. |
| `type` | `BUILT_IN \| CLOUD_IAM_USER \| CLOUD_IAM_SERVICE_ACCOUNT \| CLOUD_IAM_GROUP \| CLOUD_IAM_GROUP_USER \| CLOUD_IAM_GROUP_SERVICE_ACCOUNT \| CLOUD_IAM_WORKFORCE_IDENTITY \| ENTRAID_USER` | No | The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. |
| `kind` | `string` | No | This is always `sql#user`. |
| `sqlserverUserDetails` | `object` | No | Represents a Sql Server user on the Cloud SQL instance. |
| `body_serverRoles` | `string[]` | No | Optional. The server roles for the SQL Server login. |

> [accordion] passwordPolicy full type
>
> ```ts theme={null}
> {
>   passwordExpirationDuration?: string,
>   allowedFailedAttempts?: number,
>   enablePasswordVerification?: boolean,
>   enableFailedAttemptsCheck?: boolean
> }
> ```

> [accordion] sqlserverUserDetails full type
>
> ```ts theme={null}
> {
>   serverRoles?: string[],
>   disabled?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### workloadCaptures.list

`sql.workloadCaptures.list`

Lists all captured workloads associated with the instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.sql.workloadCaptures.list({ instance: 'app-db', project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | This is always `sql#workloadCapturesList`. |
| `workloadCaptures` | `object[] \| null` | No | List of captured workloads for the instance. |

> [accordion] workloadCaptures full type
>
> ```ts theme={null}
> {
>   backupId?: string | null,
>   replayInstance?: string | null,
>   sourceInstance?: string | null,
>   endTime?: string | null,
>   workloadCaptureState?: string | null,
>   workloadId?: string | null,
>   retentionDays?: number | null,
>   startTime?: string | null
> }[] | null
> ```

***

### workloadCaptures.start

`sql.workloadCaptures.start`

Starts capturing the SQL queries, transactions, and other operations executed on the primary instance. This traffic is securely stored and forms a "captured workload"

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.workloadCaptures.start({
	instance: 'app-db',
	project: 'demo-project',
	startWorkloadCaptureContext: { enableLiveReplay: false },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `startWorkloadCaptureContext` | `object` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean,
>   replayInstance?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### workloadCaptures.startReplay

`sql.workloadCaptures.startReplay`

Starts executing a captured workload on a separate Cloud SQL instance provisioned for workload replay. This target instance simulates the production environment without affecting the primary instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.workloadCaptures.startReplay({
	instance: 'app-db',
	project: 'demo-project',
	workloadId: 'workload-1',
	startWorkloadReplayContext: { replayInstance: 'app-db-copy', workloadId: 'workload-1' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `workloadId` | `string` | Yes | Required. The ID of the workload to replay. |
| `startWorkloadReplayContext` | `object` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### workloadCaptures.stop

`sql.workloadCaptures.stop`

Stops capturing the query traffic and related operations executed on the primary instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.sql.workloadCaptures.stop({
	project: 'demo-project',
	instance: 'app-db',
	stopWorkloadCaptureContext: { abortLiveReplay: false },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. Project ID of the project that contains the instance. |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID. This does not include the project ID. |
| `stopWorkloadCaptureContext` | `object` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

### workloadCaptures.stopReplay

`sql.workloadCaptures.stopReplay`

Stops an active workload replay on the target Cloud SQL replay instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.sql.workloadCaptures.stopReplay({
	instance: 'app-db',
	project: 'demo-project',
	stopWorkloadReplayContext: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `instance` | `string` | Yes | Required. Cloud SQL instance ID of the target replay instance. This does not include the project ID. |
| `project` | `string` | Yes | Required. Project ID of the project that contains the target replay instance. |
| `stopWorkloadReplayContext` | `object` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiWarning` | `object \| null` | No | An Admin API warning message. |
| `importContext` | `object \| null` | No | Database instance import context. |
| `operationType` | `string \| null` | No | The type of the operation. Valid values are: \* `CREATE` \* `DELETE` \* `UPDATE` \* `RESTART` \* `IMPORT` \* `EXPORT` \* `BACKUP_VOLUME` \* `RESTORE_VOLUME` \* `CREATE_USER` \* `DELETE_USER` \* `CREATE_DATABASE` \* `DELETE_DATABASE` |
| `startWorkloadCaptureContext` | `object \| null` | No | The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance. |
| `backupContext` | `object \| null` | No | Backup context. |
| `stopWorkloadCaptureContext` | `object \| null` | No | The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance. |
| `stopWorkloadReplayContext` | `object \| null` | No | The context for the `StopWorkloadReplay` operation, which represents an operation that stops an active workload replay on a target Cloud SQL replay instance. |
| `startTime` | `string \| null` | No | The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `preCheckMajorVersionUpgradeContext` | `object \| null` | No | Pre-check major version upgrade context. |
| `targetId` | `string \| null` | No | Name of the resource on which this operation runs. |
| `targetProject` | `string \| null` | No | The project ID of the target instance related to this operation. |
| `insertTime` | `string \| null` | No | The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `name` | `string \| null` | No | An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| `subOperationType` | `object \| null` | No | The sub operation type based on the operation type. |
| `error` | `object \| null` | No | Database instance operation errors list wrapper. |
| `selfLink` | `string \| null` | No | The URI of this resource. |
| `status` | `string \| null` | No | The status of an operation. |
| `endTime` | `string \| null` | No | The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `kind` | `string \| null` | No | This is always `sql#operation`. |
| `user` | `string \| null` | No | The email address of the user who initiated this operation. |
| `startWorkloadReplayContext` | `object \| null` | No | The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed). |
| `targetLink` | `string \| null` | No | — |
| `acquireSsrsLeaseContext` | `object \| null` | No | Acquire SSRS lease context. |
| `exportContext` | `object \| null` | No | Database instance export context. |

> [accordion] apiWarning full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   region?: string | null,
>   message?: string | null
> } | null
> ```

> [accordion] importContext full type
>
> ```ts theme={null}
> {
>   importUser?: string | null,
>   fileType?: string | null,
>   bakImportOptions?: {
>     stopAt?: string | null,
>     bakType?: string | null,
>     encryptionOptions?: {
>       keepEncrypted?: boolean | null,
>       pvkPath?: string | null,
>       certPath?: string | null,
>       pvkPassword?: string | null
>     } | null,
>     noRecovery?: boolean | null,
>     stopAtMark?: string | null,
>     striped?: boolean | null,
>     recoveryOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   sqlImportOptions?: {
>     threads?: number | null,
>     postgresImportOptions?: {
>       ifExists?: boolean | null,
>       clean?: boolean | null
>     } | null,
>     parallel?: boolean | null
>   } | null,
>   tdeImportOptions?: {
>     name?: string | null,
>     privateKeyPassword?: string | null,
>     certificatePath?: string | null,
>     privateKeyPath?: string | null
>   } | null,
>   csvImportOptions?: {
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null,
>     columns?: string[] | null,
>     table?: string | null,
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null
>   } | null,
>   database?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] startWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   enableLiveReplay?: boolean | null,
>   replayInstance?: string | null
> } | null
> ```

> [accordion] backupContext full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   backupId?: string | number | null,
>   name?: string | null
> } | null
> ```

> [accordion] stopWorkloadCaptureContext full type
>
> ```ts theme={null}
> {
>   abortLiveReplay?: boolean | null
> } | null
> ```

> [accordion] stopWorkloadReplayContext full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] preCheckMajorVersionUpgradeContext full type
>
> ```ts theme={null}
> {
>   targetDatabaseVersion?: string | null,
>   kind?: string | null,
>   preCheckResponse?: {
>     actionsRequired?: string[] | null,
>     message?: string | null,
>     messageType?: string | null
>   }[] | null,
>   maxRuntime?: string | null
> } | null
> ```

> [accordion] subOperationType full type
>
> ```ts theme={null}
> {
>   maintenanceType?: string | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   errors?: {
>     kind?: string | null,
>     message?: string | null,
>     code?: string | null
>   }[] | null,
>   kind?: string | null
> } | null
> ```

> [accordion] startWorkloadReplayContext full type
>
> ```ts theme={null}
> {
>   replayInstance?: string | null,
>   workloadId?: string | null
> } | null
> ```

> [accordion] acquireSsrsLeaseContext full type
>
> ```ts theme={null}
> {
>   serviceLogin?: string | null,
>   reportDatabase?: string | null,
>   setupLogin?: string | null,
>   duration?: string | null
> } | null
> ```

> [accordion] exportContext full type
>
> ```ts theme={null}
> {
>   bakExportOptions?: {
>     exportLogStartTime?: string | null,
>     striped?: boolean | null,
>     differentialBase?: boolean | null,
>     exportLogEndTime?: string | null,
>     bakType?: string | null,
>     stripeCount?: number | null,
>     copyOnly?: boolean | null
>   } | null,
>   kind?: string | null,
>   uri?: string | null,
>   fileType?: string | null,
>   csvExportOptions?: {
>     linesTerminatedBy?: string | null,
>     fieldsTerminatedBy?: string | null,
>     selectQuery?: string | null,
>     quoteCharacter?: string | null,
>     escapeCharacter?: string | null
>   } | null,
>   sqlExportOptions?: {
>     schemaOnly?: boolean | null,
>     threads?: number | null,
>     parallel?: boolean | null,
>     tables?: string[] | null,
>     mysqlExportOptions?: {
>       masterData?: number | null
>     } | null,
>     postgresExportOptions?: {
>       clean?: boolean | null,
>       ifExists?: boolean | null
>     } | null
>   } | null,
>   tdeExportOptions?: {
>     privateKeyPassword?: string | null,
>     privateKeyPath?: string | null,
>     name?: string | null,
>     certificatePath?: string | null
>   } | null,
>   databases?: string[] | null,
>   offload?: boolean | null
> } | null
> ```

***

## Storage

### anywhereCaches.disable

`storage.anywhereCaches.disable`

Disables an Anywhere Cache instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.storage.anywhereCaches.disable({ bucket: 'demo-bucket', anywhereCacheId: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `anywhereCacheId` | `string` | Yes | The ID of requested Anywhere Cache instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache. |
| `id` | `string \| null` | No | The ID of the resource, including the project number, bucket name and anywhere cache ID. |
| `selfLink` | `string \| null` | No | The link to this cache instance. |
| `bucket` | `string \| null` | No | The name of the bucket containing this cache instance. |
| `anywhereCacheId` | `string \| null` | No | The ID of the Anywhere cache instance. |
| `zone` | `string \| null` | No | The zone in which the cache instance is running. For example, us-central1-a. |
| `state` | `string \| null` | No | The current state of the cache instance. |
| `createTime` | `string \| null` | No | The creation time of the cache instance in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The modification time of the cache instance metadata in RFC 3339 format. |
| `ttl` | `string \| null` | No | The TTL of all cache entries in whole seconds. e.g., "7200s". |
| `admissionPolicy` | `string \| null` | No | The cache-level entry admission policy. |
| `pendingUpdate` | `boolean \| null` | No | True if the cache instance has an active Update long-running operation. |
| `ingestOnWrite` | `boolean \| null` | No | Specifies whether objects are ingested into the cache upon write. |

***

### anywhereCaches.get

`storage.anywhereCaches.get`

Returns the metadata of an Anywhere Cache instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.anywhereCaches.get({ bucket: 'demo-bucket', anywhereCacheId: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `anywhereCacheId` | `string` | Yes | The ID of requested Anywhere Cache instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache. |
| `id` | `string \| null` | No | The ID of the resource, including the project number, bucket name and anywhere cache ID. |
| `selfLink` | `string \| null` | No | The link to this cache instance. |
| `bucket` | `string \| null` | No | The name of the bucket containing this cache instance. |
| `anywhereCacheId` | `string \| null` | No | The ID of the Anywhere cache instance. |
| `zone` | `string \| null` | No | The zone in which the cache instance is running. For example, us-central1-a. |
| `state` | `string \| null` | No | The current state of the cache instance. |
| `createTime` | `string \| null` | No | The creation time of the cache instance in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The modification time of the cache instance metadata in RFC 3339 format. |
| `ttl` | `string \| null` | No | The TTL of all cache entries in whole seconds. e.g., "7200s". |
| `admissionPolicy` | `string \| null` | No | The cache-level entry admission policy. |
| `pendingUpdate` | `boolean \| null` | No | True if the cache instance has an active Update long-running operation. |
| `ingestOnWrite` | `boolean \| null` | No | Specifies whether objects are ingested into the cache upon write. |

***

### anywhereCaches.insert

`storage.anywhereCaches.insert`

Creates an Anywhere Cache instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.anywhereCaches.insert({ bucket: 'demo-bucket', zone: 'us-central1-a', ttl: '86400s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `kind` | `string` | No | The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache. |
| `id` | `string` | No | The ID of the resource, including the project number, bucket name and anywhere cache ID. |
| `selfLink` | `string` | No | The link to this cache instance. |
| `body_bucket` | `string` | No | The name of the bucket containing this cache instance. |
| `anywhereCacheId` | `string` | No | The ID of the Anywhere cache instance. |
| `zone` | `string` | No | The zone in which the cache instance is running. For example, us-central1-a. |
| `state` | `string` | No | The current state of the cache instance. |
| `createTime` | `string` | No | The creation time of the cache instance in RFC 3339 format. |
| `updateTime` | `string` | No | The modification time of the cache instance metadata in RFC 3339 format. |
| `ttl` | `string` | No | The TTL of all cache entries in whole seconds. e.g., "7200s". |
| `admissionPolicy` | `string` | No | The cache-level entry admission policy. |
| `pendingUpdate` | `boolean` | No | True if the cache instance has an active Update long-running operation. |
| `ingestOnWrite` | `boolean` | No | Specifies whether objects are ingested into the cache upon write. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### anywhereCaches.list

`storage.anywhereCaches.list`

Returns a list of Anywhere Cache instances of the bucket matching the criteria (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.anywhereCaches.list({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `pageSize` | `number` | No | Maximum number of items to return in a single page of responses. Maximum 1000. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. For lists of Anywhere Caches, this is always storage#anywhereCaches. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
| `items` | `object[] \| null` | No | The list of items. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   id?: string | null,
>   selfLink?: string | null,
>   bucket?: string | null,
>   anywhereCacheId?: string | null,
>   zone?: string | null,
>   state?: string | null,
>   createTime?: string | null,
>   updateTime?: string | null,
>   ttl?: string | null,
>   admissionPolicy?: string | null,
>   pendingUpdate?: boolean | null,
>   ingestOnWrite?: boolean | null
> }[] | null
> ```

***

### anywhereCaches.resume

`storage.anywhereCaches.resume`

Resumes a disabled Anywhere Cache instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.anywhereCaches.resume({ bucket: 'demo-bucket', anywhereCacheId: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `anywhereCacheId` | `string` | Yes | The ID of requested Anywhere Cache instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache. |
| `id` | `string \| null` | No | The ID of the resource, including the project number, bucket name and anywhere cache ID. |
| `selfLink` | `string \| null` | No | The link to this cache instance. |
| `bucket` | `string \| null` | No | The name of the bucket containing this cache instance. |
| `anywhereCacheId` | `string \| null` | No | The ID of the Anywhere cache instance. |
| `zone` | `string \| null` | No | The zone in which the cache instance is running. For example, us-central1-a. |
| `state` | `string \| null` | No | The current state of the cache instance. |
| `createTime` | `string \| null` | No | The creation time of the cache instance in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The modification time of the cache instance metadata in RFC 3339 format. |
| `ttl` | `string \| null` | No | The TTL of all cache entries in whole seconds. e.g., "7200s". |
| `admissionPolicy` | `string \| null` | No | The cache-level entry admission policy. |
| `pendingUpdate` | `boolean \| null` | No | True if the cache instance has an active Update long-running operation. |
| `ingestOnWrite` | `boolean \| null` | No | Specifies whether objects are ingested into the cache upon write. |

***

### anywhereCaches.update

`storage.anywhereCaches.update`

Updates the config of an Anywhere Cache instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.anywhereCaches.update({ bucket: 'demo-bucket', anywhereCacheId: 'us-central1-a', ttl: '172800s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `anywhereCacheId` | `string` | Yes | The ID of requested Anywhere Cache instance. |
| `kind` | `string` | No | The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache. |
| `id` | `string` | No | The ID of the resource, including the project number, bucket name and anywhere cache ID. |
| `selfLink` | `string` | No | The link to this cache instance. |
| `body_bucket` | `string` | No | The name of the bucket containing this cache instance. |
| `body_anywhereCacheId` | `string` | No | The ID of the Anywhere cache instance. |
| `zone` | `string` | No | The zone in which the cache instance is running. For example, us-central1-a. |
| `state` | `string` | No | The current state of the cache instance. |
| `createTime` | `string` | No | The creation time of the cache instance in RFC 3339 format. |
| `updateTime` | `string` | No | The modification time of the cache instance metadata in RFC 3339 format. |
| `ttl` | `string` | No | The TTL of all cache entries in whole seconds. e.g., "7200s". |
| `admissionPolicy` | `string` | No | The cache-level entry admission policy. |
| `pendingUpdate` | `boolean` | No | True if the cache instance has an active Update long-running operation. |
| `ingestOnWrite` | `boolean` | No | Specifies whether objects are ingested into the cache upon write. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### bucketAccessControls.delete

`storage.bucketAccessControls.delete`

Permanently deletes the ACL entry for the specified entity on the specified bucket

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.bucketAccessControls.delete({ bucket: 'demo-bucket', entity: 'allUsers' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### bucketAccessControls.get

`storage.bucketAccessControls.get`

Returns the ACL entry for the specified entity on the specified bucket

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.bucketAccessControls.get({ bucket: 'demo-bucket', entity: 'allUsers' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### bucketAccessControls.insert

`storage.bucketAccessControls.insert`

Creates a new ACL entry on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.bucketAccessControls.insert({ bucket: 'demo-bucket', entity: 'user-ada@example.com', role: 'READER' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `body_bucket` | `string` | No | The name of the bucket. |
| `domain` | `string` | No | The domain associated with the entity, if any. |
| `email` | `string` | No | The email address associated with the entity, if any. |
| `entity` | `string` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string` | No | The ID for the entity, if any. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `id` | `string` | No | The ID of the access-control entry. |
| `kind` | `string` | No | The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. |
| `projectTeam` | `object` | No | The project team associated with the entity, if any. |
| `role` | `string` | No | The access permission for the entity. |
| `selfLink` | `string` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string,
>   team?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### bucketAccessControls.list

`storage.bucketAccessControls.list`

Retrieves ACL entries on the specified bucket

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.bucketAccessControls.list({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

***

### bucketAccessControls.patch

`storage.bucketAccessControls.patch`

Patches an ACL entry on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.bucketAccessControls.patch({ bucket: 'demo-bucket', entity: 'user-ada@example.com', role: 'READER' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `body_bucket` | `string` | No | The name of the bucket. |
| `domain` | `string` | No | The domain associated with the entity, if any. |
| `email` | `string` | No | The email address associated with the entity, if any. |
| `body_entity` | `string` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string` | No | The ID for the entity, if any. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `id` | `string` | No | The ID of the access-control entry. |
| `kind` | `string` | No | The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. |
| `projectTeam` | `object` | No | The project team associated with the entity, if any. |
| `role` | `string` | No | The access permission for the entity. |
| `selfLink` | `string` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string,
>   team?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### bucketAccessControls.update

`storage.bucketAccessControls.update`

Updates an ACL entry on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.bucketAccessControls.update({ bucket: 'demo-bucket', entity: 'user-ada@example.com', role: 'READER' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `body_bucket` | `string` | No | The name of the bucket. |
| `domain` | `string` | No | The domain associated with the entity, if any. |
| `email` | `string` | No | The email address associated with the entity, if any. |
| `body_entity` | `string` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string` | No | The ID for the entity, if any. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `id` | `string` | No | The ID of the access-control entry. |
| `kind` | `string` | No | The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. |
| `projectTeam` | `object` | No | The project team associated with the entity, if any. |
| `role` | `string` | No | The access permission for the entity. |
| `selfLink` | `string` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string,
>   team?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### buckets.delete

`storage.buckets.delete`

Deletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.delete({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `ifMetagenerationMatch` | `string \| number` | No | If set, only deletes the bucket if its metageneration matches this value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | If set, only deletes the bucket if its metageneration does not match this value. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### buckets.get

`storage.buckets.get`

Returns metadata for the specified bucket

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.get({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `generation` | `string \| number` | No | If present, specifies the generation of the bucket. This is required if softDeleted is true. |
| `softDeleted` | `boolean` | No | If true, return the soft-deleted version of this bucket. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.getIamPolicy

`storage.buckets.getIamPolicy`

Returns an IAM policy for the specified bucket

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.getIamPolicy({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `optionsRequestedPolicyVersion` | `number` | No | The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### buckets.getStorageLayout

`storage.buckets.getStorageLayout`

Returns the storage layout configuration for the specified bucket. Note that this operation requires storage.objects.list permission

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.getStorageLayout({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `prefix` | `string` | No | An optional prefix used for permission check. It is useful when the caller only has storage.objects.list permission under a specific prefix. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `kind` | `string \| null` | No | The kind of item this is. For storage layout, this is always storage#storageLayout. |
| `location` | `string \| null` | No | The location of the bucket. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `rapidCacheInfo` | `object \| null` | No | The Rapid Cache configuration for the bucket. |

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] rapidCacheInfo full type
>
> ```ts theme={null}
> {
>   cacheType?: string | null
> } | null
> ```

***

### buckets.insert

`storage.buckets.insert`

Creates a new bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.insert({
	project: 'demo-project',
	name: 'demo-bucket',
	location: 'US',
	storageClass: 'STANDARD',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `predefinedAcl` | `authenticatedRead \| private \| projectPrivate \| publicRead \| publicReadWrite` | No | Apply a predefined set of access controls to this bucket. |
| `predefinedDefaultObjectAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of default object access controls to this bucket. |
| `project` | `string` | Yes | A valid API project identifier. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. |
| `enableObjectRetention` | `boolean` | No | When set to true, object retention is enabled for this bucket. |
| `acl` | `object[]` | No | Access controls on the bucket. |
| `billing` | `object` | No | The bucket's billing configuration. |
| `cors` | `object[]` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[]` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object` | No | Encryption configuration for a bucket. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object` | No | The bucket's IAM configuration. |
| `id` | `string` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string>` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object` | No | The bucket's Autoclass configuration. |
| `location` | `string` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string` | No | The type of the bucket location. |
| `logging` | `object` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number` | No | The generation of this bucket. |
| `metageneration` | `string \| number` | No | The metadata generation of this bucket. |
| `name` | `string` | No | The name of the bucket. |
| `owner` | `object` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object` | No | The bucket's object retention config. |
| `rpo` | `string` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string` | No | The URI of this bucket. |
| `softDeletePolicy` | `object` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object` | No | The bucket's versioning configuration. |
| `website` | `object` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   id?: string,
>   kind?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean
> }
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number,
>   method?: string[],
>   origin?: string[],
>   responseHeader?: string[]
> }[]
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[]
> }
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   uniformBucketLevelAccess?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   publicAccessPrevention?: string
> }
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[]
>   },
>   vpcNetworkSources?: {
>     network?: string,
>     allowedIpCidrRanges?: string[]
>   }[],
>   allowCrossOrgVpcs?: boolean,
>   allowAllServiceAgentAccess?: boolean
> }
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string,
>       type?: string
>     },
>     condition?: {
>       age?: number,
>       createdBefore?: string,
>       customTimeBefore?: string,
>       daysSinceCustomTime?: number,
>       daysSinceNoncurrentTime?: number,
>       isLive?: boolean,
>       matchesPattern?: string,
>       matchesPrefix?: string[],
>       matchesSuffix?: string[],
>       matchesStorageClass?: string[],
>       noncurrentTimeBefore?: string,
>       sizeAboveBytes?: string | number,
>       sizeBelowBytes?: string | number,
>       numNewerVersions?: number
>     }
>   }[]
> }
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean,
>   toggleTime?: string,
>   terminalStorageClass?: string,
>   terminalStorageClassUpdateTime?: string
> }
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string,
>   logObjectPrefix?: string
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string,
>   isLocked?: boolean,
>   retentionPeriod?: string | number
> }
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string
> }
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number,
>   effectiveTime?: string,
>   hardDeletePause?: {
>     enabled?: boolean,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string,
>   notFoundPage?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.list

`storage.buckets.list`

Retrieves a list of buckets for a given project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `maxResults` | `number` | No | Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |
| `prefix` | `string` | No | Filter results to buckets whose names begin with this prefix. |
| `softDeleted` | `boolean` | No | If true, only soft-deleted bucket versions will be returned. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `project` | `string` | Yes | A valid API project identifier. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. |
| `returnPartialSuccess` | `boolean` | No | If true, return a list of bucket resource names for buckets that are in unreachable locations. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of buckets, this is always storage#buckets. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
| `unreachable` | `string[] \| null` | No | The list of bucket resource names that could not be reached during the listing operation. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   acl?: {
>     bucket?: string | null,
>     domain?: string | null,
>     email?: string | null,
>     entity?: string | null,
>     entityId?: string | null,
>     etag?: string | null,
>     id?: string | null,
>     kind?: string | null,
>     projectTeam?: {
>       projectNumber?: string | null,
>       team?: string | null
>     } | null,
>     role?: string | null,
>     selfLink?: string | null
>   }[] | null,
>   billing?: {
>     requesterPays?: boolean | null
>   } | null,
>   cors?: {
>     maxAgeSeconds?: number | null,
>     method?: string[] | null,
>     origin?: string[] | null,
>     responseHeader?: string[] | null
>   }[] | null,
>   customPlacementConfig?: {
>     dataLocations?: string[] | null
>   } | null,
>   defaultEventBasedHold?: boolean | null,
>   defaultObjectAcl?: {
>     bucket?: string | null,
>     domain?: string | null,
>     email?: string | null,
>     entity?: string | null,
>     entityId?: string | null,
>     etag?: string | null,
>     generation?: string | number | null,
>     id?: string | null,
>     kind?: string | null,
>     object?: string | null,
>     projectTeam?: {
>       projectNumber?: string | null,
>       team?: string | null
>     } | null,
>     role?: string | null,
>     selfLink?: string | null
>   }[] | null,
>   encryption?: {
>     defaultKmsKeyName?: string | null,
>     googleManagedEncryptionEnforcementConfig?: {
>       restrictionMode?: string | null,
>       effectiveTime?: string | null
>     } | null,
>     customerManagedEncryptionEnforcementConfig?: {
>       restrictionMode?: string | null,
>       effectiveTime?: string | null
>     } | null,
>     customerSuppliedEncryptionEnforcementConfig?: {
>       restrictionMode?: string | null,
>       effectiveTime?: string | null
>     } | null
>   } | null,
>   etag?: string | null,
>   hierarchicalNamespace?: {
>     enabled?: boolean | null
>   } | null,
>   iamConfiguration?: {
>     bucketPolicyOnly?: {
>       enabled?: boolean | null,
>       lockedTime?: string | null
>     } | null,
>     uniformBucketLevelAccess?: {
>       enabled?: boolean | null,
>       lockedTime?: string | null
>     } | null,
>     publicAccessPrevention?: string | null
>   } | null,
>   id?: string | null,
>   ipFilter?: {
>     mode?: string | null,
>     publicNetworkSource?: {
>       allowedIpCidrRanges?: string[] | null
>     } | null,
>     vpcNetworkSources?: {
>       network?: string | null,
>       allowedIpCidrRanges?: string[] | null
>     }[] | null,
>     allowCrossOrgVpcs?: boolean | null,
>     allowAllServiceAgentAccess?: boolean | null
>   } | null,
>   kind?: string | null,
>   labels?: Record<string, string> | null,
>   lifecycle?: {
>     rule?: {
>       action?: {
>         storageClass?: string | null,
>         type?: string | null
>       } | null,
>       condition?: {
>         age?: number | null,
>         createdBefore?: string | null,
>         customTimeBefore?: string | null,
>         daysSinceCustomTime?: number | null,
>         daysSinceNoncurrentTime?: number | null,
>         isLive?: boolean | null,
>         matchesPattern?: string | null,
>         matchesPrefix?: string[] | null,
>         matchesSuffix?: string[] | null,
>         matchesStorageClass?: string[] | null,
>         noncurrentTimeBefore?: string | null,
>         sizeAboveBytes?: string | number | null,
>         sizeBelowBytes?: string | number | null,
>         numNewerVersions?: number | null
>       } | null
>     }[] | null
>   } | null,
>   autoclass?: {
>     enabled?: boolean | null,
>     toggleTime?: string | null,
>     terminalStorageClass?: string | null,
>     terminalStorageClassUpdateTime?: string | null
>   } | null,
>   location?: string | null,
>   locationType?: string | null,
>   logging?: {
>     logBucket?: string | null,
>     logObjectPrefix?: string | null
>   } | null,
>   generation?: string | number | null,
>   metageneration?: string | number | null,
>   name?: string | null,
>   owner?: {
>     entity?: string | null,
>     entityId?: string | null
>   } | null,
>   projectNumber?: string | number | null,
>   retentionPolicy?: {
>     effectiveTime?: string | null,
>     isLocked?: boolean | null,
>     retentionPeriod?: string | number | null
>   } | null,
>   objectRetention?: {
>     mode?: string | null
>   } | null,
>   rpo?: string | null,
>   selfLink?: string | null,
>   softDeletePolicy?: {
>     retentionDurationSeconds?: string | number | null,
>     effectiveTime?: string | null,
>     hardDeletePause?: {
>       enabled?: boolean | null,
>       effectiveTime?: string | null
>     } | null
>   } | null,
>   storageClass?: string | null,
>   timeCreated?: string | null,
>   updated?: string | null,
>   softDeleteTime?: string | null,
>   hardDeleteTime?: string | null,
>   versioning?: {
>     enabled?: boolean | null
>   } | null,
>   website?: {
>     mainPageSuffix?: string | null,
>     notFoundPage?: string | null
>   } | null,
>   satisfiesPZS?: boolean | null,
>   satisfiesPZI?: boolean | null
> }[] | null
> ```

***

### buckets.lockRetentionPolicy

`storage.buckets.lockRetentionPolicy`

Locks retention policy on a bucket

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.lockRetentionPolicy({ bucket: 'demo-bucket', ifMetagenerationMatch: '3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `ifMetagenerationMatch` | `string \| number` | Yes | Makes the operation conditional on whether bucket's current metageneration matches the given value. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.operations.advanceRelocateBucket

`storage.buckets.operations.advanceRelocateBucket`

Starts asynchronous advancement of the relocate bucket operation in the case of required write downtime, to allow it to lock the bucket at the source location, and proceed with the bucket location swap. The server makes a best effort to advance the relocate bucket operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.operations.advanceRelocateBucket({ bucket: 'demo-bucket', operationId: 'operation-123', ttl: '604800s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket to advance the relocate for. |
| `operationId` | `string` | Yes | ID of the operation resource. |
| `ttl` | `string` | No | Specifies the duration after which the relocation will revert to the sync stage if the relocation hasn't succeeded. Optional, if not supplied, a default value of 12h will be used. |
| `expireTime` | `string` | No | Specifies the time when the relocation will revert to the sync stage if the relocation hasn't succeeded. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### buckets.operations.cancel

`storage.buckets.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.operations.cancel({ bucket: 'demo-bucket', operationId: 'operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | The parent bucket of the operation resource. |
| `operationId` | `string` | Yes | The ID of the operation resource. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### buckets.operations.get

`storage.buckets.operations.get`

Gets the latest state of a long-running operation

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.operations.get({ bucket: 'demo-bucket', operationId: 'operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | The parent bucket of the operation resource. |
| `operationId` | `string` | Yes | The ID of the operation resource. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### buckets.operations.list

`storage.buckets.operations.list`

Lists operations that match the specified filter in the request (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.operations.list({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter to narrow down results to a preferred subset. The filtering language is documented in more detail in [AIP-160](https://google.aip.dev/160). |
| `bucket` | `string` | Yes | Name of the bucket in which to look for operations. |
| `pageSize` | `number` | No | Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of operations, this is always storage#operations. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   done?: boolean | null,
>   error?: {
>     code?: number | null,
>     details?: Record<string, any>[] | null,
>     message?: string | null
>   } | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   response?: Record<string, any> | null,
>   selfLink?: string | null,
>   kind?: string | null
> }[] | null
> ```

***

### buckets.patch

`storage.buckets.patch`

Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.patch({
	bucket: 'demo-bucket',
	labels: { env: 'prod' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. |
| `predefinedAcl` | `authenticatedRead \| private \| projectPrivate \| publicRead \| publicReadWrite` | No | Apply a predefined set of access controls to this bucket. |
| `predefinedDefaultObjectAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of default object access controls to this bucket. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the bucket. |
| `billing` | `object` | No | The bucket's billing configuration. |
| `cors` | `object[]` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[]` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object` | No | Encryption configuration for a bucket. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object` | No | The bucket's IAM configuration. |
| `id` | `string` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string>` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object` | No | The bucket's Autoclass configuration. |
| `location` | `string` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string` | No | The type of the bucket location. |
| `logging` | `object` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number` | No | The generation of this bucket. |
| `metageneration` | `string \| number` | No | The metadata generation of this bucket. |
| `name` | `string` | No | The name of the bucket. |
| `owner` | `object` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object` | No | The bucket's object retention config. |
| `rpo` | `string` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string` | No | The URI of this bucket. |
| `softDeletePolicy` | `object` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object` | No | The bucket's versioning configuration. |
| `website` | `object` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   id?: string,
>   kind?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean
> }
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number,
>   method?: string[],
>   origin?: string[],
>   responseHeader?: string[]
> }[]
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[]
> }
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   uniformBucketLevelAccess?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   publicAccessPrevention?: string
> }
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[]
>   },
>   vpcNetworkSources?: {
>     network?: string,
>     allowedIpCidrRanges?: string[]
>   }[],
>   allowCrossOrgVpcs?: boolean,
>   allowAllServiceAgentAccess?: boolean
> }
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string,
>       type?: string
>     },
>     condition?: {
>       age?: number,
>       createdBefore?: string,
>       customTimeBefore?: string,
>       daysSinceCustomTime?: number,
>       daysSinceNoncurrentTime?: number,
>       isLive?: boolean,
>       matchesPattern?: string,
>       matchesPrefix?: string[],
>       matchesSuffix?: string[],
>       matchesStorageClass?: string[],
>       noncurrentTimeBefore?: string,
>       sizeAboveBytes?: string | number,
>       sizeBelowBytes?: string | number,
>       numNewerVersions?: number
>     }
>   }[]
> }
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean,
>   toggleTime?: string,
>   terminalStorageClass?: string,
>   terminalStorageClassUpdateTime?: string
> }
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string,
>   logObjectPrefix?: string
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string,
>   isLocked?: boolean,
>   retentionPeriod?: string | number
> }
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string
> }
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number,
>   effectiveTime?: string,
>   hardDeletePause?: {
>     enabled?: boolean,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string,
>   notFoundPage?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.relocate

`storage.buckets.relocate`

Initiates a long-running Relocate Bucket operation on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.relocate({ bucket: 'demo-bucket', destinationLocation: 'US-CENTRAL1', validateOnly: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket to be moved. |
| `destinationLocation` | `string` | No | The new location the bucket will be relocated to. |
| `destinationCustomPlacementConfig` | `object` | No | The bucket's new custom placement configuration if relocating to a Custom Dual Region. |
| `validateOnly` | `boolean` | No | If true, validate the operation, but do not actually relocate the bucket. |
| `destinationKmsKeyName` | `string` | No | Resource name of a Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key. If set, is used to encrypt all objects in the destination bucket. |

> [accordion] destinationCustomPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### buckets.restore

`storage.buckets.restore`

Restores a soft-deleted bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.restore({ bucket: 'demo-bucket', generation: '1733150000000000' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `generation` | `string \| number` | Yes | Generation of a bucket. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.setIamPolicy

`storage.buckets.setIamPolicy`

Updates an IAM policy for the specified bucket

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.setIamPolicy({
	bucket: 'demo-bucket',
	bindings: [{
		role: 'roles/storage.objectViewer',
		members: ['user:ada@example.com'],
	}],
	etag: 'BwYzQ1w2X3Y=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `bindings` | `object[]` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string,
>     expression?: string,
>     location?: string,
>     title?: string
>   },
>   members?: string[],
>   role?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### buckets.testIamPermissions

`storage.buckets.testIamPermissions`

Tests a set of permissions on the given bucket to see which, if any, are held by the caller

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.testIamPermissions({
	bucket: 'demo-bucket',
	permissions: ['storage.buckets.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `permissions` | `string[]` | Yes | Permissions to test. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. |
| `permissions` | `string[] \| null` | No | The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: - storage.buckets.delete - Delete bucket. - storage.buckets.get - Read bucket metadata. - storage.buckets.getIamPolicy - Read bucket IAM policy. - storage.buckets.create - Create bucket. - storage.buckets.list - List buckets. - storage.buckets.setIamPolicy - Update bucket IAM policy. - storage.buckets.update - Update bucket metadata. - storage.objects.delete - Delete object. |

***

### buckets.update

`storage.buckets.update`

Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.buckets.update({
	bucket: 'demo-bucket',
	labels: { env: 'prod' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. |
| `predefinedAcl` | `authenticatedRead \| private \| projectPrivate \| publicRead \| publicReadWrite` | No | Apply a predefined set of access controls to this bucket. |
| `predefinedDefaultObjectAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of default object access controls to this bucket. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the bucket. |
| `billing` | `object` | No | The bucket's billing configuration. |
| `cors` | `object[]` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[]` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object` | No | Encryption configuration for a bucket. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object` | No | The bucket's IAM configuration. |
| `id` | `string` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string>` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object` | No | The bucket's Autoclass configuration. |
| `location` | `string` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string` | No | The type of the bucket location. |
| `logging` | `object` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number` | No | The generation of this bucket. |
| `metageneration` | `string \| number` | No | The metadata generation of this bucket. |
| `name` | `string` | No | The name of the bucket. |
| `owner` | `object` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object` | No | The bucket's object retention config. |
| `rpo` | `string` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string` | No | The URI of this bucket. |
| `softDeletePolicy` | `object` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object` | No | The bucket's versioning configuration. |
| `website` | `object` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   id?: string,
>   kind?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean
> }
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number,
>   method?: string[],
>   origin?: string[],
>   responseHeader?: string[]
> }[]
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[]
> }
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   uniformBucketLevelAccess?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   publicAccessPrevention?: string
> }
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[]
>   },
>   vpcNetworkSources?: {
>     network?: string,
>     allowedIpCidrRanges?: string[]
>   }[],
>   allowCrossOrgVpcs?: boolean,
>   allowAllServiceAgentAccess?: boolean
> }
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string,
>       type?: string
>     },
>     condition?: {
>       age?: number,
>       createdBefore?: string,
>       customTimeBefore?: string,
>       daysSinceCustomTime?: number,
>       daysSinceNoncurrentTime?: number,
>       isLive?: boolean,
>       matchesPattern?: string,
>       matchesPrefix?: string[],
>       matchesSuffix?: string[],
>       matchesStorageClass?: string[],
>       noncurrentTimeBefore?: string,
>       sizeAboveBytes?: string | number,
>       sizeBelowBytes?: string | number,
>       numNewerVersions?: number
>     }
>   }[]
> }
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean,
>   toggleTime?: string,
>   terminalStorageClass?: string,
>   terminalStorageClassUpdateTime?: string
> }
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string,
>   logObjectPrefix?: string
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string,
>   isLocked?: boolean,
>   retentionPeriod?: string | number
> }
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string
> }
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number,
>   effectiveTime?: string,
>   hardDeletePause?: {
>     enabled?: boolean,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string,
>   notFoundPage?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### defaultObjectAccessControls.delete

`storage.defaultObjectAccessControls.delete`

Permanently deletes the default object ACL entry for the specified entity on the specified bucket

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.defaultObjectAccessControls.delete({ bucket: 'demo-bucket', entity: 'allUsers' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### defaultObjectAccessControls.get

`storage.defaultObjectAccessControls.get`

Returns the default object ACL entry for the specified entity on the specified bucket

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.defaultObjectAccessControls.get({ bucket: 'demo-bucket', entity: 'allUsers' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number \| null` | No | The content generation of the object, if applied to an object. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string \| null` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### defaultObjectAccessControls.insert

`storage.defaultObjectAccessControls.insert`

Creates a new default object ACL entry on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.defaultObjectAccessControls.insert({ bucket: 'demo-bucket', entity: 'user-ada@example.com', role: 'READER' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `body_bucket` | `string` | No | The name of the bucket. |
| `domain` | `string` | No | The domain associated with the entity, if any. |
| `email` | `string` | No | The email address associated with the entity, if any. |
| `entity` | `string` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string` | No | The ID for the entity, if any. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number` | No | The content generation of the object, if applied to an object. |
| `id` | `string` | No | The ID of the access-control entry. |
| `kind` | `string` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object` | No | The project team associated with the entity, if any. |
| `role` | `string` | No | The access permission for the entity. |
| `selfLink` | `string` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string,
>   team?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number \| null` | No | The content generation of the object, if applied to an object. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string \| null` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### defaultObjectAccessControls.list

`storage.defaultObjectAccessControls.list`

Retrieves default object ACL entries on the specified bucket

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.defaultObjectAccessControls.list({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `ifMetagenerationMatch` | `string \| number` | No | If present, only return default ACL listing if the bucket's current metageneration matches this value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | If present, only return default ACL listing if the bucket's current metageneration does not match the given value. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

***

### defaultObjectAccessControls.patch

`storage.defaultObjectAccessControls.patch`

Patches a default object ACL entry on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.defaultObjectAccessControls.patch({ bucket: 'demo-bucket', entity: 'user-ada@example.com', role: 'READER' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `body_bucket` | `string` | No | The name of the bucket. |
| `domain` | `string` | No | The domain associated with the entity, if any. |
| `email` | `string` | No | The email address associated with the entity, if any. |
| `body_entity` | `string` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string` | No | The ID for the entity, if any. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number` | No | The content generation of the object, if applied to an object. |
| `id` | `string` | No | The ID of the access-control entry. |
| `kind` | `string` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object` | No | The project team associated with the entity, if any. |
| `role` | `string` | No | The access permission for the entity. |
| `selfLink` | `string` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string,
>   team?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number \| null` | No | The content generation of the object, if applied to an object. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string \| null` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### defaultObjectAccessControls.update

`storage.defaultObjectAccessControls.update`

Updates a default object ACL entry on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.defaultObjectAccessControls.update({ bucket: 'demo-bucket', entity: 'user-ada@example.com', role: 'READER' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `body_bucket` | `string` | No | The name of the bucket. |
| `domain` | `string` | No | The domain associated with the entity, if any. |
| `email` | `string` | No | The email address associated with the entity, if any. |
| `body_entity` | `string` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string` | No | The ID for the entity, if any. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number` | No | The content generation of the object, if applied to an object. |
| `id` | `string` | No | The ID of the access-control entry. |
| `kind` | `string` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object` | No | The project team associated with the entity, if any. |
| `role` | `string` | No | The access permission for the entity. |
| `selfLink` | `string` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string,
>   team?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number \| null` | No | The content generation of the object, if applied to an object. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string \| null` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### folders.delete

`storage.folders.delete`

Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.folders.delete({ bucket: 'demo-bucket', folder: 'uploads/' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the folder resides. |
| `folder` | `string` | Yes | Name of a folder. |
| `ifMetagenerationMatch` | `string \| number` | No | If set, only deletes the folder if its metageneration matches this value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | If set, only deletes the folder if its metageneration does not match this value. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### folders.deleteRecursive

`storage.folders.deleteRecursive`

Deletes a folder recursively. Only applicable to buckets with hierarchical namespace enabled

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.folders.deleteRecursive({ bucket: 'demo-bucket', folder: 'uploads/' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the folder resides. |
| `folder` | `string` | Yes | Name of a folder. |
| `ifMetagenerationMatch` | `string \| number` | No | If set, only deletes the folder if its metageneration matches this value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | If set, only deletes the folder if its metageneration does not match this value. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### folders.get

`storage.folders.get`

Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.folders.get({ bucket: 'demo-bucket', folder: 'uploads/' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the folder resides. |
| `folder` | `string` | Yes | Name of a folder. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the return of the folder metadata conditional on whether the folder's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the return of the folder metadata conditional on whether the folder's current metageneration does not match the given value. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket containing this folder. |
| `id` | `string \| null` | No | The ID of the folder, including the bucket name, folder name. |
| `kind` | `string \| null` | No | The kind of item this is. For folders, this is always storage#folder. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this folder. Used for preconditions and for detecting changes in metadata. |
| `name` | `string \| null` | No | The name of the folder. Required if not specified by URL parameter. |
| `selfLink` | `string \| null` | No | The link to this folder. |
| `createTime` | `string \| null` | No | The creation time of the folder in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The modification time of the folder metadata in RFC 3339 format. |
| `pendingRenameInfo` | `object \| null` | No | Only present if the folder is part of an ongoing rename folder operation. Contains information which can be used to query the operation status. |

> [accordion] pendingRenameInfo full type
>
> ```ts theme={null}
> {
>   operationId?: string | null
> } | null
> ```

***

### folders.insert

`storage.folders.insert`

Creates a new folder. Only applicable to buckets with hierarchical namespace enabled

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.folders.insert({ bucket: 'demo-bucket', name: 'uploads/' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the folder resides. |
| `recursive` | `boolean` | No | If true, any parent folder which doesn't exist will be created automatically. |
| `body_bucket` | `string` | No | The name of the bucket containing this folder. |
| `id` | `string` | No | The ID of the folder, including the bucket name, folder name. |
| `kind` | `string` | No | The kind of item this is. For folders, this is always storage#folder. |
| `metageneration` | `string \| number` | No | The version of the metadata for this folder. Used for preconditions and for detecting changes in metadata. |
| `name` | `string` | No | The name of the folder. Required if not specified by URL parameter. |
| `selfLink` | `string` | No | The link to this folder. |
| `createTime` | `string` | No | The creation time of the folder in RFC 3339 format. |
| `updateTime` | `string` | No | The modification time of the folder metadata in RFC 3339 format. |
| `pendingRenameInfo` | `object` | No | Only present if the folder is part of an ongoing rename folder operation. Contains information which can be used to query the operation status. |

> [accordion] pendingRenameInfo full type
>
> ```ts theme={null}
> {
>   operationId?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket containing this folder. |
| `id` | `string \| null` | No | The ID of the folder, including the bucket name, folder name. |
| `kind` | `string \| null` | No | The kind of item this is. For folders, this is always storage#folder. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this folder. Used for preconditions and for detecting changes in metadata. |
| `name` | `string \| null` | No | The name of the folder. Required if not specified by URL parameter. |
| `selfLink` | `string \| null` | No | The link to this folder. |
| `createTime` | `string \| null` | No | The creation time of the folder in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The modification time of the folder metadata in RFC 3339 format. |
| `pendingRenameInfo` | `object \| null` | No | Only present if the folder is part of an ongoing rename folder operation. Contains information which can be used to query the operation status. |

> [accordion] pendingRenameInfo full type
>
> ```ts theme={null}
> {
>   operationId?: string | null
> } | null
> ```

***

### folders.list

`storage.folders.list`

Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical namespace enabled (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.folders.list({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which to look for folders. |
| `delimiter` | `string` | No | Returns results in a directory-like mode. The only supported value is '/'. If set, items will only contain folders that either exactly match the prefix, or are one level below the prefix. |
| `endOffset` | `string` | No | Filter results to folders whose names are lexicographically before endOffset. If startOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive). |
| `pageSize` | `number` | No | Maximum number of items to return in a single page of responses. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |
| `prefix` | `string` | No | Filter results to folders whose paths begin with this prefix. If set, the value must either be an empty string or end with a '/'. |
| `startOffset` | `string` | No | Filter results to folders whose names are lexicographically equal to or after startOffset. If endOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of folders, this is always storage#folders. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   metageneration?: string | number | null,
>   name?: string | null,
>   selfLink?: string | null,
>   createTime?: string | null,
>   updateTime?: string | null,
>   pendingRenameInfo?: {
>     operationId?: string | null
>   } | null
> }[] | null
> ```

***

### folders.rename

`storage.folders.rename`

Renames a source folder to a destination folder. Only applicable to buckets with hierarchical namespace enabled

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.folders.rename({ bucket: 'demo-bucket', destinationFolder: 'archive/', sourceFolder: 'uploads/' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the folders are in. |
| `destinationFolder` | `string` | Yes | Name of the destination folder. |
| `ifSourceMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration matches the given value. |
| `ifSourceMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration does not match the given value. |
| `sourceFolder` | `string` | Yes | Name of the source folder. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### hmacKeys.create

`storage.hmacKeys.create`

Creates a new HMAC key for the specified service account

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.hmacKeys.create({ projectId: 'demo-project', serviceAccountEmail: 'deployer@demo-project.iam.gserviceaccount.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Project ID owning the service account. |
| `serviceAccountEmail` | `string` | Yes | Email address of the service account. |
| `userProject` | `string` | No | The project to be billed for this request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. For HMAC keys, this is always storage#hmacKey. |
| `metadata` | `object \| null` | No | JSON template to produce a JSON-style HMAC Key metadata resource. |
| `secret` | `string \| null` | No | HMAC secret key material. |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   accessId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectId?: string | null,
>   selfLink?: string | null,
>   serviceAccountEmail?: string | null,
>   state?: string | null,
>   timeCreated?: string | null,
>   updated?: string | null
> } | null
> ```

***

### hmacKeys.delete

`storage.hmacKeys.delete`

Deletes an HMAC key

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.hmacKeys.delete({ accessId: 'GOOG1EXAMPLE', projectId: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accessId` | `string` | Yes | Name of the HMAC key to be deleted. |
| `projectId` | `string` | Yes | Project ID owning the requested key |
| `userProject` | `string` | No | The project to be billed for this request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### hmacKeys.get

`storage.hmacKeys.get`

Retrieves an HMAC key's metadata

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.hmacKeys.get({ accessId: 'GOOG1EXAMPLE', projectId: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accessId` | `string` | Yes | Name of the HMAC key. |
| `projectId` | `string` | Yes | Project ID owning the service account of the requested key. |
| `userProject` | `string` | No | The project to be billed for this request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `accessId` | `string \| null` | No | The ID of the HMAC Key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the HMAC key. |
| `id` | `string \| null` | No | The ID of the HMAC key, including the Project ID and the Access ID. |
| `kind` | `string \| null` | No | The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata. |
| `projectId` | `string \| null` | No | Project ID owning the service account to which the key authenticates. |
| `selfLink` | `string \| null` | No | The link to this resource. |
| `serviceAccountEmail` | `string \| null` | No | The email address of the key's associated service account. |
| `state` | `string \| null` | No | The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED. |
| `timeCreated` | `string \| null` | No | The creation time of the HMAC key in RFC 3339 format. |
| `updated` | `string \| null` | No | The last modification time of the HMAC key metadata in RFC 3339 format. |

***

### hmacKeys.list

`storage.hmacKeys.list`

Retrieves a list of HMAC keys matching the criteria (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.hmacKeys.list({ projectId: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `maxResults` | `number` | No | Maximum number of items to return in a single page of responses. The service uses this parameter or 250 items, whichever is smaller. The max number of items per page will also be limited by the number of distinct service accounts in the response. If the number of service accounts in a single response is too high, the page will truncated and a next page token will be returned. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |
| `projectId` | `string` | Yes | Name of the project in which to look for HMAC keys. |
| `serviceAccountEmail` | `string` | No | If present, only keys for the given service account are returned. |
| `showDeletedKeys` | `boolean` | No | Whether or not to show keys in the DELETED state. |
| `userProject` | `string` | No | The project to be billed for this request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of hmacKeys, this is always storage#hmacKeysMetadata. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   accessId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectId?: string | null,
>   selfLink?: string | null,
>   serviceAccountEmail?: string | null,
>   state?: string | null,
>   timeCreated?: string | null,
>   updated?: string | null
> }[] | null
> ```

***

### hmacKeys.update

`storage.hmacKeys.update`

Updates the state of an HMAC key. See the [HMAC Key resource descriptor](https://cloud.google.com/storage/docs/json_api/v1/projects/hmacKeys/update#request-body) for valid states

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.hmacKeys.update({ accessId: 'GOOG1EXAMPLE', projectId: 'demo-project', state: 'INACTIVE' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accessId` | `string` | Yes | Name of the HMAC key being updated. |
| `projectId` | `string` | Yes | Project ID owning the service account of the updated key. |
| `userProject` | `string` | No | The project to be billed for this request. |
| `body_accessId` | `string` | No | The ID of the HMAC Key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the HMAC key. |
| `id` | `string` | No | The ID of the HMAC key, including the Project ID and the Access ID. |
| `kind` | `string` | No | The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata. |
| `body_projectId` | `string` | No | Project ID owning the service account to which the key authenticates. |
| `selfLink` | `string` | No | The link to this resource. |
| `serviceAccountEmail` | `string` | No | The email address of the key's associated service account. |
| `state` | `string` | No | The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED. |
| `timeCreated` | `string` | No | The creation time of the HMAC key in RFC 3339 format. |
| `updated` | `string` | No | The last modification time of the HMAC key metadata in RFC 3339 format. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `accessId` | `string \| null` | No | The ID of the HMAC Key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the HMAC key. |
| `id` | `string \| null` | No | The ID of the HMAC key, including the Project ID and the Access ID. |
| `kind` | `string \| null` | No | The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata. |
| `projectId` | `string \| null` | No | Project ID owning the service account to which the key authenticates. |
| `selfLink` | `string \| null` | No | The link to this resource. |
| `serviceAccountEmail` | `string \| null` | No | The email address of the key's associated service account. |
| `state` | `string \| null` | No | The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED. |
| `timeCreated` | `string \| null` | No | The creation time of the HMAC key in RFC 3339 format. |
| `updated` | `string \| null` | No | The last modification time of the HMAC key metadata in RFC 3339 format. |

***

### managedFolders.delete

`storage.managedFolders.delete`

Permanently deletes a managed folder

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.managedFolders.delete({ bucket: 'demo-bucket', managedFolder: 'uploads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket containing the managed folder. |
| `managedFolder` | `string` | Yes | The managed folder name/path. |
| `ifMetagenerationMatch` | `string \| number` | No | If set, only deletes the managed folder if its metageneration matches this value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | If set, only deletes the managed folder if its metageneration does not match this value. |
| `allowNonEmpty` | `boolean` | No | Allows the deletion of a managed folder even if it is not empty. A managed folder is empty if there are no objects or managed folders that it applies to. Callers must have storage.managedFolders.setIamPolicy permission. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### managedFolders.get

`storage.managedFolders.get`

Returns metadata of the specified managed folder

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.managedFolders.get({ bucket: 'demo-bucket', managedFolder: 'uploads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket containing the managed folder. |
| `managedFolder` | `string` | Yes | The managed folder name/path. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration does not match the given value. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket containing this managed folder. |
| `id` | `string \| null` | No | The ID of the managed folder, including the bucket name and managed folder name. |
| `kind` | `string \| null` | No | The kind of item this is. For managed folders, this is always storage#managedFolder. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata. |
| `name` | `string \| null` | No | The name of the managed folder. Required if not specified by URL parameter. |
| `selfLink` | `string \| null` | No | The link to this managed folder. |
| `createTime` | `string \| null` | No | The creation time of the managed folder in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The last update time of the managed folder metadata in RFC 3339 format. |
| `rapidCacheConfig` | `object \| null` | No | Configuration options for the rapid cache of a managed folder. |

> [accordion] rapidCacheConfig full type
>
> ```ts theme={null}
> {
>   policies?: Record<string, {
>     rapidCacheId?: string | null,
>     ingestOnWrite?: string | null
>   }> | null
> } | null
> ```

***

### managedFolders.getIamPolicy

`storage.managedFolders.getIamPolicy`

Returns an IAM policy for the specified managed folder

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.managedFolders.getIamPolicy({ bucket: 'demo-bucket', managedFolder: 'uploads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket containing the managed folder. |
| `optionsRequestedPolicyVersion` | `number` | No | The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails. |
| `managedFolder` | `string` | Yes | The managed folder name/path. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### managedFolders.insert

`storage.managedFolders.insert`

Creates a new managed folder

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.managedFolders.insert({ bucket: 'demo-bucket', name: 'uploads/' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket containing the managed folder. |
| `body_bucket` | `string` | No | The name of the bucket containing this managed folder. |
| `id` | `string` | No | The ID of the managed folder, including the bucket name and managed folder name. |
| `kind` | `string` | No | The kind of item this is. For managed folders, this is always storage#managedFolder. |
| `metageneration` | `string \| number` | No | The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata. |
| `name` | `string` | No | The name of the managed folder. Required if not specified by URL parameter. |
| `selfLink` | `string` | No | The link to this managed folder. |
| `createTime` | `string` | No | The creation time of the managed folder in RFC 3339 format. |
| `updateTime` | `string` | No | The last update time of the managed folder metadata in RFC 3339 format. |
| `rapidCacheConfig` | `object` | No | Configuration options for the rapid cache of a managed folder. |

> [accordion] rapidCacheConfig full type
>
> ```ts theme={null}
> {
>   policies?: Record<string, {
>     rapidCacheId?: string,
>     ingestOnWrite?: enabled | unspecified
>   }>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket containing this managed folder. |
| `id` | `string \| null` | No | The ID of the managed folder, including the bucket name and managed folder name. |
| `kind` | `string \| null` | No | The kind of item this is. For managed folders, this is always storage#managedFolder. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata. |
| `name` | `string \| null` | No | The name of the managed folder. Required if not specified by URL parameter. |
| `selfLink` | `string \| null` | No | The link to this managed folder. |
| `createTime` | `string \| null` | No | The creation time of the managed folder in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The last update time of the managed folder metadata in RFC 3339 format. |
| `rapidCacheConfig` | `object \| null` | No | Configuration options for the rapid cache of a managed folder. |

> [accordion] rapidCacheConfig full type
>
> ```ts theme={null}
> {
>   policies?: Record<string, {
>     rapidCacheId?: string | null,
>     ingestOnWrite?: string | null
>   }> | null
> } | null
> ```

***

### managedFolders.list

`storage.managedFolders.list`

Lists managed folders in the given bucket (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.managedFolders.list({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket containing the managed folder. |
| `pageSize` | `number` | No | Maximum number of items to return in a single page of responses. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |
| `prefix` | `string` | No | The managed folder name/path prefix to filter the output list of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of managed folders, this is always storage#managedFolders. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   metageneration?: string | number | null,
>   name?: string | null,
>   selfLink?: string | null,
>   createTime?: string | null,
>   updateTime?: string | null,
>   rapidCacheConfig?: {
>     policies?: Record<string, {
>       rapidCacheId?: string | null,
>       ingestOnWrite?: string | null
>     }> | null
>   } | null
> }[] | null
> ```

***

### managedFolders.setIamPolicy

`storage.managedFolders.setIamPolicy`

Updates an IAM policy for the specified managed folder

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.storage.managedFolders.setIamPolicy({
	bucket: 'demo-bucket',
	managedFolder: 'uploads',
	bindings: [{
		role: 'roles/storage.objectViewer',
		members: ['user:ada@example.com'],
	}],
	etag: 'BwYzQ1w2X3Y=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket containing the managed folder. |
| `managedFolder` | `string` | Yes | The managed folder name/path. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `bindings` | `object[]` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string,
>     expression?: string,
>     location?: string,
>     title?: string
>   },
>   members?: string[],
>   role?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### managedFolders.testIamPermissions

`storage.managedFolders.testIamPermissions`

Tests a set of permissions on the given managed folder to see which, if any, are held by the caller

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.managedFolders.testIamPermissions({
	bucket: 'demo-bucket',
	managedFolder: 'uploads',
	permissions: ['storage.managedFolders.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket containing the managed folder. |
| `managedFolder` | `string` | Yes | The managed folder name/path. |
| `permissions` | `string[]` | Yes | Permissions to test. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. |
| `permissions` | `string[] \| null` | No | The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: - storage.buckets.delete - Delete bucket. - storage.buckets.get - Read bucket metadata. - storage.buckets.getIamPolicy - Read bucket IAM policy. - storage.buckets.create - Create bucket. - storage.buckets.list - List buckets. - storage.buckets.setIamPolicy - Update bucket IAM policy. - storage.buckets.update - Update bucket metadata. - storage.objects.delete - Delete object. |

***

### managedFolders.update

`storage.managedFolders.update`

Updates a managed folder using patch semantics

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.managedFolders.update({ bucket: 'demo-bucket', managedFolder: 'uploads/', name: 'uploads/' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | The name of the bucket containing the managed folder. |
| `managedFolder` | `string` | Yes | The name of the managed folder. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the metageneration of the managed folder matches the specified value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the metageneration of the managed folder doesn't match the specified value. |
| `body_bucket` | `string` | No | The name of the bucket containing this managed folder. |
| `id` | `string` | No | The ID of the managed folder, including the bucket name and managed folder name. |
| `kind` | `string` | No | The kind of item this is. For managed folders, this is always storage#managedFolder. |
| `metageneration` | `string \| number` | No | The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata. |
| `name` | `string` | No | The name of the managed folder. Required if not specified by URL parameter. |
| `selfLink` | `string` | No | The link to this managed folder. |
| `createTime` | `string` | No | The creation time of the managed folder in RFC 3339 format. |
| `updateTime` | `string` | No | The last update time of the managed folder metadata in RFC 3339 format. |
| `rapidCacheConfig` | `object` | No | Configuration options for the rapid cache of a managed folder. |

> [accordion] rapidCacheConfig full type
>
> ```ts theme={null}
> {
>   policies?: Record<string, {
>     rapidCacheId?: string,
>     ingestOnWrite?: enabled | unspecified
>   }>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket containing this managed folder. |
| `id` | `string \| null` | No | The ID of the managed folder, including the bucket name and managed folder name. |
| `kind` | `string \| null` | No | The kind of item this is. For managed folders, this is always storage#managedFolder. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata. |
| `name` | `string \| null` | No | The name of the managed folder. Required if not specified by URL parameter. |
| `selfLink` | `string \| null` | No | The link to this managed folder. |
| `createTime` | `string \| null` | No | The creation time of the managed folder in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The last update time of the managed folder metadata in RFC 3339 format. |
| `rapidCacheConfig` | `object \| null` | No | Configuration options for the rapid cache of a managed folder. |

> [accordion] rapidCacheConfig full type
>
> ```ts theme={null}
> {
>   policies?: Record<string, {
>     rapidCacheId?: string | null,
>     ingestOnWrite?: string | null
>   }> | null
> } | null
> ```

***

### notifications.delete

`storage.notifications.delete`

Permanently deletes a notification subscription

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.notifications.delete({ bucket: 'demo-bucket', notification: '1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | The parent bucket of the notification. |
| `notification` | `string` | Yes | ID of the notification to delete. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### notifications.get

`storage.notifications.get`

View a notification configuration

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.notifications.get({ bucket: 'demo-bucket', notification: '1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | The parent bucket of the notification. |
| `notification` | `string` | Yes | Notification ID |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `custom_attributes` | `Record<string, string> \| null` | No | An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for this subscription notification. |
| `event_types` | `string[] \| null` | No | If present, only send notifications about listed event types. If empty, sent notifications for all event types. |
| `id` | `string \| null` | No | The ID of the notification. |
| `kind` | `string \| null` | No | The kind of item this is. For notifications, this is always storage#notification. |
| `object_name_prefix` | `string \| null` | No | If present, only apply this notification configuration to object names that begin with this prefix. |
| `payload_format` | `string \| null` | No | The desired content of the Payload. |
| `selfLink` | `string \| null` | No | The canonical URL of this notification. |
| `topic` | `string \| null` | No | The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/\{project-identifier}/topics/\{my-topic}' |

***

### notifications.insert

`storage.notifications.insert`

Creates a notification subscription for a given bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.notifications.insert({
	bucket: 'demo-bucket',
	topic: '//pubsub.googleapis.com/projects/demo-project/topics/orders',
	payload_format: 'JSON_API_V1',
	event_types: ['OBJECT_FINALIZE'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | The parent bucket of the notification. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `custom_attributes` | `Record<string, string>` | No | An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for this subscription notification. |
| `event_types` | `string[]` | No | If present, only send notifications about listed event types. If empty, sent notifications for all event types. |
| `id` | `string` | No | The ID of the notification. |
| `kind` | `string` | No | The kind of item this is. For notifications, this is always storage#notification. |
| `object_name_prefix` | `string` | No | If present, only apply this notification configuration to object names that begin with this prefix. |
| `payload_format` | `string` | No | The desired content of the Payload. |
| `selfLink` | `string` | No | The canonical URL of this notification. |
| `topic` | `string` | No | The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/\{project-identifier}/topics/\{my-topic}' |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `custom_attributes` | `Record<string, string> \| null` | No | An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for this subscription notification. |
| `event_types` | `string[] \| null` | No | If present, only send notifications about listed event types. If empty, sent notifications for all event types. |
| `id` | `string \| null` | No | The ID of the notification. |
| `kind` | `string \| null` | No | The kind of item this is. For notifications, this is always storage#notification. |
| `object_name_prefix` | `string \| null` | No | If present, only apply this notification configuration to object names that begin with this prefix. |
| `payload_format` | `string \| null` | No | The desired content of the Payload. |
| `selfLink` | `string \| null` | No | The canonical URL of this notification. |
| `topic` | `string \| null` | No | The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/\{project-identifier}/topics/\{my-topic}' |

***

### notifications.list

`storage.notifications.list`

Retrieves a list of notification subscriptions for a given bucket

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.notifications.list({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a Google Cloud Storage bucket. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of notifications, this is always storage#notifications. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   custom_attributes?: Record<string, string> | null,
>   etag?: string | null,
>   event_types?: string[] | null,
>   id?: string | null,
>   kind?: string | null,
>   object_name_prefix?: string | null,
>   payload_format?: string | null,
>   selfLink?: string | null,
>   topic?: string | null
> }[] | null
> ```

***

### objectAccessControls.delete

`storage.objectAccessControls.delete`

Permanently deletes the ACL entry for the specified entity on the specified object

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.objectAccessControls.delete({ bucket: 'demo-bucket', entity: 'allUsers', object: 'reports/2026-12.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### objectAccessControls.get

`storage.objectAccessControls.get`

Returns the ACL entry for the specified entity on the specified object

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.objectAccessControls.get({ bucket: 'demo-bucket', entity: 'allUsers', object: 'reports/2026-12.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number \| null` | No | The content generation of the object, if applied to an object. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string \| null` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### objectAccessControls.insert

`storage.objectAccessControls.insert`

Creates a new ACL entry on the specified object

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objectAccessControls.insert({
	bucket: 'demo-bucket',
	object: 'reports/2026-12.csv',
	entity: 'user-ada@example.com',
	role: 'READER',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `body_bucket` | `string` | No | The name of the bucket. |
| `domain` | `string` | No | The domain associated with the entity, if any. |
| `email` | `string` | No | The email address associated with the entity, if any. |
| `entity` | `string` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string` | No | The ID for the entity, if any. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `body_generation` | `string \| number` | No | The content generation of the object, if applied to an object. |
| `id` | `string` | No | The ID of the access-control entry. |
| `kind` | `string` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `body_object` | `string` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object` | No | The project team associated with the entity, if any. |
| `role` | `string` | No | The access permission for the entity. |
| `selfLink` | `string` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string,
>   team?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number \| null` | No | The content generation of the object, if applied to an object. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string \| null` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### objectAccessControls.list

`storage.objectAccessControls.list`

Retrieves ACL entries on the specified object

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.objectAccessControls.list({ bucket: 'demo-bucket', object: 'reports/2026-12.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

***

### objectAccessControls.patch

`storage.objectAccessControls.patch`

Patches an ACL entry on the specified object

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objectAccessControls.patch({
	bucket: 'demo-bucket',
	entity: 'user-ada@example.com',
	object: 'reports/2026-12.csv',
	role: 'READER',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `body_bucket` | `string` | No | The name of the bucket. |
| `domain` | `string` | No | The domain associated with the entity, if any. |
| `email` | `string` | No | The email address associated with the entity, if any. |
| `body_entity` | `string` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string` | No | The ID for the entity, if any. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `body_generation` | `string \| number` | No | The content generation of the object, if applied to an object. |
| `id` | `string` | No | The ID of the access-control entry. |
| `kind` | `string` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `body_object` | `string` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object` | No | The project team associated with the entity, if any. |
| `role` | `string` | No | The access permission for the entity. |
| `selfLink` | `string` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string,
>   team?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number \| null` | No | The content generation of the object, if applied to an object. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string \| null` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### objectAccessControls.update

`storage.objectAccessControls.update`

Updates an ACL entry on the specified object

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objectAccessControls.update({
	bucket: 'demo-bucket',
	entity: 'user-ada@example.com',
	object: 'reports/2026-12.csv',
	role: 'READER',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `entity` | `string` | Yes | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `body_bucket` | `string` | No | The name of the bucket. |
| `domain` | `string` | No | The domain associated with the entity, if any. |
| `email` | `string` | No | The email address associated with the entity, if any. |
| `body_entity` | `string` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string` | No | The ID for the entity, if any. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `body_generation` | `string \| number` | No | The content generation of the object, if applied to an object. |
| `id` | `string` | No | The ID of the access-control entry. |
| `kind` | `string` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `body_object` | `string` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object` | No | The project team associated with the entity, if any. |
| `role` | `string` | No | The access permission for the entity. |
| `selfLink` | `string` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string,
>   team?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `domain` | `string \| null` | No | The domain associated with the entity, if any. |
| `email` | `string \| null` | No | The email address associated with the entity, if any. |
| `entity` | `string \| null` | No | The entity holding the permission, in one of the following forms: - user-userId - user-email - group-groupId - group-email - domain-domain - project-team-projectId - allUsers - allAuthenticatedUsers Examples: - The user [liz@example.com](mailto:liz@example.com) would be [user-liz@example.com](mailto:user-liz@example.com). - The group [example@googlegroups.com](mailto:example@googlegroups.com) would be [group-example@googlegroups.com](mailto:group-example@googlegroups.com). - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| `entityId` | `string \| null` | No | The ID for the entity, if any. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the access-control entry. |
| `generation` | `string \| number \| null` | No | The content generation of the object, if applied to an object. |
| `id` | `string \| null` | No | The ID of the access-control entry. |
| `kind` | `string \| null` | No | The kind of item this is. For object access control entries, this is always storage#objectAccessControl. |
| `object` | `string \| null` | No | The name of the object, if applied to an object. |
| `projectTeam` | `object \| null` | No | The project team associated with the entity, if any. |
| `role` | `string \| null` | No | The access permission for the entity. |
| `selfLink` | `string \| null` | No | The link to this access-control entry. |

> [accordion] projectTeam full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | null,
>   team?: string | null
> } | null
> ```

***

### objects.bulkRestore

`storage.objects.bulkRestore`

Initiates a long-running bulk restore operation on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.bulkRestore({
	bucket: 'demo-bucket',
	matchGlobs: ['reports/**'],
	softDeletedAfterTime: '2026-12-01T00:00:00Z',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `allowOverwrite` | `boolean` | No | If false (default), the restore will not overwrite live objects with the same name at the destination. This means some deleted objects may be skipped. If true, live objects will be overwritten resulting in a noncurrent object (if versioning is enabled). If versioning is not enabled, overwriting the object will result in a soft-deleted object. In either case, if a noncurrent object already exists with the same name, a live version can be written without issue. |
| `softDeletedAfterTime` | `string` | No | Restores only the objects that were soft-deleted after this time. |
| `softDeletedBeforeTime` | `string` | No | Restores only the objects that were soft-deleted before this time. |
| `matchGlobs` | `string[]` | No | Restores only the objects matching any of the specified glob(s). If this parameter is not specified, all objects will be restored within the specified time range. |
| `copySourceAcl` | `boolean` | No | If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false. |
| `createdAfterTime` | `string` | No | Restores only the objects that were created after this time. |
| `createdBeforeTime` | `string` | No | Restores only the objects that were created before this time. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### objects.compose

`storage.objects.compose`

Concatenates a list of existing objects into a new object in the same bucket

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.compose({
	destinationBucket: 'demo-archive',
	destinationObject: 'copies/report.csv',
	sourceObjects: [{ name: 'reports/part-1.csv' }, { name: 'reports/part-2.csv' }],
	destination: { contentType: 'text/csv' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `destinationBucket` | `string` | Yes | Name of the bucket containing the source objects. The destination object is stored in this bucket. |
| `destinationObject` | `string` | Yes | Name of the new object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `destinationPredefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to the destination object. |
| `dropContextGroups` | `string[]` | No | Specifies which object context groups to drop from the source object(s) during a compose operation. The accepted value is 'custom'. Destination contexts behave as follows: - When request body contexts are provided, they override all source contexts. - When no request body contexts are provided, source contexts are preserved unless 'dropContextGroups' contains 'custom', in which case all contexts are dropped. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `kmsKeyName` | `string` | No | Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms\_key\_name value, if any. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `destination` | `object` | No | An object. |
| `kind` | `string` | No | The kind of item this is. |
| `sourceObjects` | `object[]` | No | The list of source objects that will be concatenated into a single object. |
| `deleteSourceObjects` | `boolean` | No | If true, the source objects will be deleted. |

> [accordion] destination full type
>
> ```ts theme={null}
> {
>   acl?: {
>     bucket?: string,
>     domain?: string,
>     email?: string,
>     entity?: string,
>     entityId?: string,
>     etag?: string,
>     generation?: string | number,
>     id?: string,
>     kind?: string,
>     object?: string,
>     projectTeam?: {
>       projectNumber?: string,
>       team?: string
>     },
>     role?: string,
>     selfLink?: string
>   }[],
>   bucket?: string,
>   cacheControl?: string,
>   componentCount?: number,
>   contentDisposition?: string,
>   contentEncoding?: string,
>   contentLanguage?: string,
>   contentType?: string,
>   crc32c?: string,
>   customTime?: string,
>   customerEncryption?: {
>     encryptionAlgorithm?: string,
>     keySha256?: string
>   },
>   etag?: string,
>   eventBasedHold?: boolean,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   kmsKeyName?: string,
>   md5Hash?: string,
>   mediaLink?: string,
>   metadata?: Record<string, string | null> | null,
>   contexts?: {
>     custom?: Record<string, {
>       value?: string,
>       createTime?: string,
>       updateTime?: string,
>       extendedDataTypeUrl?: string
>     }>
>   },
>   restoreToken?: string,
>   metageneration?: string | number,
>   name?: string,
>   owner?: {
>     entity?: string,
>     entityId?: string
>   },
>   retentionExpirationTime?: string,
>   retention?: {
>     retainUntilTime?: string,
>     mode?: string
>   },
>   selfLink?: string,
>   size?: string | number,
>   storageClass?: string,
>   temporaryHold?: boolean,
>   timeCreated?: string,
>   timeDeleted?: string,
>   timeFinalized?: string,
>   softDeleteTime?: string,
>   hardDeleteTime?: string,
>   timeStorageClassUpdated?: string,
>   updated?: string,
>   zonalAvailabilityInfo?: {
>     availableZones?: string[]
>   }
> }
> ```

> [accordion] sourceObjects full type
>
> ```ts theme={null}
> {
>   generation?: string | number,
>   name?: string,
>   objectPreconditions?: {
>     ifGenerationMatch?: string | number
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.copy

`storage.objects.copy`

Copies a source object to a destination object. Optionally overrides metadata

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.copy({
	destinationBucket: 'demo-archive',
	destinationObject: 'copies/report.csv',
	sourceBucket: 'demo-bucket',
	sourceObject: 'reports/2026-12.csv',
	contentType: 'text/csv',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `destinationBucket` | `string` | Yes | Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `destinationKmsKeyName` | `string` | No | Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms\_key\_name value, if any. |
| `destinationObject` | `string` | Yes | Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. |
| `destinationPredefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to the destination object. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration does not match the given value. |
| `ifSourceGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation matches the given value. |
| `ifSourceGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation does not match the given value. |
| `ifSourceMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration matches the given value. |
| `ifSourceMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration does not match the given value. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. |
| `sourceBucket` | `string` | Yes | Name of the bucket in which to find the source object. |
| `sourceGeneration` | `string \| number` | No | If present, selects a specific revision of the source object (as opposed to the latest version, the default). |
| `sourceObject` | `string` | Yes | Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.delete

`storage.objects.delete`

Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.storage.objects.delete({ bucket: 'demo-bucket', object: 'reports/2026-12.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### objects.download

`storage.objects.download`

Download an object's bytes (returned as a file)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.download({ bucket: 'demo-bucket', object: 'reports/2026-12.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `softDeleted` | `boolean` | No | If true, only soft-deleted object versions will be listed. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `restoreToken` | `string` | No | Restore token used to differentiate soft-deleted objects with the same name and generation. Only applicable for hierarchical namespace buckets and if softDeleted is set to true. This parameter is optional, and is only required in the rare case when there are multiple soft-deleted objects with the same name and generation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### objects.get

`storage.objects.get`

Retrieves an object or its metadata

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.get({ bucket: 'demo-bucket', object: 'reports/2026-12.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `softDeleted` | `boolean` | No | If true, only soft-deleted object versions will be listed. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `restoreToken` | `string` | No | Restore token used to differentiate soft-deleted objects with the same name and generation. Only applicable for hierarchical namespace buckets and if softDeleted is set to true. This parameter is optional, and is only required in the rare case when there are multiple soft-deleted objects with the same name and generation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.getIamPolicy

`storage.objects.getIamPolicy`

Returns an IAM policy for the specified object

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.getIamPolicy({ bucket: 'demo-bucket', object: 'reports/2026-12.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### objects.insert

`storage.objects.insert`

Upload an object to a bucket: `file` with the bytes and `name`. Object fields sent next to `file` (contentType, metadata, cacheControl) go up with it in one multipart request; for an empty object pass `data:,` as `file`; change an existing object's metadata with storage.objects.patch

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.insert({
	bucket: 'demo-bucket',
	name: 'uploads/hello.txt',
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'hello.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. |
| `contentEncoding` | `string` | No | If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `kmsKeyName` | `string` | No | Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms\_key\_name value, if any. |
| `name` | `string` | No | Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `predefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to this object. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `body_bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `body_contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `body_kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `body_name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |
| `file` | `string \| object \| custom` | Yes | The bytes to upload (a URL, `{ base64 }` or a Blob). Body fields sent with it go up in the same multipart request. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[]
> }
> ```

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.list

`storage.objects.list`

Retrieves a list of objects matching the criteria (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.list({ bucket: 'demo-bucket', prefix: 'uploads/', maxResults: 50 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which to look for objects. |
| `delimiter` | `string` | No | Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted. |
| `endOffset` | `string` | No | Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive). |
| `includeTrailingDelimiter` | `boolean` | No | If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes. |
| `maxResults` | `number` | No | Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |
| `prefix` | `string` | No | Filter results to objects whose names begin with this prefix. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `startOffset` | `string` | No | Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `versions` | `boolean` | No | If true, lists all versions of an object as distinct results. The default is false. For more information, see [Object Versioning](https://cloud.google.com/storage/docs/object-versioning). |
| `matchGlob` | `string` | No | Filter results to objects and prefixes that match this glob pattern. |
| `filter` | `string` | No | Filter the returned objects. Currently only supported for the contexts field. If delimiter is set, the returned prefixes are exempt from this filter. |
| `softDeleted` | `boolean` | No | If true, only soft-deleted object versions will be listed. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `includeFoldersAsPrefixes` | `boolean` | No | Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of objects, this is always storage#objects. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
| `prefixes` | `string[] \| null` | No | The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   acl?: {
>     bucket?: string | null,
>     domain?: string | null,
>     email?: string | null,
>     entity?: string | null,
>     entityId?: string | null,
>     etag?: string | null,
>     generation?: string | number | null,
>     id?: string | null,
>     kind?: string | null,
>     object?: string | null,
>     projectTeam?: {
>       projectNumber?: string | null,
>       team?: string | null
>     } | null,
>     role?: string | null,
>     selfLink?: string | null
>   }[] | null,
>   bucket?: string | null,
>   cacheControl?: string | null,
>   componentCount?: number | null,
>   contentDisposition?: string | null,
>   contentEncoding?: string | null,
>   contentLanguage?: string | null,
>   contentType?: string | null,
>   crc32c?: string | null,
>   customTime?: string | null,
>   customerEncryption?: {
>     encryptionAlgorithm?: string | null,
>     keySha256?: string | null
>   } | null,
>   etag?: string | null,
>   eventBasedHold?: boolean | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   kmsKeyName?: string | null,
>   md5Hash?: string | null,
>   mediaLink?: string | null,
>   metadata?: Record<string, string | null> | null | null,
>   contexts?: {
>     custom?: Record<string, {
>       value?: string | null,
>       createTime?: string | null,
>       updateTime?: string | null,
>       extendedDataTypeUrl?: string | null
>     }> | null
>   } | null,
>   restoreToken?: string | null,
>   metageneration?: string | number | null,
>   name?: string | null,
>   owner?: {
>     entity?: string | null,
>     entityId?: string | null
>   } | null,
>   retentionExpirationTime?: string | null,
>   retention?: {
>     retainUntilTime?: string | null,
>     mode?: string | null
>   } | null,
>   selfLink?: string | null,
>   size?: string | number | null,
>   storageClass?: string | null,
>   temporaryHold?: boolean | null,
>   timeCreated?: string | null,
>   timeDeleted?: string | null,
>   timeFinalized?: string | null,
>   softDeleteTime?: string | null,
>   hardDeleteTime?: string | null,
>   timeStorageClassUpdated?: string | null,
>   updated?: string | null,
>   zonalAvailabilityInfo?: {
>     availableZones?: string[] | null
>   } | null
> }[] | null
> ```

***

### objects.move

`storage.objects.move`

Moves the source object to the destination object in the same bucket

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.move({ bucket: 'demo-bucket', sourceObject: 'reports/2026-12.csv', destinationObject: 'copies/report.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `sourceObject` | `string` | Yes | Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `destinationObject` | `string` | Yes | Name of the destination object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `ifSourceGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation matches the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifSourceGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation does not match the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifSourceMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration matches the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifSourceMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration does not match the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. `ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.`ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration matches the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration does not match the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.patch

`storage.objects.patch`

Patches an object's metadata

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.patch({
	bucket: 'demo-bucket',
	object: 'reports/2026-12.csv',
	cacheControl: 'no-store',
	metadata: { owner: 'ops' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `overrideUnlockedRetention` | `boolean` | No | Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `predefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to this object. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request, for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `body_bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `body_generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.restore

`storage.objects.restore`

Restores a soft-deleted object

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.restore({ bucket: 'demo-bucket', generation: '1733150000000000', object: 'reports/2026-12.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | Yes | Selects a specific revision of this object. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether none of the object's live generations match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's one live metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether none of the object's live metagenerations match the given value. |
| `copySourceAcl` | `boolean` | No | If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `restoreToken` | `string` | No | Restore token used to differentiate sof-deleted objects with the same name and generation. Only applicable for hierarchical namespace buckets. This parameter is optional, and is only required in the rare case when there are multiple soft-deleted objects with the same name and generation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.rewrite

`storage.objects.rewrite`

Rewrites a source object to a destination object. Optionally overrides metadata

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.rewrite({
	destinationBucket: 'demo-archive',
	destinationObject: 'copies/report.csv',
	sourceBucket: 'demo-bucket',
	sourceObject: 'reports/2026-12.csv',
	storageClass: 'NEARLINE',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `destinationBucket` | `string` | Yes | Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. |
| `destinationKmsKeyName` | `string` | No | Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms\_key\_name value, if any. |
| `destinationObject` | `string` | Yes | Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `destinationPredefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to the destination object. |
| `dropContextGroups` | `string[]` | No | Specifies which object context groups to drop from the source object during a copy operation. The accepted value is 'custom'. Destination contexts behave as follows: - When request body contexts are provided, they override all source contexts. - When no request body contexts are provided, source contexts are preserved unless 'dropContextGroups' contains 'custom', in which case all contexts are dropped. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration does not match the given value. |
| `ifSourceGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation matches the given value. |
| `ifSourceGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation does not match the given value. |
| `ifSourceMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration matches the given value. |
| `ifSourceMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration does not match the given value. |
| `maxBytesRewrittenPerCall` | `string \| number` | No | The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. |
| `rewriteToken` | `string` | No | Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request. |
| `sourceBucket` | `string` | Yes | Name of the bucket in which to find the source object. |
| `sourceGeneration` | `string \| number` | No | If present, selects a specific revision of the source object (as opposed to the latest version, the default). |
| `sourceObject` | `string` | Yes | Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response. |
| `kind` | `string \| null` | No | The kind of item this is. |
| `objectSize` | `string \| number \| null` | No | The total size of the object being copied in bytes. This property is always present in the response. |
| `resource` | `object \| null` | No | An object. |
| `rewriteToken` | `string \| null` | No | A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy. |
| `totalBytesRewritten` | `string \| number \| null` | No | The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response. |

> [accordion] resource full type
>
> ```ts theme={null}
> {
>   acl?: {
>     bucket?: string | null,
>     domain?: string | null,
>     email?: string | null,
>     entity?: string | null,
>     entityId?: string | null,
>     etag?: string | null,
>     generation?: string | number | null,
>     id?: string | null,
>     kind?: string | null,
>     object?: string | null,
>     projectTeam?: {
>       projectNumber?: string | null,
>       team?: string | null
>     } | null,
>     role?: string | null,
>     selfLink?: string | null
>   }[] | null,
>   bucket?: string | null,
>   cacheControl?: string | null,
>   componentCount?: number | null,
>   contentDisposition?: string | null,
>   contentEncoding?: string | null,
>   contentLanguage?: string | null,
>   contentType?: string | null,
>   crc32c?: string | null,
>   customTime?: string | null,
>   customerEncryption?: {
>     encryptionAlgorithm?: string | null,
>     keySha256?: string | null
>   } | null,
>   etag?: string | null,
>   eventBasedHold?: boolean | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   kmsKeyName?: string | null,
>   md5Hash?: string | null,
>   mediaLink?: string | null,
>   metadata?: Record<string, string | null> | null | null,
>   contexts?: {
>     custom?: Record<string, {
>       value?: string | null,
>       createTime?: string | null,
>       updateTime?: string | null,
>       extendedDataTypeUrl?: string | null
>     }> | null
>   } | null,
>   restoreToken?: string | null,
>   metageneration?: string | number | null,
>   name?: string | null,
>   owner?: {
>     entity?: string | null,
>     entityId?: string | null
>   } | null,
>   retentionExpirationTime?: string | null,
>   retention?: {
>     retainUntilTime?: string | null,
>     mode?: string | null
>   } | null,
>   selfLink?: string | null,
>   size?: string | number | null,
>   storageClass?: string | null,
>   temporaryHold?: boolean | null,
>   timeCreated?: string | null,
>   timeDeleted?: string | null,
>   timeFinalized?: string | null,
>   softDeleteTime?: string | null,
>   hardDeleteTime?: string | null,
>   timeStorageClassUpdated?: string | null,
>   updated?: string | null,
>   zonalAvailabilityInfo?: {
>     availableZones?: string[] | null
>   } | null
> } | null
> ```

***

### objects.setIamPolicy

`storage.objects.setIamPolicy`

Updates an IAM policy for the specified object

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.setIamPolicy({
	bucket: 'demo-bucket',
	object: 'reports/2026-12.csv',
	bindings: [{
		role: 'roles/storage.objectViewer',
		members: ['user:ada@example.com'],
	}],
	etag: 'BwYzQ1w2X3Y=',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `bindings` | `object[]` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string,
>     expression?: string,
>     location?: string,
>     title?: string
>   },
>   members?: string[],
>   role?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### objects.testIamPermissions

`storage.objects.testIamPermissions`

Tests a set of permissions on the given object to see which, if any, are held by the caller

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.testIamPermissions({
	bucket: 'demo-bucket',
	object: 'reports/2026-12.csv',
	permissions: ['storage.objects.get'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `permissions` | `string[]` | Yes | Permissions to test. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. |
| `permissions` | `string[] \| null` | No | The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: - storage.buckets.delete - Delete bucket. - storage.buckets.get - Read bucket metadata. - storage.buckets.getIamPolicy - Read bucket IAM policy. - storage.buckets.create - Create bucket. - storage.buckets.list - List buckets. - storage.buckets.setIamPolicy - Update bucket IAM policy. - storage.buckets.update - Update bucket metadata. - storage.objects.delete - Delete object. |

***

### objects.update

`storage.objects.update`

Updates an object's metadata

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.update({
	bucket: 'demo-bucket',
	object: 'reports/2026-12.csv',
	contentType: 'text/csv',
	metadata: { owner: 'ops' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `overrideUnlockedRetention` | `boolean` | No | Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `predefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to this object. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `body_bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `body_generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.viewFullContext

`storage.objects.viewFullContext`

Retrieves a specific object context with its extended data for a given object

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.objects.viewFullContext({ bucket: 'demo-bucket', object: 'reports/2026-12.csv', contextKey: 'review' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `contextKey` | `string` | Yes | Key identifying the object context to retrieve. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. For ObjectFullContext, this is always storage#objectFullContext. |
| `type` | `string \| null` | No | The type of the object context. |
| `key` | `string \| null` | No | The key of the object context. |
| `value` | `string \| null` | No | The value of the object context. |
| `createTime` | `string \| null` | No | The time at which the object context was created. This value is in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The time at which the object context was last updated. This value is in RFC 3339 format. |
| `extendedData` | `Record<string, any> \| null` | No | The extended data of the object context. |

***

### rapidCaches.disable

`storage.rapidCaches.disable`

Disables a Rapid Cache instance

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.storage.rapidCaches.disable({ bucket: 'demo-bucket', rapidCacheId: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `rapidCacheId` | `string` | Yes | The ID of the requested Rapid Cache instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### rapidCaches.get

`storage.rapidCaches.get`

Returns the metadata of a Rapid Cache instance

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.rapidCaches.get({ bucket: 'demo-bucket', rapidCacheId: 'us-central1-a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `rapidCacheId` | `string` | Yes | The ID of the requested Rapid Cache instance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. For Rapid Cache, this is always storage#rapidCache. |
| `id` | `string \| null` | No | The ID of the resource, including the project number, bucket name and rapid cache ID. |
| `selfLink` | `string \| null` | No | The link to this cache instance. |
| `bucket` | `string \| null` | No | The name of the bucket containing this cache instance. |
| `rapidCacheId` | `string \| null` | No | The ID of the Rapid cache instance. |
| `zone` | `string \| null` | No | The zone in which the cache instance is running. For example, us-central1-a. |
| `state` | `string \| null` | No | The current state of the cache instance. |
| `createTime` | `string \| null` | No | The creation time of the cache instance in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The modification time of the cache instance metadata in RFC 3339 format. |
| `ttl` | `string \| null` | No | The TTL of all cache entries in whole seconds. e.g., "7200s". |
| `admissionPolicy` | `string \| null` | No | The cache-level entry admission policy. |
| `pendingUpdate` | `boolean \| null` | No | True if the cache instance has an active Update long-running operation. |
| `ingestOnWrite` | `boolean \| null` | No | Specifies whether objects are ingested into the cache upon write. |
| `cacheType` | `string \| null` | No | The type of Rapid Cache this represents. Valid values include: "rapid-cache" and "rapid-cache-ultra". |

***

### rapidCaches.insert

`storage.rapidCaches.insert`

Creates a Rapid Cache instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.rapidCaches.insert({ bucket: 'demo-bucket', zone: 'us-central1-a', ttl: '86400s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `kind` | `string` | No | The kind of item this is. For Rapid Cache, this is always storage#rapidCache. |
| `id` | `string` | No | The ID of the resource, including the project number, bucket name and rapid cache ID. |
| `selfLink` | `string` | No | The link to this cache instance. |
| `body_bucket` | `string` | No | The name of the bucket containing this cache instance. |
| `rapidCacheId` | `string` | No | The ID of the Rapid cache instance. |
| `zone` | `string` | No | The zone in which the cache instance is running. For example, us-central1-a. |
| `state` | `string` | No | The current state of the cache instance. |
| `createTime` | `string` | No | The creation time of the cache instance in RFC 3339 format. |
| `updateTime` | `string` | No | The modification time of the cache instance metadata in RFC 3339 format. |
| `ttl` | `string` | No | The TTL of all cache entries in whole seconds. e.g., "7200s". |
| `admissionPolicy` | `string` | No | The cache-level entry admission policy. |
| `pendingUpdate` | `boolean` | No | True if the cache instance has an active Update long-running operation. |
| `ingestOnWrite` | `boolean` | No | Specifies whether objects are ingested into the cache upon write. |
| `cacheType` | `string` | No | The type of Rapid Cache this represents. Valid values include: "rapid-cache" and "rapid-cache-ultra". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### rapidCaches.list

`storage.rapidCaches.list`

Returns a list of Rapid Cache instances of the bucket (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.rapidCaches.list({ bucket: 'demo-bucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `pageSize` | `number` | No | Maximum number of items to return in a single page of responses. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. For lists of Rapid Caches, this is always storage#rapidCaches. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
| `items` | `object[] \| null` | No | The list of items. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   id?: string | null,
>   selfLink?: string | null,
>   bucket?: string | null,
>   rapidCacheId?: string | null,
>   zone?: string | null,
>   state?: string | null,
>   createTime?: string | null,
>   updateTime?: string | null,
>   ttl?: string | null,
>   admissionPolicy?: string | null,
>   pendingUpdate?: boolean | null,
>   ingestOnWrite?: boolean | null,
>   cacheType?: string | null
> }[] | null
> ```

***

### rapidCaches.update

`storage.rapidCaches.update`

Updates the configuration of a Rapid Cache instance

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.storage.rapidCaches.update({ bucket: 'demo-bucket', rapidCacheId: 'us-central1-a', ttl: '172800s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the parent bucket. |
| `rapidCacheId` | `string` | Yes | The ID of the requested Rapid Cache instance. |
| `kind` | `string` | No | The kind of item this is. For Rapid Cache, this is always storage#rapidCache. |
| `id` | `string` | No | The ID of the resource, including the project number, bucket name and rapid cache ID. |
| `selfLink` | `string` | No | The link to this cache instance. |
| `body_bucket` | `string` | No | The name of the bucket containing this cache instance. |
| `body_rapidCacheId` | `string` | No | The ID of the Rapid cache instance. |
| `zone` | `string` | No | The zone in which the cache instance is running. For example, us-central1-a. |
| `state` | `string` | No | The current state of the cache instance. |
| `createTime` | `string` | No | The creation time of the cache instance in RFC 3339 format. |
| `updateTime` | `string` | No | The modification time of the cache instance metadata in RFC 3339 format. |
| `ttl` | `string` | No | The TTL of all cache entries in whole seconds. e.g., "7200s". |
| `admissionPolicy` | `string` | No | The cache-level entry admission policy. |
| `pendingUpdate` | `boolean` | No | True if the cache instance has an active Update long-running operation. |
| `ingestOnWrite` | `boolean` | No | Specifies whether objects are ingested into the cache upon write. |
| `cacheType` | `string` | No | The type of Rapid Cache this represents. Valid values include: "rapid-cache" and "rapid-cache-ultra". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### serviceAccount.get

`storage.serviceAccount.get`

Get the email address of this project's Google Cloud Storage service account

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.storage.serviceAccount.get({ projectId: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | Yes | Project ID |
| `userProject` | `string` | No | The project to be billed for this request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_address` | `string \| null` | No | The ID of the notification. |
| `kind` | `string \| null` | No | The kind of item this is. For notifications, this is always storage#notification. |

***

## Tasks

### locations.get

`tasks.locations.get`

Gets information about a location

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.get({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Resource name for the location. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The friendly name for this location, typically a nearby city name. For example, "Tokyo". |
| `locationId` | `string \| null` | No | The canonical id for this location. For example: `"us-east1"`. |
| `labels` | `Record<string, string> \| null` | No | Cross-service attributes for the location. For example \{"cloud.googleapis.com/region": "us-east1"} |
| `name` | `string \| null` | No | Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata. For example the available capacity at the given location. |

***

### locations.getCmekConfig

`tasks.locations.getCmekConfig`

Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks location

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.getCmekConfig({ name: 'projects/demo-project/locations/us-central1/cmekConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The config. For example: `projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig` Format: `projects/<id>/locations/<id>/cmekConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The config resource name which includes the project and location and must end in 'cmekConfig', in the format `projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig` |
| `kmsKey` | `string \| null` | No | Resource name of the Cloud KMS key, of the form `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID`, that will be used to encrypt the Queues & Tasks in the region. Setting this as blank will turn off CMEK encryption. |

***

### locations.list

`tasks.locations.list`

Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: \* **Global locations**: If `name` is empty, the method lists the public locations available to all projects. \* **Project-specific locations**: If `name` follows the format `projects/{project}`, the method lists locations... (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource that owns the locations collection, if applicable. Format: `projects/<id>`. |
| `extraLocationTypes` | `string[]` | No | Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage. |
| `pageSize` | `number` | No | The maximum number of results to return. If not set, the service selects a default. |
| `pageToken` | `string` | No | A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. |
| `filter` | `string` | No | A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locations` | `object[] \| null` | No | A list of locations that matches the specified filter in the request. |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |

> [accordion] locations full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   locationId?: string | null,
>   labels?: Record<string, string> | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null
> }[] | null
> ```

***

### locations.operations.get

`tasks.locations.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.operations.get({ name: 'projects/demo-project/locations/us-central1/operations/operation-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/locations/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.queues.create

`tasks.locations.queues.create`

Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.create({
	parent: 'projects/demo-project/locations/us-central1',
	name: 'projects/demo-project/locations/us-central1/queues/emails',
	rateLimits: { maxDispatchesPerSecond: 5 },
	retryConfig: { maxAttempts: 3 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The location name in which the queue will be created. For example: `projects/PROJECT_ID/locations/LOCATION_ID` The list of allowed locations can be obtained by calling Cloud Tasks' implementation of ListLocations. Format: `projects/<id>/locations/<id>`. |
| `stackdriverLoggingConfig` | `object` | No | Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). |
| `rateLimits` | `object` | No | Rate limits. This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits. |
| `state` | `STATE_UNSPECIFIED \| RUNNING \| PAUSED \| DISABLED` | No | Output only. The state of the queue. `state` can only be changed by calling PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`. |
| `name` | `string` | No | Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. |
| `appEngineRoutingOverride` | `object` | No | App Engine Routing. Defines routing characteristics specific to App Engine - service, version, and instance. For more information about services, versions, and instances see [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and… |
| `httpTarget` | `object` | No | HTTP target. When specified at the Queue level, all tasks with HttpRequest are overridden according to the target. |
| `retryConfig` | `object` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `purgeTime` | `string` | No | Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. |

> [accordion] stackdriverLoggingConfig full type
>
> ```ts theme={null}
> {
>   samplingRatio?: number
> }
> ```

> [accordion] rateLimits full type
>
> ```ts theme={null}
> {
>   maxDispatchesPerSecond?: number,
>   maxBurstSize?: number,
>   maxConcurrentDispatches?: number
> }
> ```

> [accordion] appEngineRoutingOverride full type
>
> ```ts theme={null}
> {
>   instance?: string,
>   service?: string,
>   version?: string,
>   host?: string
> }
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   uriOverride?: {
>     host?: string,
>     pathOverride?: {
>       path?: string
>     },
>     uriOverrideEnforceMode?: URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED | IF_NOT_EXISTS | ALWAYS,
>     queryOverride?: {
>       queryParams?: string
>     },
>     scheme?: SCHEME_UNSPECIFIED | HTTP | HTTPS,
>     port?: string | number
>   },
>   oauthToken?: {
>     serviceAccountEmail?: string,
>     scope?: string
>   },
>   headerOverrides?: {
>     header?: {
>       key?: string,
>       value?: string
>     }
>   }[],
>   httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>   oidcToken?: {
>     serviceAccountEmail?: string,
>     audience?: string
>   }
> }
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string,
>   maxAttempts?: number,
>   maxDoublings?: number,
>   minBackoff?: string,
>   maxBackoff?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `stackdriverLoggingConfig` | `object \| null` | No | Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). |
| `rateLimits` | `object \| null` | No | Rate limits. This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits. |
| `state` | `string \| null` | No | Output only. The state of the queue. `state` can only be changed by calling PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`. |
| `name` | `string \| null` | No | Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. |
| `appEngineRoutingOverride` | `object \| null` | No | App Engine Routing. Defines routing characteristics specific to App Engine - service, version, and instance. For more information about services, versions, and instances see [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and… |
| `httpTarget` | `object \| null` | No | HTTP target. When specified at the Queue level, all tasks with HttpRequest are overridden according to the target. |
| `retryConfig` | `object \| null` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `purgeTime` | `string \| null` | No | Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. |

> [accordion] stackdriverLoggingConfig full type
>
> ```ts theme={null}
> {
>   samplingRatio?: number | null
> } | null
> ```

> [accordion] rateLimits full type
>
> ```ts theme={null}
> {
>   maxDispatchesPerSecond?: number | null,
>   maxBurstSize?: number | null,
>   maxConcurrentDispatches?: number | null
> } | null
> ```

> [accordion] appEngineRoutingOverride full type
>
> ```ts theme={null}
> {
>   instance?: string | null,
>   service?: string | null,
>   version?: string | null,
>   host?: string | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   uriOverride?: {
>     host?: string | null,
>     pathOverride?: {
>       path?: string | null
>     } | null,
>     uriOverrideEnforceMode?: string | null,
>     queryOverride?: {
>       queryParams?: string | null
>     } | null,
>     scheme?: string | null,
>     port?: string | number | null
>   } | null,
>   oauthToken?: {
>     serviceAccountEmail?: string | null,
>     scope?: string | null
>   } | null,
>   headerOverrides?: {
>     header?: {
>       key?: string | null,
>       value?: string | null
>     } | null
>   }[] | null,
>   httpMethod?: string | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string | null,
>   maxAttempts?: number | null,
>   maxDoublings?: number | null,
>   minBackoff?: string | null,
>   maxBackoff?: string | null
> } | null
> ```

***

### locations.queues.delete

`tasks.locations.queues.delete`

Deletes a queue. This command will delete the queue even if it has tasks in it

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.delete({ name: 'projects/demo-project/locations/us-central1/queues/emails' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` Format: `projects/<id>/locations/<id>/queues/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.queues.get

`tasks.locations.queues.get`

Gets a queue

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.get({ name: 'projects/demo-project/locations/us-central1/queues/emails' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the queue. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` Format: `projects/<id>/locations/<id>/queues/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `stackdriverLoggingConfig` | `object \| null` | No | Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). |
| `rateLimits` | `object \| null` | No | Rate limits. This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits. |
| `state` | `string \| null` | No | Output only. The state of the queue. `state` can only be changed by calling PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`. |
| `name` | `string \| null` | No | Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. |
| `appEngineRoutingOverride` | `object \| null` | No | App Engine Routing. Defines routing characteristics specific to App Engine - service, version, and instance. For more information about services, versions, and instances see [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and… |
| `httpTarget` | `object \| null` | No | HTTP target. When specified at the Queue level, all tasks with HttpRequest are overridden according to the target. |
| `retryConfig` | `object \| null` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `purgeTime` | `string \| null` | No | Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. |

> [accordion] stackdriverLoggingConfig full type
>
> ```ts theme={null}
> {
>   samplingRatio?: number | null
> } | null
> ```

> [accordion] rateLimits full type
>
> ```ts theme={null}
> {
>   maxDispatchesPerSecond?: number | null,
>   maxBurstSize?: number | null,
>   maxConcurrentDispatches?: number | null
> } | null
> ```

> [accordion] appEngineRoutingOverride full type
>
> ```ts theme={null}
> {
>   instance?: string | null,
>   service?: string | null,
>   version?: string | null,
>   host?: string | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   uriOverride?: {
>     host?: string | null,
>     pathOverride?: {
>       path?: string | null
>     } | null,
>     uriOverrideEnforceMode?: string | null,
>     queryOverride?: {
>       queryParams?: string | null
>     } | null,
>     scheme?: string | null,
>     port?: string | number | null
>   } | null,
>   oauthToken?: {
>     serviceAccountEmail?: string | null,
>     scope?: string | null
>   } | null,
>   headerOverrides?: {
>     header?: {
>       key?: string | null,
>       value?: string | null
>     } | null
>   }[] | null,
>   httpMethod?: string | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string | null,
>   maxAttempts?: number | null,
>   maxDoublings?: number | null,
>   minBackoff?: string | null,
>   maxBackoff?: string | null
> } | null
> ```

***

### locations.queues.getIamPolicy

`tasks.locations.queues.getIamPolicy`

Gets the access control policy for a Queue. Returns an empty policy if the resource exists and does not have a policy set

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.getIamPolicy({ resource: 'projects/demo-project/locations/us-central1/queues/emails' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `options` | `object` | No | Encapsulates settings provided to GetIamPolicy. |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   requestedPolicyVersion?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     expression?: string | null,
>     title?: string | null,
>     location?: string | null,
>     description?: string | null
>   } | null
> }[] | null
> ```

***

### locations.queues.list

`tasks.locations.queues.list`

Lists queues. Queues are returned in lexicographical order (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID` Format: `projects/<id>/locations/<id>`. |
| `pageSize` | `number` | No | Requested page size. The maximum page size is 9800. If unspecified, the page size will be the maximum. Fewer queues than requested might be returned, even if more queues exist; use the next\_page\_token in the response to determine if more queues exist. |
| `filter` | `string` | No | `filter` can be used to specify a subset of queues. Any Queue field can be used as a filter and several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as described in [Stackdriver's Advanced Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Sample filter "state: PAUSED". Note that using filters might cause fewer queues than the requested page\_size to be returned. |
| `pageToken` | `string` | No | A token identifying the page of results to return. To request the first page results, page\_token must be empty. To request the next page of results, page\_token must be the value of next\_page\_token returned from the previous call to ListQueues method. It is an error to switch the value of the filter while iterating through pages. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `queues` | `object[] \| null` | No | The list of queues. |
| `nextPageToken` | `string \| null` | No | A token to retrieve next page of results. To return the next page of results, call ListQueues with this value as the page\_token. If the next\_page\_token is empty, there are no more results. The page token is valid for only 2 hours. |

> [accordion] queues full type
>
> ```ts theme={null}
> {
>   stackdriverLoggingConfig?: {
>     samplingRatio?: number | null
>   } | null,
>   rateLimits?: {
>     maxDispatchesPerSecond?: number | null,
>     maxBurstSize?: number | null,
>     maxConcurrentDispatches?: number | null
>   } | null,
>   state?: string | null,
>   name?: string | null,
>   appEngineRoutingOverride?: {
>     instance?: string | null,
>     service?: string | null,
>     version?: string | null,
>     host?: string | null
>   } | null,
>   httpTarget?: {
>     uriOverride?: {
>       host?: string | null,
>       pathOverride?: {
>         path?: string | null
>       } | null,
>       uriOverrideEnforceMode?: string | null,
>       queryOverride?: {
>         queryParams?: string | null
>       } | null,
>       scheme?: string | null,
>       port?: string | number | null
>     } | null,
>     oauthToken?: {
>       serviceAccountEmail?: string | null,
>       scope?: string | null
>     } | null,
>     headerOverrides?: {
>       header?: {
>         key?: string | null,
>         value?: string | null
>       } | null
>     }[] | null,
>     httpMethod?: string | null,
>     oidcToken?: {
>       serviceAccountEmail?: string | null,
>       audience?: string | null
>     } | null
>   } | null,
>   retryConfig?: {
>     maxRetryDuration?: string | null,
>     maxAttempts?: number | null,
>     maxDoublings?: number | null,
>     minBackoff?: string | null,
>     maxBackoff?: string | null
>   } | null,
>   purgeTime?: string | null
> }[] | null
> ```

***

### locations.queues.patch

`tasks.locations.queues.patch`

Updates a queue. This method creates the queue if it does not exist and updates the queue if it does exist

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.patch({
	name: 'projects/demo-project/locations/us-central1/queues/emails',
	updateMask: 'rateLimits',
	rateLimits: { maxDispatchesPerSecond: 10 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | A mask used to specify which fields of the queue are being updated. If empty, then all fields will be updated. |
| `name` | `string` | Yes | Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `stackdriverLoggingConfig` | `object` | No | Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). |
| `rateLimits` | `object` | No | Rate limits. This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits. |
| `state` | `STATE_UNSPECIFIED \| RUNNING \| PAUSED \| DISABLED` | No | Output only. The state of the queue. `state` can only be changed by calling PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`. |
| `body_name` | `string` | No | Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. |
| `appEngineRoutingOverride` | `object` | No | App Engine Routing. Defines routing characteristics specific to App Engine - service, version, and instance. For more information about services, versions, and instances see [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and… |
| `httpTarget` | `object` | No | HTTP target. When specified at the Queue level, all tasks with HttpRequest are overridden according to the target. |
| `retryConfig` | `object` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `purgeTime` | `string` | No | Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. |

> [accordion] stackdriverLoggingConfig full type
>
> ```ts theme={null}
> {
>   samplingRatio?: number
> }
> ```

> [accordion] rateLimits full type
>
> ```ts theme={null}
> {
>   maxDispatchesPerSecond?: number,
>   maxBurstSize?: number,
>   maxConcurrentDispatches?: number
> }
> ```

> [accordion] appEngineRoutingOverride full type
>
> ```ts theme={null}
> {
>   instance?: string,
>   service?: string,
>   version?: string,
>   host?: string
> }
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   uriOverride?: {
>     host?: string,
>     pathOverride?: {
>       path?: string
>     },
>     uriOverrideEnforceMode?: URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED | IF_NOT_EXISTS | ALWAYS,
>     queryOverride?: {
>       queryParams?: string
>     },
>     scheme?: SCHEME_UNSPECIFIED | HTTP | HTTPS,
>     port?: string | number
>   },
>   oauthToken?: {
>     serviceAccountEmail?: string,
>     scope?: string
>   },
>   headerOverrides?: {
>     header?: {
>       key?: string,
>       value?: string
>     }
>   }[],
>   httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>   oidcToken?: {
>     serviceAccountEmail?: string,
>     audience?: string
>   }
> }
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string,
>   maxAttempts?: number,
>   maxDoublings?: number,
>   minBackoff?: string,
>   maxBackoff?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `stackdriverLoggingConfig` | `object \| null` | No | Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). |
| `rateLimits` | `object \| null` | No | Rate limits. This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits. |
| `state` | `string \| null` | No | Output only. The state of the queue. `state` can only be changed by calling PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`. |
| `name` | `string \| null` | No | Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. |
| `appEngineRoutingOverride` | `object \| null` | No | App Engine Routing. Defines routing characteristics specific to App Engine - service, version, and instance. For more information about services, versions, and instances see [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and… |
| `httpTarget` | `object \| null` | No | HTTP target. When specified at the Queue level, all tasks with HttpRequest are overridden according to the target. |
| `retryConfig` | `object \| null` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `purgeTime` | `string \| null` | No | Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. |

> [accordion] stackdriverLoggingConfig full type
>
> ```ts theme={null}
> {
>   samplingRatio?: number | null
> } | null
> ```

> [accordion] rateLimits full type
>
> ```ts theme={null}
> {
>   maxDispatchesPerSecond?: number | null,
>   maxBurstSize?: number | null,
>   maxConcurrentDispatches?: number | null
> } | null
> ```

> [accordion] appEngineRoutingOverride full type
>
> ```ts theme={null}
> {
>   instance?: string | null,
>   service?: string | null,
>   version?: string | null,
>   host?: string | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   uriOverride?: {
>     host?: string | null,
>     pathOverride?: {
>       path?: string | null
>     } | null,
>     uriOverrideEnforceMode?: string | null,
>     queryOverride?: {
>       queryParams?: string | null
>     } | null,
>     scheme?: string | null,
>     port?: string | number | null
>   } | null,
>   oauthToken?: {
>     serviceAccountEmail?: string | null,
>     scope?: string | null
>   } | null,
>   headerOverrides?: {
>     header?: {
>       key?: string | null,
>       value?: string | null
>     } | null
>   }[] | null,
>   httpMethod?: string | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string | null,
>   maxAttempts?: number | null,
>   maxDoublings?: number | null,
>   minBackoff?: string | null,
>   maxBackoff?: string | null
> } | null
> ```

***

### locations.queues.pause

`tasks.locations.queues.pause`

Pauses the queue. If a queue is paused then the system will stop dispatching tasks until the queue is resumed via ResumeQueue

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.pause({ name: 'projects/demo-project/locations/us-central1/queues/emails' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `body` | `object` | No | Request message for PauseQueue. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `stackdriverLoggingConfig` | `object \| null` | No | Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). |
| `rateLimits` | `object \| null` | No | Rate limits. This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits. |
| `state` | `string \| null` | No | Output only. The state of the queue. `state` can only be changed by calling PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`. |
| `name` | `string \| null` | No | Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. |
| `appEngineRoutingOverride` | `object \| null` | No | App Engine Routing. Defines routing characteristics specific to App Engine - service, version, and instance. For more information about services, versions, and instances see [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and… |
| `httpTarget` | `object \| null` | No | HTTP target. When specified at the Queue level, all tasks with HttpRequest are overridden according to the target. |
| `retryConfig` | `object \| null` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `purgeTime` | `string \| null` | No | Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. |

> [accordion] stackdriverLoggingConfig full type
>
> ```ts theme={null}
> {
>   samplingRatio?: number | null
> } | null
> ```

> [accordion] rateLimits full type
>
> ```ts theme={null}
> {
>   maxDispatchesPerSecond?: number | null,
>   maxBurstSize?: number | null,
>   maxConcurrentDispatches?: number | null
> } | null
> ```

> [accordion] appEngineRoutingOverride full type
>
> ```ts theme={null}
> {
>   instance?: string | null,
>   service?: string | null,
>   version?: string | null,
>   host?: string | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   uriOverride?: {
>     host?: string | null,
>     pathOverride?: {
>       path?: string | null
>     } | null,
>     uriOverrideEnforceMode?: string | null,
>     queryOverride?: {
>       queryParams?: string | null
>     } | null,
>     scheme?: string | null,
>     port?: string | number | null
>   } | null,
>   oauthToken?: {
>     serviceAccountEmail?: string | null,
>     scope?: string | null
>   } | null,
>   headerOverrides?: {
>     header?: {
>       key?: string | null,
>       value?: string | null
>     } | null
>   }[] | null,
>   httpMethod?: string | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string | null,
>   maxAttempts?: number | null,
>   maxDoublings?: number | null,
>   minBackoff?: string | null,
>   maxBackoff?: string | null
> } | null
> ```

***

### locations.queues.purge

`tasks.locations.queues.purge`

Purges a queue by deleting all of its tasks. All tasks created before this method is called are permanently deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.purge({ name: 'projects/demo-project/locations/us-central1/queues/emails' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `body` | `object` | No | Request message for PurgeQueue. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `stackdriverLoggingConfig` | `object \| null` | No | Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). |
| `rateLimits` | `object \| null` | No | Rate limits. This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits. |
| `state` | `string \| null` | No | Output only. The state of the queue. `state` can only be changed by calling PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`. |
| `name` | `string \| null` | No | Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. |
| `appEngineRoutingOverride` | `object \| null` | No | App Engine Routing. Defines routing characteristics specific to App Engine - service, version, and instance. For more information about services, versions, and instances see [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and… |
| `httpTarget` | `object \| null` | No | HTTP target. When specified at the Queue level, all tasks with HttpRequest are overridden according to the target. |
| `retryConfig` | `object \| null` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `purgeTime` | `string \| null` | No | Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. |

> [accordion] stackdriverLoggingConfig full type
>
> ```ts theme={null}
> {
>   samplingRatio?: number | null
> } | null
> ```

> [accordion] rateLimits full type
>
> ```ts theme={null}
> {
>   maxDispatchesPerSecond?: number | null,
>   maxBurstSize?: number | null,
>   maxConcurrentDispatches?: number | null
> } | null
> ```

> [accordion] appEngineRoutingOverride full type
>
> ```ts theme={null}
> {
>   instance?: string | null,
>   service?: string | null,
>   version?: string | null,
>   host?: string | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   uriOverride?: {
>     host?: string | null,
>     pathOverride?: {
>       path?: string | null
>     } | null,
>     uriOverrideEnforceMode?: string | null,
>     queryOverride?: {
>       queryParams?: string | null
>     } | null,
>     scheme?: string | null,
>     port?: string | number | null
>   } | null,
>   oauthToken?: {
>     serviceAccountEmail?: string | null,
>     scope?: string | null
>   } | null,
>   headerOverrides?: {
>     header?: {
>       key?: string | null,
>       value?: string | null
>     } | null
>   }[] | null,
>   httpMethod?: string | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string | null,
>   maxAttempts?: number | null,
>   maxDoublings?: number | null,
>   minBackoff?: string | null,
>   maxBackoff?: string | null
> } | null
> ```

***

### locations.queues.resume

`tasks.locations.queues.resume`

Resume a queue. This method resumes a queue after it has been PAUSED or DISABLED

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.resume({ name: 'projects/demo-project/locations/us-central1/queues/emails' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `body` | `object` | No | Request message for ResumeQueue. |

> [accordion] body full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `stackdriverLoggingConfig` | `object \| null` | No | Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). |
| `rateLimits` | `object \| null` | No | Rate limits. This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits. |
| `state` | `string \| null` | No | Output only. The state of the queue. `state` can only be changed by calling PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`. |
| `name` | `string \| null` | No | Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. |
| `appEngineRoutingOverride` | `object \| null` | No | App Engine Routing. Defines routing characteristics specific to App Engine - service, version, and instance. For more information about services, versions, and instances see [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and… |
| `httpTarget` | `object \| null` | No | HTTP target. When specified at the Queue level, all tasks with HttpRequest are overridden according to the target. |
| `retryConfig` | `object \| null` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `purgeTime` | `string \| null` | No | Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. |

> [accordion] stackdriverLoggingConfig full type
>
> ```ts theme={null}
> {
>   samplingRatio?: number | null
> } | null
> ```

> [accordion] rateLimits full type
>
> ```ts theme={null}
> {
>   maxDispatchesPerSecond?: number | null,
>   maxBurstSize?: number | null,
>   maxConcurrentDispatches?: number | null
> } | null
> ```

> [accordion] appEngineRoutingOverride full type
>
> ```ts theme={null}
> {
>   instance?: string | null,
>   service?: string | null,
>   version?: string | null,
>   host?: string | null
> } | null
> ```

> [accordion] httpTarget full type
>
> ```ts theme={null}
> {
>   uriOverride?: {
>     host?: string | null,
>     pathOverride?: {
>       path?: string | null
>     } | null,
>     uriOverrideEnforceMode?: string | null,
>     queryOverride?: {
>       queryParams?: string | null
>     } | null,
>     scheme?: string | null,
>     port?: string | number | null
>   } | null,
>   oauthToken?: {
>     serviceAccountEmail?: string | null,
>     scope?: string | null
>   } | null,
>   headerOverrides?: {
>     header?: {
>       key?: string | null,
>       value?: string | null
>     } | null
>   }[] | null,
>   httpMethod?: string | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string | null,
>   maxAttempts?: number | null,
>   maxDoublings?: number | null,
>   minBackoff?: string | null,
>   maxBackoff?: string | null
> } | null
> ```

***

### locations.queues.setIamPolicy

`tasks.locations.queues.setIamPolicy`

Sets the access control policy for a Queue. Replaces any existing policy

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.setIamPolicy({
	resource: 'projects/demo-project/locations/us-central1/queues/emails',
	policy: {
		bindings: [{
			role: 'roles/cloudtasks.enqueuer',
			members: ['user:ada@example.com'],
		}],
		etag: 'BwYzQ1w2X3Y=',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   version?: number,
>   etag?: string,
>   bindings?: {
>     role?: string,
>     members?: string[],
>     condition?: {
>       expression?: string,
>       title?: string,
>       location?: string,
>       description?: string
>     }
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   role?: string | null,
>   members?: string[] | null,
>   condition?: {
>     expression?: string | null,
>     title?: string | null,
>     location?: string | null,
>     description?: string | null
>   } | null
> }[] | null
> ```

***

### locations.queues.tasks.batchCreate

`tasks.locations.queues.tasks.batchCreate`

Creates a batch of tasks and adds them to a queue. All tasks must be for the same queue

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.tasks.batchCreate({
	parent: 'projects/demo-project/locations/us-central1/queues/emails',
	requests: [{
		parent: 'projects/demo-project/locations/us-central1/queues/emails',
		task: {
			httpRequest: { url: 'https://example.com/send', httpMethod: 'POST' },
		},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `requestId` | `string` | No | Optional. This field will be used to identify the long running operation, avoiding duplication when user retries. If not provided, then a UUID will be generated at server side. |
| `requests` | `object[]` | No | Required. The list of requests to create tasks. The queue specified in parent field of each CreateTaskRequest will be the same. This validation happens on the client side as well as in the handler. BatchCreateTasksRequest.parent will also be the same value as the individual `CreateTaskRequest.parent`. The maximum number of requests is 100. |

> [accordion] requests full type
>
> ```ts theme={null}
> {
>   task?: {
>     dispatchCount?: number,
>     httpRequest?: {
>       httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>       body?: string,
>       url?: string,
>       headers?: Record<string, string>,
>       oauthToken?: {
>         serviceAccountEmail?: string,
>         scope?: string
>       },
>       oidcToken?: {
>         serviceAccountEmail?: string,
>         audience?: string
>       }
>     },
>     appEngineHttpRequest?: {
>       headers?: Record<string, string>,
>       relativeUri?: string,
>       body?: string,
>       httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>       appEngineRouting?: {
>         instance?: string,
>         service?: string,
>         version?: string,
>         host?: string
>       }
>     },
>     responseCount?: number,
>     name?: string,
>     view?: VIEW_UNSPECIFIED | BASIC | FULL,
>     lastAttempt?: {
>       dispatchTime?: string,
>       responseTime?: string,
>       scheduleTime?: string,
>       responseStatus?: {
>         code?: number,
>         message?: string,
>         details?: Record<string, any>[]
>       }
>     },
>     scheduleTime?: string,
>     dispatchDeadline?: string,
>     retryConfig?: {
>       maxRetryDuration?: string,
>       maxAttempts?: number,
>       maxDoublings?: number,
>       minBackoff?: string,
>       maxBackoff?: string
>     },
>     createTime?: string,
>     firstAttempt?: {
>       dispatchTime?: string,
>       responseTime?: string,
>       scheduleTime?: string,
>       responseStatus?: {
>         code?: number,
>         message?: string,
>         details?: Record<string, any>[]
>       }
>     }
>   },
>   responseView?: VIEW_UNSPECIFIED | BASIC | FULL,
>   parent?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.queues.tasks.batchDelete

`tasks.locations.queues.tasks.batchDelete`

Deletes a batch of tasks. This is a non-atomic operation: if deletion fails for some tasks, it can still succeed for others

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.tasks.batchDelete({
	parent: 'projects/demo-project/locations/us-central1/queues/emails',
	names: ['projects/demo-project/locations/us-central1/queues/emails/tasks/task-1'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The queue name. For example: Format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `requestId` | `string` | No | Optional. This field will be used to identify the long running operation, avoiding duplication when user retries. If not provided, then a UUID will be generated at server side. |
| `names` | `string[]` | No | Required. The names of the tasks to delete. A maximum of 1000 tasks can be deleted in a batch. For example: Format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   message?: string | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### locations.queues.tasks.buffer

`tasks.locations.queues.tasks.buffer`

Creates and buffers a new task without the need to explicitly define a Task message. The queue must have HTTP target

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.tasks.buffer({
	taskId: 'task-1',
	queue: 'projects/demo-project/locations/us-central1/queues/emails',
	body: { contentType: 'application/json', data: 'eyJ0byI6NDJ9' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | Yes | Optional. Task ID for the task being created. If not provided, Cloud Tasks generates an ID for the task. |
| `queue` | `string` | Yes | Required. The parent queue name. For example: projects/PROJECT\_ID/locations/LOCATION\_ID/queues/QUEUE\_ID`The queue must already exist. Format:`projects/\<id>/locations/\<id>/queues/\<id>\`. |
| `body` | `object` | No | Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest \{ // A unique request id. |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   extensions?: Record<string, any>[],
>   data?: string,
>   contentType?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | A unit of scheduled work. |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   dispatchCount?: number | null,
>   httpRequest?: {
>     httpMethod?: string | null,
>     body?: string | null,
>     url?: string | null,
>     headers?: Record<string, string> | null,
>     oauthToken?: {
>       serviceAccountEmail?: string | null,
>       scope?: string | null
>     } | null,
>     oidcToken?: {
>       serviceAccountEmail?: string | null,
>       audience?: string | null
>     } | null
>   } | null,
>   appEngineHttpRequest?: {
>     headers?: Record<string, string> | null,
>     relativeUri?: string | null,
>     body?: string | null,
>     httpMethod?: string | null,
>     appEngineRouting?: {
>       instance?: string | null,
>       service?: string | null,
>       version?: string | null,
>       host?: string | null
>     } | null
>   } | null,
>   responseCount?: number | null,
>   name?: string | null,
>   view?: string | null,
>   lastAttempt?: {
>     dispatchTime?: string | null,
>     responseTime?: string | null,
>     scheduleTime?: string | null,
>     responseStatus?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null,
>   scheduleTime?: string | null,
>   dispatchDeadline?: string | null,
>   retryConfig?: {
>     maxRetryDuration?: string | null,
>     maxAttempts?: number | null,
>     maxDoublings?: number | null,
>     minBackoff?: string | null,
>     maxBackoff?: string | null
>   } | null,
>   createTime?: string | null,
>   firstAttempt?: {
>     dispatchTime?: string | null,
>     responseTime?: string | null,
>     scheduleTime?: string | null,
>     responseStatus?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null
> } | null
> ```

***

### locations.queues.tasks.create

`tasks.locations.queues.tasks.create`

Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. \* The maximum task size is 100KB

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.tasks.create({
	parent: 'projects/demo-project/locations/us-central1/queues/emails',
	task: {
		httpRequest: { url: 'https://example.com/send', httpMethod: 'POST', body: 'eyJ0byI6NDJ9' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `task` | `object` | No | A unit of scheduled work. |
| `responseView` | `VIEW_UNSPECIFIED \| BASIC \| FULL` | No | The response\_view specifies which subset of the Task will be returned. By default response\_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource. |
| `body_parent` | `string` | No | Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   dispatchCount?: number,
>   httpRequest?: {
>     httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>     body?: string,
>     url?: string,
>     headers?: Record<string, string>,
>     oauthToken?: {
>       serviceAccountEmail?: string,
>       scope?: string
>     },
>     oidcToken?: {
>       serviceAccountEmail?: string,
>       audience?: string
>     }
>   },
>   appEngineHttpRequest?: {
>     headers?: Record<string, string>,
>     relativeUri?: string,
>     body?: string,
>     httpMethod?: HTTP_METHOD_UNSPECIFIED | POST | GET | HEAD | PUT | DELETE | PATCH | OPTIONS,
>     appEngineRouting?: {
>       instance?: string,
>       service?: string,
>       version?: string,
>       host?: string
>     }
>   },
>   responseCount?: number,
>   name?: string,
>   view?: VIEW_UNSPECIFIED | BASIC | FULL,
>   lastAttempt?: {
>     dispatchTime?: string,
>     responseTime?: string,
>     scheduleTime?: string,
>     responseStatus?: {
>       code?: number,
>       message?: string,
>       details?: Record<string, any>[]
>     }
>   },
>   scheduleTime?: string,
>   dispatchDeadline?: string,
>   retryConfig?: {
>     maxRetryDuration?: string,
>     maxAttempts?: number,
>     maxDoublings?: number,
>     minBackoff?: string,
>     maxBackoff?: string
>   },
>   createTime?: string,
>   firstAttempt?: {
>     dispatchTime?: string,
>     responseTime?: string,
>     scheduleTime?: string,
>     responseStatus?: {
>       code?: number,
>       message?: string,
>       details?: Record<string, any>[]
>     }
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dispatchCount` | `number \| null` | No | Output only. The number of attempts dispatched. This count includes attempts which have been dispatched but haven't received a response. |
| `httpRequest` | `object \| null` | No | HTTP request. The task will be pushed to the worker as an HTTP request. If the worker or the redirected worker acknowledges the task by returning a successful HTTP response code (\[`200` - `299`]), the task will be removed from the queue. If any other HTTP response code is returned or no response is received, the task will be retried according to the following: \* User-specified throttling: retry configuration, rate limits, and the queue's state. \* System throttling: To prevent the worker from overloading, Cloud Tasks may temporarily reduce the queue's effective rate. |
| `appEngineHttpRequest` | `object \| null` | No | App Engine HTTP request. The message defines the HTTP request that is sent to an App Engine app when the task is dispatched. Using AppEngineHttpRequest requires [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) Google IAM permission for the project and the following scope: `https://www.googleapis.com/auth/cloud-platform` The task will be delivered to the App Engine app which belongs to the same project as the queue. |
| `responseCount` | `number \| null` | No | Output only. The number of attempts which have received a response. |
| `name` | `string \| null` | No | Optionally caller-specified in CreateTask. The task name. The task name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the task's location. The list of available locations can be obtained by calling ListLocations. |
| `view` | `string \| null` | No | Output only. The view specifies which subset of the Task has been returned. |
| `lastAttempt` | `object \| null` | No | The status of a task attempt. |
| `scheduleTime` | `string \| null` | No | The time when the task is scheduled to be attempted or retried. `schedule_time` will be truncated to the nearest microsecond. |
| `dispatchDeadline` | `string \| null` | No | The deadline for requests sent to the worker. If the worker does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the task according to the RetryConfig. Note that when the request is cancelled, Cloud Tasks will stop listening for the response, but whether the worker stops processing depends on the worker. For example, if the worker is stuck, it may not react to cancelled requests. The default and maximum values depend on the type of request: \* For HTTP tasks, the default is 10 minutes. |
| `retryConfig` | `object \| null` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `createTime` | `string \| null` | No | Output only. The time that the task was created. `create_time` will be truncated to the nearest second. |
| `firstAttempt` | `object \| null` | No | The status of a task attempt. |

> [accordion] httpRequest full type
>
> ```ts theme={null}
> {
>   httpMethod?: string | null,
>   body?: string | null,
>   url?: string | null,
>   headers?: Record<string, string> | null,
>   oauthToken?: {
>     serviceAccountEmail?: string | null,
>     scope?: string | null
>   } | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] appEngineHttpRequest full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string> | null,
>   relativeUri?: string | null,
>   body?: string | null,
>   httpMethod?: string | null,
>   appEngineRouting?: {
>     instance?: string | null,
>     service?: string | null,
>     version?: string | null,
>     host?: string | null
>   } | null
> } | null
> ```

> [accordion] lastAttempt full type
>
> ```ts theme={null}
> {
>   dispatchTime?: string | null,
>   responseTime?: string | null,
>   scheduleTime?: string | null,
>   responseStatus?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string | null,
>   maxAttempts?: number | null,
>   maxDoublings?: number | null,
>   minBackoff?: string | null,
>   maxBackoff?: string | null
> } | null
> ```

> [accordion] firstAttempt full type
>
> ```ts theme={null}
> {
>   dispatchTime?: string | null,
>   responseTime?: string | null,
>   scheduleTime?: string | null,
>   responseStatus?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null
> } | null
> ```

***

### locations.queues.tasks.delete

`tasks.locations.queues.tasks.delete`

Deletes a task. A task can be deleted if it is scheduled or dispatched

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.tasks.delete({ name: 'projects/demo-project/locations/us-central1/queues/emails/tasks/task-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` Format: `projects/<id>/locations/<id>/queues/<id>/tasks/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Google Cloud accepted the call; it answered with no body (or an empty object). |

***

### locations.queues.tasks.get

`tasks.locations.queues.tasks.get`

Gets a task. After a task is successfully executed or has exhausted its retry attempts, the task is deleted

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.tasks.get({ name: 'projects/demo-project/locations/us-central1/queues/emails/tasks/task-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` Format: `projects/<id>/locations/<id>/queues/<id>/tasks/<id>`. |
| `responseView` | `VIEW_UNSPECIFIED \| BASIC \| FULL` | No | The response\_view specifies which subset of the Task will be returned. By default response\_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dispatchCount` | `number \| null` | No | Output only. The number of attempts dispatched. This count includes attempts which have been dispatched but haven't received a response. |
| `httpRequest` | `object \| null` | No | HTTP request. The task will be pushed to the worker as an HTTP request. If the worker or the redirected worker acknowledges the task by returning a successful HTTP response code (\[`200` - `299`]), the task will be removed from the queue. If any other HTTP response code is returned or no response is received, the task will be retried according to the following: \* User-specified throttling: retry configuration, rate limits, and the queue's state. \* System throttling: To prevent the worker from overloading, Cloud Tasks may temporarily reduce the queue's effective rate. |
| `appEngineHttpRequest` | `object \| null` | No | App Engine HTTP request. The message defines the HTTP request that is sent to an App Engine app when the task is dispatched. Using AppEngineHttpRequest requires [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) Google IAM permission for the project and the following scope: `https://www.googleapis.com/auth/cloud-platform` The task will be delivered to the App Engine app which belongs to the same project as the queue. |
| `responseCount` | `number \| null` | No | Output only. The number of attempts which have received a response. |
| `name` | `string \| null` | No | Optionally caller-specified in CreateTask. The task name. The task name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the task's location. The list of available locations can be obtained by calling ListLocations. |
| `view` | `string \| null` | No | Output only. The view specifies which subset of the Task has been returned. |
| `lastAttempt` | `object \| null` | No | The status of a task attempt. |
| `scheduleTime` | `string \| null` | No | The time when the task is scheduled to be attempted or retried. `schedule_time` will be truncated to the nearest microsecond. |
| `dispatchDeadline` | `string \| null` | No | The deadline for requests sent to the worker. If the worker does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the task according to the RetryConfig. Note that when the request is cancelled, Cloud Tasks will stop listening for the response, but whether the worker stops processing depends on the worker. For example, if the worker is stuck, it may not react to cancelled requests. The default and maximum values depend on the type of request: \* For HTTP tasks, the default is 10 minutes. |
| `retryConfig` | `object \| null` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `createTime` | `string \| null` | No | Output only. The time that the task was created. `create_time` will be truncated to the nearest second. |
| `firstAttempt` | `object \| null` | No | The status of a task attempt. |

> [accordion] httpRequest full type
>
> ```ts theme={null}
> {
>   httpMethod?: string | null,
>   body?: string | null,
>   url?: string | null,
>   headers?: Record<string, string> | null,
>   oauthToken?: {
>     serviceAccountEmail?: string | null,
>     scope?: string | null
>   } | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] appEngineHttpRequest full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string> | null,
>   relativeUri?: string | null,
>   body?: string | null,
>   httpMethod?: string | null,
>   appEngineRouting?: {
>     instance?: string | null,
>     service?: string | null,
>     version?: string | null,
>     host?: string | null
>   } | null
> } | null
> ```

> [accordion] lastAttempt full type
>
> ```ts theme={null}
> {
>   dispatchTime?: string | null,
>   responseTime?: string | null,
>   scheduleTime?: string | null,
>   responseStatus?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string | null,
>   maxAttempts?: number | null,
>   maxDoublings?: number | null,
>   minBackoff?: string | null,
>   maxBackoff?: string | null
> } | null
> ```

> [accordion] firstAttempt full type
>
> ```ts theme={null}
> {
>   dispatchTime?: string | null,
>   responseTime?: string | null,
>   scheduleTime?: string | null,
>   responseStatus?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null
> } | null
> ```

***

### locations.queues.tasks.list

`tasks.locations.queues.tasks.list`

Lists the tasks in a queue. By default, only the BASIC view is retrieved due to performance considerations; response\_view controls the subset of information which is returned (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.tasks.list({ parent: 'projects/demo-project/locations/us-central1/queues/emails' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `pageToken` | `string` | No | A token identifying the page of results to return. To request the first page results, page\_token must be empty. To request the next page of results, page\_token must be the value of next\_page\_token returned from the previous call to ListTasks method. The page token is valid for only 2 hours. |
| `responseView` | `VIEW_UNSPECIFIED \| BASIC \| FULL` | No | The response\_view specifies which subset of the Task will be returned. By default response\_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource. |
| `pageSize` | `number` | No | Maximum page size. Fewer tasks than requested might be returned, even if more tasks exist; use next\_page\_token in the response to determine if more tasks exist. The maximum page size is 1000. If unspecified, the page size will be the maximum. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token to retrieve next page of results. To return the next page of results, call ListTasks with this value as the page\_token. If the next\_page\_token is empty, there are no more results. |
| `tasks` | `object[] \| null` | No | The list of tasks. |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   dispatchCount?: number | null,
>   httpRequest?: {
>     httpMethod?: string | null,
>     body?: string | null,
>     url?: string | null,
>     headers?: Record<string, string> | null,
>     oauthToken?: {
>       serviceAccountEmail?: string | null,
>       scope?: string | null
>     } | null,
>     oidcToken?: {
>       serviceAccountEmail?: string | null,
>       audience?: string | null
>     } | null
>   } | null,
>   appEngineHttpRequest?: {
>     headers?: Record<string, string> | null,
>     relativeUri?: string | null,
>     body?: string | null,
>     httpMethod?: string | null,
>     appEngineRouting?: {
>       instance?: string | null,
>       service?: string | null,
>       version?: string | null,
>       host?: string | null
>     } | null
>   } | null,
>   responseCount?: number | null,
>   name?: string | null,
>   view?: string | null,
>   lastAttempt?: {
>     dispatchTime?: string | null,
>     responseTime?: string | null,
>     scheduleTime?: string | null,
>     responseStatus?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null,
>   scheduleTime?: string | null,
>   dispatchDeadline?: string | null,
>   retryConfig?: {
>     maxRetryDuration?: string | null,
>     maxAttempts?: number | null,
>     maxDoublings?: number | null,
>     minBackoff?: string | null,
>     maxBackoff?: string | null
>   } | null,
>   createTime?: string | null,
>   firstAttempt?: {
>     dispatchTime?: string | null,
>     responseTime?: string | null,
>     scheduleTime?: string | null,
>     responseStatus?: {
>       code?: number | null,
>       message?: string | null,
>       details?: Record<string, any>[] | null
>     } | null
>   } | null
> }[] | null
> ```

***

### locations.queues.tasks.run

`tasks.locations.queues.tasks.run`

Forces a task to run now. When this method is called, Cloud Tasks will dispatch the task, even if the task is already running, the queue has reached its RateLimits or is PAUSED

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.tasks.run({ name: 'projects/demo-project/locations/us-central1/queues/emails/tasks/task-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` Format: `projects/<id>/locations/<id>/queues/<id>/tasks/<id>`. |
| `responseView` | `VIEW_UNSPECIFIED \| BASIC \| FULL` | No | The response\_view specifies which subset of the Task will be returned. By default response\_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dispatchCount` | `number \| null` | No | Output only. The number of attempts dispatched. This count includes attempts which have been dispatched but haven't received a response. |
| `httpRequest` | `object \| null` | No | HTTP request. The task will be pushed to the worker as an HTTP request. If the worker or the redirected worker acknowledges the task by returning a successful HTTP response code (\[`200` - `299`]), the task will be removed from the queue. If any other HTTP response code is returned or no response is received, the task will be retried according to the following: \* User-specified throttling: retry configuration, rate limits, and the queue's state. \* System throttling: To prevent the worker from overloading, Cloud Tasks may temporarily reduce the queue's effective rate. |
| `appEngineHttpRequest` | `object \| null` | No | App Engine HTTP request. The message defines the HTTP request that is sent to an App Engine app when the task is dispatched. Using AppEngineHttpRequest requires [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) Google IAM permission for the project and the following scope: `https://www.googleapis.com/auth/cloud-platform` The task will be delivered to the App Engine app which belongs to the same project as the queue. |
| `responseCount` | `number \| null` | No | Output only. The number of attempts which have received a response. |
| `name` | `string \| null` | No | Optionally caller-specified in CreateTask. The task name. The task name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` \* `PROJECT_ID` can contain letters (\[A-Za-z]), numbers (\[0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) \* `LOCATION_ID` is the canonical ID for the task's location. The list of available locations can be obtained by calling ListLocations. |
| `view` | `string \| null` | No | Output only. The view specifies which subset of the Task has been returned. |
| `lastAttempt` | `object \| null` | No | The status of a task attempt. |
| `scheduleTime` | `string \| null` | No | The time when the task is scheduled to be attempted or retried. `schedule_time` will be truncated to the nearest microsecond. |
| `dispatchDeadline` | `string \| null` | No | The deadline for requests sent to the worker. If the worker does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the task according to the RetryConfig. Note that when the request is cancelled, Cloud Tasks will stop listening for the response, but whether the worker stops processing depends on the worker. For example, if the worker is stuck, it may not react to cancelled requests. The default and maximum values depend on the type of request: \* For HTTP tasks, the default is 10 minutes. |
| `retryConfig` | `object \| null` | No | Retry config. These settings determine when a failed task attempt is retried. |
| `createTime` | `string \| null` | No | Output only. The time that the task was created. `create_time` will be truncated to the nearest second. |
| `firstAttempt` | `object \| null` | No | The status of a task attempt. |

> [accordion] httpRequest full type
>
> ```ts theme={null}
> {
>   httpMethod?: string | null,
>   body?: string | null,
>   url?: string | null,
>   headers?: Record<string, string> | null,
>   oauthToken?: {
>     serviceAccountEmail?: string | null,
>     scope?: string | null
>   } | null,
>   oidcToken?: {
>     serviceAccountEmail?: string | null,
>     audience?: string | null
>   } | null
> } | null
> ```

> [accordion] appEngineHttpRequest full type
>
> ```ts theme={null}
> {
>   headers?: Record<string, string> | null,
>   relativeUri?: string | null,
>   body?: string | null,
>   httpMethod?: string | null,
>   appEngineRouting?: {
>     instance?: string | null,
>     service?: string | null,
>     version?: string | null,
>     host?: string | null
>   } | null
> } | null
> ```

> [accordion] lastAttempt full type
>
> ```ts theme={null}
> {
>   dispatchTime?: string | null,
>   responseTime?: string | null,
>   scheduleTime?: string | null,
>   responseStatus?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null
> } | null
> ```

> [accordion] retryConfig full type
>
> ```ts theme={null}
> {
>   maxRetryDuration?: string | null,
>   maxAttempts?: number | null,
>   maxDoublings?: number | null,
>   minBackoff?: string | null,
>   maxBackoff?: string | null
> } | null
> ```

> [accordion] firstAttempt full type
>
> ```ts theme={null}
> {
>   dispatchTime?: string | null,
>   responseTime?: string | null,
>   scheduleTime?: string | null,
>   responseStatus?: {
>     code?: number | null,
>     message?: string | null,
>     details?: Record<string, any>[] | null
>   } | null
> } | null
> ```

***

### locations.queues.testIamPermissions

`tasks.locations.queues.testIamPermissions`

Returns permissions that a caller has on a Queue. If the resource does not exist, this will return an empty set of permissions, not a NOT\_FOUND error

**Risk:** `read`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.queues.testIamPermissions({
	resource: 'projects/demo-project/locations/us-central1/queues/emails',
	permissions: ['cloudtasks.tasks.create'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/locations/<id>/queues/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

### locations.updateCmekConfig

`tasks.locations.updateCmekConfig`

Creates or Updates a CMEK config. Updates the Customer Managed Encryption Key associated with the Cloud Tasks location (Creates if the key does not already exist)

**Risk:** `write`

```ts theme={null}
await corsair.googlecloud.api.tasks.locations.updateCmekConfig({ name: 'projects/demo-project/locations/us-central1/cmekConfig', updateMask: 'kmsKey', kmsKey: 'projects/demo-project/locations/us-central1/keyRings/app/cryptoKeys/data' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | List of fields to be updated in this request. |
| `name` | `string` | Yes | Output only. The config resource name which includes the project and location and must end in 'cmekConfig', in the format `projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig` Format: `projects/<id>/locations/<id>/cmekConfig`. |
| `kmsKey` | `string` | No | Resource name of the Cloud KMS key, of the form `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID`, that will be used to encrypt the Queues & Tasks in the region. Setting this as blank will turn off CMEK encryption. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The config resource name which includes the project and location and must end in 'cmekConfig', in the format `projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig` |
| `kmsKey` | `string \| null` | No | Resource name of the Cloud KMS key, of the form `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID`, that will be used to encrypt the Queues & Tasks in the region. Setting this as blank will turn off CMEK encryption. |

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.