How do I enable Workdocs for AWS Microsoft Managed AD through api calls

0

I want to enable workdocs for my AD, upon checking out boto3 client for Directory service I figured the update_setting method would do the job. This is the request syntax

response = client.update_settings(
    DirectoryId='string',
    Settings=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ]
)

And this is the brief explanation of the parameters:

  1. DirectoryId (string) –[REQUIRED]: The identifier of the directory for which to update settings.

  2. Settings (list) –[REQUIRED]: The list of Setting (dict) objects. –Contains information about the configurable settings for a directory. a. Name (string) – [REQUIRED]: The name of the directory setting. For example: TLS_1_0 b. Value (string) – [REQUIRED]: The value of the directory setting for which to retrieve information. For example, for TLS_1_0, the valid values are: Enable and Disable.

So I went ahead and tried this code as seen below: with "Workdocs", "WORKDOCS", "workdocs" and "WorkDocs"

response = client.update_settings(
    DirectoryId='my_directory_id',
    Settings=[
        {
            'Name': 'WorkDocs', 
            'Value': 'Enable'
        },
    ]
)

but kept getting this error: "An error occurred (UnsupportedSettingsException) when calling the UpdateSettings operation: Setting name: WORKDOCS is not currently supported with Inner Exception

If you know any way I can enable Workdocs for my AD in code, please help I would also like to know where to find the list of supported setting names for the update_setting method It would be nice if all the available setting is listed (or at least linked to) on the webpage though.

1 Answer
1
Accepted Answer

The values for "Settings" will probably be the ones listed in the following document.
As far as I can tell from the documentation table, "Workdocs" and the like are not supported.
https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_directory_settings.html#list-ds-settings

I think "register_workspace_directory" is used to configure the following document in boto3.
https://docs.aws.amazon.com/workspaces/latest/adminguide/enable-workdocs-active-directory.html

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/workspaces/client/register_workspace_directory.html

response = client.register_workspace_directory(
    DirectoryId='my_directory_id',
    SubnetIds=[
        'string',
    ],
    EnableWorkDocs=True,
    EnableSelfService=True
    Tenancy='SHARED',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
profile picture
EXPERT
answered a year ago
  • Thank you Riku. That removes the update_setting method as the path to potential solution

  • Thank you so much Ruki. register_workspace_directory API call worked. Thanks again.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions