PutAccountPreferencesCommand

Use this operation to set the account preference in the current Amazon Web Services Region to use long 17 character (63 bit) or short 8 character (32 bit) resource IDs for new EFS file system and mount target resources. All existing resource IDs are not affected by any changes you make. You can set the ID preference during the opt-in period as EFS transitions to long resource IDs. For more information, see Managing Amazon EFS resource IDs .

Starting in October, 2021, you will receive an error if you try to set the account preference to use the short 8 character format resource ID. Contact Amazon Web Services support if you receive an error and must use short IDs for file system and mount target resources.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EFSClient, PutAccountPreferencesCommand } from "@aws-sdk/client-efs"; // ES Modules import
// const { EFSClient, PutAccountPreferencesCommand } = require("@aws-sdk/client-efs"); // CommonJS import
const client = new EFSClient(config);
const input = { // PutAccountPreferencesRequest
  ResourceIdType: "LONG_ID" || "SHORT_ID", // required
};
const command = new PutAccountPreferencesCommand(input);
const response = await client.send(command);
// { // PutAccountPreferencesResponse
//   ResourceIdPreference: { // ResourceIdPreference
//     ResourceIdType: "LONG_ID" || "SHORT_ID",
//     Resources: [ // Resources
//       "FILE_SYSTEM" || "MOUNT_TARGET",
//     ],
//   },
// };

PutAccountPreferencesCommand Input

Parameter
Type
Description
ResourceIdType
Required
ResourceIdType | undefined

Specifies the EFS resource ID preference to set for the user's Amazon Web Services account, in the current Amazon Web Services Region, either LONG_ID (17 characters), or SHORT_ID (8 characters).

Starting in October, 2021, you will receive an error when setting the account preference to SHORT_ID. Contact Amazon Web Services support if you receive an error and must use short IDs for file system and mount target resources.

PutAccountPreferencesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ResourceIdPreference
ResourceIdPreference | undefined

Describes the resource type and its ID preference for the user's Amazon Web Services account, in the current Amazon Web Services Region.

Throws

Name
Fault
Details
BadRequest
client

Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

InternalServerError
server

Returned if an error occurred on the server side.

EFSServiceException
Base exception class for all service exceptions from EFS service.