clients/client-workspaces-web/README.md
AWS SDK for JavaScript WorkSpacesWeb Client for Node.js, Browser and React Native.
<p>Amazon WorkSpaces Secure Browser is a low cost, fully managed WorkSpace built specifically to facilitate secure, web-based workloads. WorkSpaces Secure Browser makes it easy for customers to safely provide their employees with access to internal websites and SaaS web applications without the administrative burden of appliances or specialized client software. WorkSpaces Secure Browser provides simple policy tools tailored for user interactions, while offloading common tasks like capacity management, scaling, and maintaining browser images.</p>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-workspaces-webyarn add @aws-sdk/client-workspaces-webpnpm add @aws-sdk/client-workspaces-webThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the WorkSpacesWebClient and
the commands you need, for example ListPortalsCommand:
// ES5 example
const { WorkSpacesWebClient, ListPortalsCommand } = require("@aws-sdk/client-workspaces-web");
// ES6+ example
import { WorkSpacesWebClient, ListPortalsCommand } from "@aws-sdk/client-workspaces-web";
To send a request:
send operation on the client, providing the command object as input.const client = new WorkSpacesWebClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListPortalsCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
WorkSpacesWeb extends WorkSpacesWebClient and additionally supports all operations, waiters, and paginators as methods.
This style may be familiar to you from the AWS SDK for JavaScript v2.
If you are bundling the AWS SDK, we recommend using only the bare-bones client (WorkSpacesWebClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { WorkSpacesWeb } from "@aws-sdk/client-workspaces-web";
const client = new WorkSpacesWeb({ region: "REGION" });
// async/await.
try {
const data = await client.listPortals(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listPortals(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listPortals(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
See also docs/ERROR_HANDLING.
Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-workspaces-web package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Command API Reference / Input / Output
</details> <details> <summary> AssociateDataProtectionSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> AssociateIpAccessSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> AssociateNetworkSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> AssociateSessionLogger </summary>Command API Reference / Input / Output
</details> <details> <summary> AssociateTrustStore </summary>Command API Reference / Input / Output
</details> <details> <summary> AssociateUserAccessLoggingSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> AssociateUserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateBrowserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateDataProtectionSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateIdentityProvider </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateIpAccessSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateNetworkSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> CreatePortal </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateSessionLogger </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateTrustStore </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateUserAccessLoggingSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateUserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteBrowserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteDataProtectionSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteIdentityProvider </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteIpAccessSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteNetworkSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DeletePortal </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteSessionLogger </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteTrustStore </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteUserAccessLoggingSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteUserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateBrowserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateDataProtectionSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateIpAccessSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateNetworkSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateSessionLogger </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateTrustStore </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateUserAccessLoggingSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateUserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> ExpireSession </summary>Command API Reference / Input / Output
</details> <details> <summary> GetBrowserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDataProtectionSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> GetIdentityProvider </summary>Command API Reference / Input / Output
</details> <details> <summary> GetIpAccessSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> GetNetworkSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> GetPortal </summary>Command API Reference / Input / Output
</details> <details> <summary> GetPortalServiceProviderMetadata </summary>Command API Reference / Input / Output
</details> <details> <summary> GetSession </summary>Command API Reference / Input / Output
</details> <details> <summary> GetSessionLogger </summary>Command API Reference / Input / Output
</details> <details> <summary> GetTrustStore </summary>Command API Reference / Input / Output
</details> <details> <summary> GetTrustStoreCertificate </summary>Command API Reference / Input / Output
</details> <details> <summary> GetUserAccessLoggingSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> GetUserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> ListBrowserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> ListDataProtectionSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> ListIdentityProviders </summary>Command API Reference / Input / Output
</details> <details> <summary> ListIpAccessSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> ListNetworkSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> ListPortals </summary>Command API Reference / Input / Output
</details> <details> <summary> ListSessionLoggers </summary>Command API Reference / Input / Output
</details> <details> <summary> ListSessions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTrustStoreCertificates </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTrustStores </summary>Command API Reference / Input / Output
</details> <details> <summary> ListUserAccessLoggingSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> ListUserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UntagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateBrowserSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateDataProtectionSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateIdentityProvider </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateIpAccessSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateNetworkSettings </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdatePortal </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateSessionLogger </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateTrustStore </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateUserAccessLoggingSettings </summary> </details> <details> <summary> UpdateUserSettings </summary> </details>