Skip to content

put_account_preferences async

put_account_preferences(
    resource_id_type: ResourceIdType,
    *,
    config_overrides: Optional[AsyncEFSClientConfig] = None,
) -> PutAccountPreferencesResponse

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.

Parameters:

  • resource_id_type (ResourceIdType) –

    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.

Raises:

  • BadRequest –

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

  • InternalServerError –

    Returned if an error occurred on the server side.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_efs/_services/async_efs.py
async def put_account_preferences(
    self,
    resource_id_type: "capo_efs.types.resource_id_type.ResourceIdType",
    *,
    config_overrides: Optional[AsyncEFSClientConfig] = None,
) -> (
    "capo_efs.types.put_account_preferences_response.PutAccountPreferencesResponse"
):
    """<p>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 <a href="https://docs.aws.amazon.com/efs/latest/ug/manage-efs-resource-ids.html">Managing Amazon EFS resource IDs</a>.</p> <note> <p>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.</p> </note>

    Args:
        resource_id_type: <p>Specifies the EFS resource ID preference to set for the user's Amazon Web Services account, in the current Amazon Web Services Region, either <code>LONG_ID</code> (17 characters), or <code>SHORT_ID</code> (8 characters).</p> <note> <p>Starting in October, 2021, you will receive an error when setting the account preference to <code>SHORT_ID</code>. Contact Amazon Web Services support if you receive an error and must use short IDs for file system and mount target resources.</p> </note>

    Raises:
        capo_efs.errors.bad_request.BadRequest: <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
        capo_efs.errors.internal_server_error.InternalServerError: <p>Returned if an error occurred on the server side.</p>
        capo_efs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_efs.types.put_account_preferences_request.PutAccountPreferencesRequest]",
    ) -> AsyncOperationResponse[
        "capo_efs.types.put_account_preferences_response.PutAccountPreferencesResponse"
    ]:
        import capo_efs._operations.magnolio_api_service_v20150201.put_account_preferences

        (
            output,
            http_response,
        ) = await capo_efs._operations.magnolio_api_service_v20150201.put_account_preferences.async_put_account_preferences(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutAccountPreferences")
    )
    input_: capo_efs.types.put_account_preferences_request.PutAccountPreferencesRequest = {
        "resource_id_type": resource_id_type
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output