Accounts
Get account configuration
Get the current account information. If no account information is found, returns the default configuration.
Autorização
Para chamar esse método, deve-se ter sido designado a uma ou mais funções de acesso do IAM que incluam as ações a seguir. É possível verificar seu acesso indo para Users > User > Access
quantum-computing.account-configuration.read
Auditoria
A chamada desse método gera os seguintes eventos de auditoria.
quantum-computing.account-configuration.read
Entrada
Nome, Tipo | Descrição |
|---|---|
id Necessário string | Account id (without |
Nome, Tipo | Descrição |
|---|---|
plan_id string | Obtain the account configuration only for the specified plan |
Amostras de código
GET
/v1/accounts/{id} Se sua instância estiver na região eu-de, use este link: URL: https://eu-de.quantum.cloud.ibm.com/api/v1/accounts/{id}
curl -X GET \
'https://quantum.cloud.ibm.com/api/v1/accounts/{id}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR-TOKEN' \
-H 'Service-CRN: YOUR-SERVICE-CRN' \
-H 'IBM-API-Version: 2024-01-01' Se sua instância estiver na região eu-de, use este link: URL: https://eu-de.quantum.cloud.ibm.com/api/v1/accounts/{id}
import requests
response = requests.request(
"GET",
"https://quantum.cloud.ibm.com/api/v1/accounts/{id}",
headers={
"Accept": "application/json",
"IBM-API-Version": "2024-01-01",
"Authorization": "Bearer YOUR-TOKEN",
"Service-CRN": "YOUR-SERVICE-CRN"
},
)
print(response.json())Saída
Código de status | Descrição |
|---|---|
| 200 | Account configuration successfully retrieved |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Not Found |
| 500 | Internal error |
Respostas
{
"plans": [
{
"plan_id": "flex-plan-id-1",
"subscription_id": "53bde9d3-cdbb-46f5-a98f-60ebcadf7260",
"subscription_name": "flex",
"usage_allocation_seconds": 200,
"usage_allocation_ru": 3.5,
"usage_limit_seconds": 200,
"usage_limit_ru": 3.5,
"unallocated_usage_seconds": 200,
"unallocated_usage_ru": 3.5,
"backends": [
"ibm_backend"
],
"max_ttl": 28800,
"active_ttl": 28800,
"interactive_ttl": 60,
"start_time": "2025-05-17T00:00:00Z",
"end_time": "2026-05-17T00:00:00Z"
},
{
"plan_id": "plan-id-2",
"subscription_id": "52fde9d3-cdbb-46f5-a98f-60ebchdf7260",
"subscription_name": "open",
"usage_allocation_seconds": 150,
"usage_allocation_ru": 2.5,
"usage_limit_seconds": 300,
"usage_limit_ru": 5,
"unallocated_usage_seconds": 10,
"unallocated_usage_ru": 0.166667,
"backends": [
"backend1",
"backend2"
]
},
{
"plan_id": "plan-id-3",
"subscription_id": "91b2c828-2952-4f05-aed8-bedf92c6c480",
"subscription_name": "internal",
"backends": [
"backend1",
"backend2"
]
}
]
}{
"type": "object",
"description": "Configuration for an account managed by the IBM Qiskit Runtime service.",
"properties": {
"plans": {
"description": "The list of configurations for the account per plan",
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"plan_id": {
"type": "string",
"description": "The plan id as defined in Global Catalog",
"pattern": "^.+$",
"minLength": 1,
"maxLength": 128
},
"subscription_id": {
"type": "string",
"description": "The id of subscription to identify each plan contract in one account",
"pattern": "^.+$",
"minLength": 1,
"maxLength": 36
},
"subscription_name": {
"type": "string",
"description": "The user-readable name of the subscription",
"pattern": "^.+$",
"minLength": 1,
"maxLength": 128
},
"usage_allocation_seconds": {
"type": "integer",
"format": "int32",
"minimum": 0,
"maximum": 2147483647,
"description": "The maximum sum of allowable usage allocation in seconds across all instances in the account. Mandatory when plan_id is about flex plan."
},
"usage_allocation_ru": {
"type": "number",
"format": "float",
"minimum": 0,
"maximum": 9007199254740991,
"description": "The maximum sum of allowable usage allocation in resource units across all instances in the account. Mandatory when plan_id is about flex plan."
},
"usage_limit_seconds": {
"type": "integer",
"format": "int32",
"minimum": 0,
"maximum": 2147483647,
"description": "The maximum amount of time workloads can run across all instances in the account for the specified plan in seconds. Mandatory when plan_id is about flex plan."
},
"usage_limit_ru": {
"type": "number",
"format": "float",
"minimum": 0,
"maximum": 9007199254740991,
"description": "The maximum amount of time workloads can run across all instances in the account for the specified plan in resource units. Mandatory when plan_id is about flex plan."
},
"backends": {
"type": "array",
"description": "List of backends to allow the account to assign for instances.",
"items": {
"type": "string",
"pattern": "^.+$",
"minLength": 1,
"maxLength": 128
},
"minItems": 0,
"maxItems": 100
},
"max_ttl": {
"type": "integer",
"format": "int32",
"minimum": 0,
"maximum": 2147483647,
"description": "The maximum time (in seconds) for session to run, subject to plan limits."
},
"active_ttl": {
"type": "integer",
"format": "int32",
"minimum": 0,
"maximum": 2147483647,
"description": "The remaining time (in seconds) for the session to be in the active state while jobs are running. Must be less than or equal to max ttl."
},
"interactive_ttl": {
"type": "integer",
"format": "int32",
"minimum": 0,
"maximum": 2147483647,
"description": "The maximum time (in seconds) between jobs to keep the session active. Must be less than or equal to active ttl."
},
"start_time": {
"type": "string",
"format": "date-time",
"description": "Start time for contract-based plans. Mandatory when plan_id is about flex plan."
},
"end_time": {
"type": "string",
"format": "date-time",
"description": "End time for contract-based plans. Mandatory when plan_id is about flex plan."
},
"functions": {
"type": "array",
"description": "Functions available to this account plan. Each entry specifies a function id, billing model, and the set of permitted actions. Unlike instance-level configuration, `[\"ANY\"]` is not a valid value — functions must be listed explicitly.\n",
"items": {
"type": "object",
"description": "A function available to an account plan.",
"properties": {
"provider": {
"type": "string",
"description": "The function provider name.",
"pattern": "^.+$",
"minLength": 1,
"maxLength": 256,
"example": "ibm"
},
"name": {
"type": "string",
"description": "The function name, unique within a provider.",
"pattern": "^.+$",
"minLength": 1,
"maxLength": 256,
"example": "circuit-function"
},
"business_model": {
"type": "string",
"description": "The business model under which the function is offered.",
"enum": [
"trial",
"subsidized",
"consumption"
]
},
"permissions": {
"type": "array",
"description": "IAM-style actions granted for this function.",
"items": {
"type": "string",
"pattern": "^.+$",
"minLength": 1,
"maxLength": 256
},
"minItems": 1,
"maxItems": 2147483647,
"example": [
"function.run"
]
}
},
"required": [
"provider",
"name",
"business_model",
"permissions"
]
},
"minItems": 0,
"maxItems": 2147483647
},
"custom_functions": {
"type": "object",
"description": "Custom functions entitlement configured on an account plan.",
"properties": {
"permissions": {
"type": "array",
"description": "Actions granted for custom functions.",
"items": {
"type": "string",
"pattern": "^.+$",
"minLength": 1,
"maxLength": 256
},
"minItems": 1,
"maxItems": 2147483647,
"example": [
"function-custom.run"
]
}
},
"required": [
"permissions"
]
}
},
"required": [
"backends",
"plan_id",
"subscription_id",
"subscription_name"
]
},
{
"type": "object",
"properties": {
"unallocated_usage_seconds": {
"type": "integer",
"format": "int32",
"minimum": 0,
"maximum": 2147483647,
"description": "The remaining usage allocation in seconds that can still be allocated to instances."
}
}
},
{
"type": "object",
"properties": {
"unallocated_usage_ru": {
"type": "number",
"format": "float",
"minimum": 0,
"maximum": 9007199254740991,
"description": "The remaining usage allocation in resource units that can still be allocated to instances."
}
}
}
]
},
"minItems": 0,
"maxItems": 20
}
},
"required": [
"plans"
]
}Esta página foi útil?
Relate um bug, erro de digitação ou solicite conteúdo no GitHub.