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.

toussyn
已提問 1 年前檢視次數 262 次
1 個回答
1
已接受的答案

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
專家
已回答 1 年前
  • 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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南