mfa_totp_devices
Creates, updates, deletes, gets or lists a mfa_totp_devices resource.
Overview​
| Name | mfa_totp_devices |
| Type | Resource |
| Id | oci.identity.mfa_totp_devices |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The MFA TOTP device.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the MFA TOTP Device. |
inactiveStatus | integer (int64) | The detailed status of INACTIVE lifecycleState. Allowed values are: - 1 - SUSPENDED - 2 - DISABLED - 4 - BLOCKED - 8 - LOCKED |
isActivated | boolean | Flag to indicate if the MFA TOTP device has been activated |
lifecycleState | string | The MFA TOTP device's current state. (CREATING, ACTIVE, INACTIVE, DELETING, DELETED) |
timeCreated | string (date-time) | Date and time the MfaTotpDevice object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z |
timeExpires | string (date-time) | Date and time when this MFA TOTP device will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z |
userId | string | The OCID of the user the MFA TOTP device belongs to. |
As the name suggests, a MfaTotpDeviceSummary object contains information about a MfaTotpDevice.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the MFA TOTP Device. |
inactiveStatus | integer (int64) | The detailed status of INACTIVE lifecycleState. Allowed values are: - 1 - SUSPENDED - 2 - DISABLED - 4 - BLOCKED - 8 - LOCKED |
isActivated | boolean | Flag to indicate if the MFA TOTP device has been activated |
lifecycleState | string | The MFA TOTP device's current state. (CREATING, ACTIVE, INACTIVE, DELETING, DELETED) |
timeCreated | string (date-time) | Date and time the MfaTotpDevice object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z |
timeExpires | string (date-time) | Date and time when this MFA TOTP device will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z |
userId | string | The OCID of the user the MFA TOTP device belongs to. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | userId, mfaTotpDeviceId, region | Get the specified MFA TOTP device for the specified user.<br /> | |
list | select | userId, region | page, limit, sortBy, sortOrder | Lists the MFA TOTP devices for the specified user. The returned object contains the device's OCID, but not<br />the seed. The seed is returned only upon creation or when the IAM service regenerates the MFA seed for the device.<br /> |
create | insert | userId, region | opc-retry-token | Creates a new MFA TOTP device for the user. A user can have one MFA TOTP device.<br /> |
delete | delete | userId, mfaTotpDeviceId, region | if-match | Deletes the specified MFA TOTP device for the specified user.<br /> |
activate_mfa_totp_device | exec | userId, mfaTotpDeviceId, region | if-match, opc-retry-token | Activates the specified MFA TOTP device for the user. Activation requires manual interaction with the Console.<br /> |
generate_totp_seed | exec | userId, mfaTotpDeviceId, region | if-match | Generate seed for the MFA TOTP device.<br /> |
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.
| Name | Datatype | Description |
|---|---|---|
mfaTotpDeviceId | string | The OCID of the MFA TOTP device. |
region | string | OCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION) |
userId | string | The OCID of the user. |
if-match | string | For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. |
limit | integer | The maximum number of items to return in a paginated "List" call. |
opc-retry-token | string | A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). |
page | string | The value of the opc-next-page response header from the previous "List" call. |
sortBy | string | The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive. Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive. |
SELECT examples​
- get
- list
Get the specified MFA TOTP device for the specified user.<br />
SELECT
id,
inactiveStatus,
isActivated,
lifecycleState,
timeCreated,
timeExpires,
userId
FROM oci.identity.mfa_totp_devices
WHERE userId = '{{ userId }}' -- required
AND mfaTotpDeviceId = '{{ mfaTotpDeviceId }}' -- required
AND region = '{{ region }}' -- required
;
Lists the MFA TOTP devices for the specified user. The returned object contains the device's OCID, but not<br />the seed. The seed is returned only upon creation or when the IAM service regenerates the MFA seed for the device.<br />
SELECT
id,
inactiveStatus,
isActivated,
lifecycleState,
timeCreated,
timeExpires,
userId
FROM oci.identity.mfa_totp_devices
WHERE userId = '{{ userId }}' -- required
AND region = '{{ region }}' -- required
AND page = '{{ page }}'
AND limit = '{{ limit }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
;
INSERT examples​
- create
- Manifest
Creates a new MFA TOTP device for the user. A user can have one MFA TOTP device.<br />
INSERT INTO oci.identity.mfa_totp_devices (
userId,
region,
opc-retry-token
)
SELECT
'{{ userId }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
inactiveStatus,
isActivated,
lifecycleState,
seed,
timeCreated,
timeExpires,
userId
;
# Description fields are for documentation purposes
- name: mfa_totp_devices
props:
- name: userId
value: "{{ userId }}"
description: Required parameter for the mfa_totp_devices resource.
- name: region
value: "{{ region }}"
description: Required parameter for the mfa_totp_devices resource.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
DELETE examples​
- delete
Deletes the specified MFA TOTP device for the specified user.<br />
DELETE FROM oci.identity.mfa_totp_devices
WHERE userId = '{{ userId }}' --required
AND mfaTotpDeviceId = '{{ mfaTotpDeviceId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;
Lifecycle Methods​
- activate_mfa_totp_device
- generate_totp_seed
Activates the specified MFA TOTP device for the user. Activation requires manual interaction with the Console.<br />
EXEC oci.identity.mfa_totp_devices.activate_mfa_totp_device
@userId='{{ userId }}' --required,
@mfaTotpDeviceId='{{ mfaTotpDeviceId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-retry-token='{{ opc-retry-token }}'
@@json=
'{
"totpToken": "{{ totpToken }}"
}'
;
Generate seed for the MFA TOTP device.<br />
EXEC oci.identity.mfa_totp_devices.generate_totp_seed
@userId='{{ userId }}' --required,
@mfaTotpDeviceId='{{ mfaTotpDeviceId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}'
;