Skip to main content

workspace

Creates, updates, deletes, gets or lists a workspace resource.

Overview

Nameworkspace
TypeResource
Idazure.quantum.workspace

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
apiKeyEnabledbooleanIndicator of enablement of the Quantum workspace Api keys.
primaryConnectionStringstringThe connection string of the primary api key.
primaryKeyobjectThe quantum workspace primary api key.
secondaryConnectionStringstringThe connection string of the secondary api key.
secondaryKeyobjectThe quantum workspace secondary api key.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_keysselectresource_group_name, workspace_name, subscription_idGet the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.
check_name_availabilityselectlocation_name, subscription_idCheck the availability of the resource name.
regenerate_keysexecresource_group_name, workspace_name, subscription_idRegenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working immediately.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
location_namestringLocation. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
workspace_namestringThe name of the quantum workspace resource. Required.

SELECT examples

Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.

SELECT
apiKeyEnabled,
primaryConnectionString,
primaryKey,
secondaryConnectionString,
secondaryKey
FROM azure.quantum.workspace
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working immediately.

EXEC azure.quantum.workspace.regenerate_keys 
@resource_group_name='{{ resource_group_name }}' --required,
@workspace_name='{{ workspace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"keys": "{{ keys }}"
}'
;