Skip to main content

swift_passwords

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

Overview​

Nameswift_passwords
TypeResource
Idoci.identity.swift_passwords

Fields​

The following fields are returned by SELECT queries:

Deprecated. Use [AuthToken](#/en/identity/20160918/AuthToken/) instead.<br /><br />Swift is the OpenStack object storage service. A SwiftPassword is an Oracle-provided password for using a<br />Swift client with the Object Storage Service. This password is associated with<br />the user's Console login. Swift passwords never expire. A user can have up to two Swift passwords at a time.<br /><br />Note: The password is always an Oracle-generated string; you can't change it to a string of your choice.<br /><br />For more information, see [Managing User Credentials](/Content/Identity/Tasks/managingcredentials.htm).<br />

NameDatatypeDescription
idstringThe OCID of the Swift password.
descriptionstringThe description you assign to the Swift password. Does not have to be unique, and it's changeable.
expiresOnstring (date-time)Date and time when this password will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
inactiveStatusinteger (int64)The detailed status of INACTIVE lifecycleState.
lifecycleStatestringThe password's current state. After creating a password, make sure its lifecycleState changes from CREATING to ACTIVE before using it. (CREATING, ACTIVE, INACTIVE, DELETING, DELETED)
passwordstringThe Swift password. The value is available only in the response for CreateSwiftPassword, and not for ListSwiftPasswords or UpdateSwiftPassword.
timeCreatedstring (date-time)Date and time the SwiftPassword object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
userIdstringThe OCID of the user the password belongs to.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectuserId, regionDeprecated. Use [ListAuthTokens](#/en/identity/20160918/AuthToken/ListAuthTokens) instead.<br /><br />Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not<br />the password itself. The actual password is returned only upon creation.<br />
createinsertuserId, region, descriptionopc-retry-tokenDeprecated. Use [CreateAuthToken](#/en/identity/20160918/AuthToken/CreateAuthToken) instead.<br /><br />Creates a new Swift password for the specified user. For information about what Swift passwords are for, see<br />[Managing User Credentials](/Content/Identity/Tasks/managingcredentials.htm).<br /><br />You must specify a description for the Swift password (although it can be an empty string). It does not<br />have to be unique, and you can change it anytime with<br />[UpdateSwiftPassword](#/en/identity/20160918/SwiftPassword/UpdateSwiftPassword).<br /><br />Every user has permission to create a Swift password for their own user ID. An administrator in your organization<br />does not need to write a policy to give users this ability. To compare, administrators who have permission to the<br />tenancy can use this operation to create a Swift password for any user, including themselves.<br />
updateupdateuserId, swiftPasswordId, regionif-matchDeprecated. Use [UpdateAuthToken](#/en/identity/20160918/AuthToken/UpdateAuthToken) instead.<br /><br />Updates the specified Swift password's description.<br />
deletedeleteuserId, swiftPasswordId, regionif-matchDeprecated. Use [DeleteAuthToken](#/en/identity/20160918/AuthToken/DeleteAuthToken) instead.<br /><br />Deletes the specified Swift password for the specified user.<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.

NameDatatypeDescription
regionstringOCI 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)
swiftPasswordIdstringThe OCID of the Swift password.
userIdstringThe OCID of the user.
if-matchstringFor 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.
opc-retry-tokenstringA 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).

SELECT examples​

Deprecated. Use [ListAuthTokens](#/en/identity/20160918/AuthToken/ListAuthTokens) instead.<br /><br />Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not<br />the password itself. The actual password is returned only upon creation.<br />

SELECT
id,
description,
expiresOn,
inactiveStatus,
lifecycleState,
password,
timeCreated,
userId
FROM oci.identity.swift_passwords
WHERE userId = '{{ userId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Deprecated. Use [CreateAuthToken](#/en/identity/20160918/AuthToken/CreateAuthToken) instead.<br /><br />Creates a new Swift password for the specified user. For information about what Swift passwords are for, see<br />[Managing User Credentials](/Content/Identity/Tasks/managingcredentials.htm).<br /><br />You must specify a description for the Swift password (although it can be an empty string). It does not<br />have to be unique, and you can change it anytime with<br />[UpdateSwiftPassword](#/en/identity/20160918/SwiftPassword/UpdateSwiftPassword).<br /><br />Every user has permission to create a Swift password for their own user ID. An administrator in your organization<br />does not need to write a policy to give users this ability. To compare, administrators who have permission to the<br />tenancy can use this operation to create a Swift password for any user, including themselves.<br />

INSERT INTO oci.identity.swift_passwords (
description,
userId,
region,
opc-retry-token
)
SELECT
'{{ description }}' /* required */,
'{{ userId }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
description,
expiresOn,
inactiveStatus,
lifecycleState,
password,
timeCreated,
userId
;

UPDATE examples​

Deprecated. Use [UpdateAuthToken](#/en/identity/20160918/AuthToken/UpdateAuthToken) instead.<br /><br />Updates the specified Swift password's description.<br />

UPDATE oci.identity.swift_passwords
SET
description = '{{ description }}'
WHERE
userId = '{{ userId }}' --required
AND swiftPasswordId = '{{ swiftPasswordId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
id,
description,
expiresOn,
inactiveStatus,
lifecycleState,
password,
timeCreated,
userId;

DELETE examples​

Deprecated. Use [DeleteAuthToken](#/en/identity/20160918/AuthToken/DeleteAuthToken) instead.<br /><br />Deletes the specified Swift password for the specified user.<br />

DELETE FROM oci.identity.swift_passwords
WHERE userId = '{{ userId }}' --required
AND swiftPasswordId = '{{ swiftPasswordId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;