I thought it may be because my WorkSpaces Directory had MFA enabled. When it was included in the script, I received no errors, I just never saw a “Forgot Password?” link on my WorkSpaces client. I didn’t mess with manual upgrades and switched to my Windows laptop….Īlso, I had no luck getting the “ForgotPasswordLink” option to work. When running the script from PowerShell, I got an attribute error which stated that “WorkSpaces has no attribute import_client_branding”. I like using AWS CloudShell for this kind of task, but in this case, it appears AWS has not updated CloudShell to support the new API method. Congratulations, you’ve enhanced the user experience by customizing your WorkSpaces client! Some Final Thoughts On the WorkSpaces client, click Support | Send Feedback and ensure the Support Link opens as expected. To test the customizations, simply open the Amazon WorkSpaces Client and login to a WorkSpace within the specified Directory. Assuming you leave the print(response) line in the code and the code completes successfully, you will see information similar to the following.As the code exists above, you will be prompted to enter the WorkSpaces Directory ID on which to apply the customizations.Launch the command prompt and enter: py CustomizeWorkSpacesBranding.py.Let’s assume I saved my Python script as CustomizeWorkSpacesBranding.py on my Windows-based laptop. 'en_US' : 'If you have any issues logging into your Workspace, click the Support tab' Response = service.import_client_branding( With open('c:\Temp\TestLogo3.png','r b') as img_branding:īytes_img_branding = bytearray(file_img_branding) # The code below performs the WorkSpaces client modifications Print(Fore.RED "The ID cannot be blank! Try again!") # The code below asks for the WorkSpaces Directory ID of the clients you wish to customizeĪdc_id = input("Enter the WorkSpaces Directory ID on which to apply the customizations: ") I was concerned about the local path at first but what happens is that when the script successfully completes, the file is copied to a CloudFront distribution managed by AWS and saved as “workspaces-branded-logo-.png import boto3 In regards to the ‘Logo’ option, be sure to change the path and filename for your own logo….it MUST be a PNG! I found it easier to copy the logo to my local workstation and specify it using the ‘with open’ syntax but this may be an opportunity for your Python skills to shine and optimize what I have provided here. Seeing that I will likely work with multiple WorkSpaces directories, I decided to have the script prompt me for the WorkSpaces Directory ID and use that as the variable for the ResourceId parameter. In this case, I needed some help with the ‘Logo’ syntax and was fortunate to get it from a fantastic co-worker in pretty short order. Though I think the Boto3 reference doc provides decent code examples but sometimes it can be a challenge for me to figure out the exact syntax needed. Granted, I did test this exact code myself, but there could be a better way to accomplish the task. I submit this to you for example purposes, as a means to see what a Python script could look like. You can choose to customize the settings for each of these clients, or for a portion of them, its up to you.įor this post, I’m going to share the very simple Python code I wrote to customize the WorkSpaces client of Windows-based devices for a specific directory/registration code. If you look at the Boto3 reference doc, you’ll see that you can customize the client settings for Windows, OSx, Android, IOS, Linux, and the Web. You will find the Boto3 Reference Documentation helpful for detailed information regarding the import_client_branding method, but if you’re looking for an easy example of the code required to customize the WorkSpaces client, you’re in the right place. The Amazon WorkSpaces API now includes the import_client_branding method which enables the client modifications mentioned above. (4) Login Message: Allows you to customize the login messageĬustomizing the WorkSpaces Client using Python.(3) Forgot Password Link: Allows you to specify a web address which enables users to reset their password.(2) Logo: Allows you to specify a custom logo appropriate to your organization.(1) Support Link: Allows you to specify an email or web address for users needing support with their WorkSpaces.Shown below is a screenshot taken from the WorkSpaces Admin Guide detailing the client settings that can be customized: What aspects of the WorkSpaces client can be customized? The updated API allows you to add a logo, login message, forgot password, and support links unique to your organization. Earlier this month, AWS announced that the Amazon WorkSpaces API could now be used to modify the appearance of the WorkSpaces client to enhance the end user experience.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |