# get\_product\_id 方法

## 简要

获取当前通用产品客户端所绑定的 Tencent Cloud 产品 ID 字符串。

```python
def get_product_id(self) -> str
```

## 参数

该方法没有参数。

## 返回值

该方法返回当前通用产品客户端所绑定的 Tencent Cloud 产品 ID 字符串。

## 异常

该方法不会主动引发任何异常。

## 示例

接下来我们将通过一段 Python 代码向您演示如何使用该方法：

```python
product_id: str = virtual_machine_client.get_product_id()
```

## 适用于

#### Tencent Cloud SDK for Python

基础软件包：tencent-cloud-sdk-core >= 0.1.1


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://smallso.gitbook.io/tencent-cloud-sdk/python-docs/other-products/class-and-method/universal-client/get-product-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
