Skip to main content
REST API reference

Create an S3 user configuration

Creates an S3 user configuration to manage user access to S3 services within an ONTAP cluster.

HTTP method and endpoint

POST /protocols/s3/services/{svm.uuid}/users

Introduced in

ONTAP 9.7

Important notes

  • Each SVM can have one or more user configurations.

  • If the user is a member of Active directory, the user name takes the format "user@FQDN". For example, "user1@domain1.com".

  • If user creation is successful, a user access_key and secret_key is returned as part of the response.

  • If user keys have expiry configuration, then "key_expiry_time" is also returned as part of the response.

  • User access and secret keys can be specified in the input. If not specified, keys are generated automatically.

Required properties

  • svm.uuid - Existing SVM in which to create the user configuration.

  • name - User name that is to be created.

Default property values

  • comment - ""

  • vserver object-store-server user create

Parameters

Name Type In Required Description

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

  • Default value:

svm.uuid

string

path

True

UUID of the SVM to which this object belongs.

Request Body

Name Type Description

access_key

string

Specifies the access key for the user.

comment

string

Can contain any additional information about the user being created or modified.

key_expiry_time

string

Specifies the date and time after which keys expire and are no longer valid.

key_id

integer

Specifies the identifier of an S3 user key that needs to be generated or deleted. The key_id can either be '1' or '2'.

key_time_to_live

string

Indicates the time period from when this parameter is specified:

  • when creating or modifying a user or

  • when the user keys were last regenerated, after which the user keys expire and are no longer valid.

  • Valid format is: 'PnDTnHnMnS|PnW'. For example, P2DT6H3M10S specifies a time period of 2 days, 6 hours, 3 minutes, and 10 seconds.

  • If the value specified is '0' seconds, then the keys won't expire.

keys

array[keys]

Specifies the keys associated with an S3 User.

name

string

Specifies the name of the user. A user name length can range from 1 to 64 characters and can only contain the following combination of characters 0-9, A-Z, a-z, "_", "+", "=", ",", ".","@", and "-".

secret_key

string

Specifies the secret key for the user.

svm

svm

SVM, applies only to SVM-scoped objects.

Example request
{
  "access_key": "<AWS-ACCESS-KEY-ID>",
  "comment": "S3 user",
  "key_expiry_time": "2024-01-01 00:00:00 +0000",
  "key_id": 1,
  "key_time_to_live": "PT6H3M",
  "keys": [
    {
      "access_key": "<AWS-ACCESS-KEY-ID>",
      "expiry_time": "2024-01-01 00:00:00 +0000",
      "id": 1,
      "time_to_live": "PT6H3M"
    }
  ],
  "name": "user-1",
  "secret_key": "<AWS-SECRET-ACCESS-KEY>",
  "svm": {
    "name": "svm1",
    "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
  }
}

Response

Status: 201, Created
Name Type Description

num_records

integer

Number of records

records

array[s3_service_user_post_response]

Example response
{
  "num_records": 1,
  "records": [
    {
      "access_key": "<AWS-ACCESS-KEY-ID>",
      "key_expiry_time": "2024-01-01 00:00:00 +0000",
      "name": "user-1",
      "secret_key": "<AWS-SECRET-ACCESS-KEY>"
    }
  ]
}

Headers

Name Description Type

Location

Useful for tracking the resource location

string

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

92405787

User name "User#1" contains invalid characters. Valid characters for a user name are 0-9, A-Z, a-z, "_", "+", "=", ",", ".", "@", and "-".

92405788

User name "User0123456789012345678901234567890123456789012345678901234567890123456789012345" is not valid. User names must have between 1 and 64 characters.

92405791

Failed to create access-key and secret-key.

92405817

SVM "\" is not a data SVM. Specify a data SVM.

92406083

The maximum supported value for user key expiry configuration is "1095" days.

92406096

The user does not have permission to access the requested resource \"{0}\".

92406097

Internal error. The operation configuration is not correct.

92406196

The specified value for the "key_time_to_live" field cannot be greater than the maximum limit specified for the "max_key_time_to_live" field in the object store server.

| 92406197 | Object store user "user-2" must have a non-zero value for the "key_time_to_live" field because the maximum limit specified for the "max_key_time_to_live" field in the object store server is not zero. | 92406200 | An object store user with the same access-key already exists. | | 92406201 | Missing access-key or secret-key. Either provide both of the keys or none. If not provided, keys are generated automatically. | | 92406205 | The object store user access key contains invalid characters. Valid characters are 0-9 and A-Z. |

Definitions

See Definitions

keys

Specifies a key associated with an S3 user. At most only two keys can be associated with a user.

Name Type Description

access_key

string

Specifies the access key for the user.

expiry_time

string

Specifies the date and time after which keys expire and are no longer valid.

id

integer

Specifies an S3 user key identifier. Each user can only have a maximum of two keys. The key_id can either be '1' or '2'.

time_to_live

string

Indicates the time period from when this parameter is specified:

  • when creating or modifying a user or

  • when the user keys were last regenerated, after which the user keys expire and are no longer valid.

  • Valid format is: 'PnDTnHnMnS|PnW'. For example, P2DT6H3M10S specifies a time period of 2 days, 6 hours, 3 minutes, and 10 seconds.

  • If the value specified is '0' seconds, then the keys do not expire.

href

Name Type Description

href

string

svm

SVM, applies only to SVM-scoped objects.

Name Type Description

name

string

The name of the SVM. This field cannot be specified in a PATCH method.

uuid

string

The unique identifier of the SVM. This field cannot be specified in a PATCH method.

s3_user

This is a container of S3 users.

Name Type Description

access_key

string

Specifies the access key for the user.

comment

string

Can contain any additional information about the user being created or modified.

key_expiry_time

string

Specifies the date and time after which keys expire and are no longer valid.

key_id

integer

Specifies the identifier of an S3 user key that needs to be generated or deleted. The key_id can either be '1' or '2'.

key_time_to_live

string

Indicates the time period from when this parameter is specified:

  • when creating or modifying a user or

  • when the user keys were last regenerated, after which the user keys expire and are no longer valid.

  • Valid format is: 'PnDTnHnMnS|PnW'. For example, P2DT6H3M10S specifies a time period of 2 days, 6 hours, 3 minutes, and 10 seconds.

  • If the value specified is '0' seconds, then the keys won't expire.

keys

array[keys]

Specifies the keys associated with an S3 User.

name

string

Specifies the name of the user. A user name length can range from 1 to 64 characters and can only contain the following combination of characters 0-9, A-Z, a-z, "_", "+", "=", ",", ".","@", and "-".

secret_key

string

Specifies the secret key for the user.

svm

svm

SVM, applies only to SVM-scoped objects.

s3_service_user_post_response

Name Type Description

access_key

string

Specifies the access key for the user.

key_expiry_time

string

Specifies the date and time after which the keys expire and are no longer valid.

name

string

The name of the user.

secret_key

string

Specifies the secret key for the user.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

returned_error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.