Skip to content

modify_workspace_access_properties

modify_workspace_access_properties(
    resource_id: DirectoryId,
    workspace_access_properties: WorkspaceAccessProperties,
    *,
    config_overrides: Optional[WorkSpacesClientConfig] = None,
) -> ModifyWorkspaceAccessPropertiesResult

Specifies which devices and operating systems users can use to access their WorkSpaces. For more information, see Control Device Access.

Parameters:

  • resource_id (DirectoryId) –

    The identifier of the directory.

  • workspace_access_properties (WorkspaceAccessProperties) –

    The device types and operating systems to enable or disable for access.

Raises:

Source code in docs_src/capo_workspaces/_services/work_spaces.py
def modify_workspace_access_properties(
    self,
    resource_id: "capo_workspaces.types.directory_id.DirectoryId",
    workspace_access_properties: "capo_workspaces.types.workspace_access_properties.WorkspaceAccessProperties",
    *,
    config_overrides: Optional[WorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.modify_workspace_access_properties_result.ModifyWorkspaceAccessPropertiesResult":
    """<p>Specifies which devices and operating systems users can use to access their WorkSpaces. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/update-directory-details.html#control-device-access"> Control Device Access</a>.</p>

    Args:
        resource_id: <p>The identifier of the directory.</p>
        workspace_access_properties: <p>The device types and operating systems to enable or disable for access.</p>

    Raises:
        capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
        capo_workspaces.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Two or more of the selected parameter values cannot be used together.</p>
        capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
        capo_workspaces.errors.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</p>
        capo_workspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_workspaces.types.modify_workspace_access_properties_request.ModifyWorkspaceAccessPropertiesRequest]",
    ) -> OperationResponse[
        "capo_workspaces.types.modify_workspace_access_properties_result.ModifyWorkspaceAccessPropertiesResult"
    ]:
        import capo_workspaces._operations.workspaces_service.modify_workspace_access_properties

        output, http_response = (
            capo_workspaces._operations.workspaces_service.modify_workspace_access_properties.modify_workspace_access_properties(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyWorkspaceAccessProperties")
    )
    input_: capo_workspaces.types.modify_workspace_access_properties_request.ModifyWorkspaceAccessPropertiesRequest = {
        "resource_id": resource_id,
        "workspace_access_properties": workspace_access_properties,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output