Back to Aws Sdk Js V3

@aws-sdk/client-wickr

clients/client-wickr/README.md

3.1043.028.1 KB
Original Source
<!-- generated file, do not edit directly -->

@aws-sdk/client-wickr

Description

AWS SDK for JavaScript Wickr Client for Node.js, Browser and React Native.

<p>Welcome to the <i>Amazon Web Services Wickr API Reference</i>.</p> <p>The Amazon Web Services Wickr application programming interface (API) is designed for administrators to perform key tasks, such as creating and managing Amazon Web Services Wickr, networks, users, security groups, bots and more. This guide provides detailed information about the Amazon Web Services Wickr API, including operations, types, inputs and outputs, and error codes. You can use an Amazon Web Services SDK, the Amazon Web Services Command Line Interface (Amazon Web Services CLI, or the REST API to make API calls for Amazon Web Services Wickr. </p> <p> <i>Using Amazon Web Services SDK</i> </p> <p>The SDK clients authenticate your requests by using access keys that you provide. For more information, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/access.html">Authentication and access using Amazon Web Services SDKs and tools</a> in the <i>Amazon Web Services SDKs and Tools Reference Guide</i>. </p> <p> <i>Using Amazon Web Services CLI</i> </p> <p>Use your access keys with the Amazon Web Services CLI to make API calls. For more information about setting up the Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html">Getting started with the Amazon Web Services CLI</a> in the <i>Amazon Web Services Command Line Interface User Guide for Version 2</i>. </p> <p> <i>Using REST APIs</i> </p> <p>If you use REST to make API calls, you must authenticate your request by providing a signature. Amazon Web Services Wickr supports Signature Version 4. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html">Amazon Web Services Signature Version 4 for API requests</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>. </p> <p>Access and permissions to the APIs can be controlled by Amazon Web Services Identity and Access Management. The managed policy <a href="https://docs.aws.amazon.com/wickr/latest/adminguide/security-iam-awsmanpol.html#security-iam-awsmanpol-AWSWickrFullAccess">Amazon Web ServicesWickrFullAccess</a> grants full administrative permission to the Amazon Web Services Wickr service APIs. For more information on restricting access to specific operations, see <a href="https://docs.aws.amazon.com/wickr/latest/adminguide/security-iam.html">Identity and access management for Amazon Web Services Wickr </a> in the <i>Amazon Web Services Wickr Administration Guide</i>. </p> <p> <i>Types of Errors</i>:</p> <p>The Amazon Web Services Wickr APIs provide an HTTP interface. HTTP defines ranges of HTTP Status Codes for different types of error responses.</p> <ol> <li> <p>Client errors are indicated by HTTP Status Code class of 4xx</p> </li> <li> <p>Service errors are indicated by HTTP Status Code class of 5xx</p> </li> </ol> <p>In this reference guide, the documentation for each API has an Errors section that includes a brief discussion about HTTP status codes. We recommend looking there as part of your investigation when you get an error.</p>

Installing

To install this package, use the CLI of your favorite package manager:

  • npm install @aws-sdk/client-wickr
  • yarn add @aws-sdk/client-wickr
  • pnpm add @aws-sdk/client-wickr

Getting Started

Import

The AWS SDK is modulized by clients and commands. To send a request, you only need to import the WickrClient and the commands you need, for example ListBotsCommand:

js
// ES5 example
const { WickrClient, ListBotsCommand } = require("@aws-sdk/client-wickr");
ts
// ES6+ example
import { WickrClient, ListBotsCommand } from "@aws-sdk/client-wickr";

Usage

To send a request:

  • Instantiate a client with configuration (e.g. credentials, region).
  • Instantiate a command with input parameters.
  • Call the send operation on the client, providing the command object as input.
js
const client = new WickrClient({ region: "REGION" });

const params = { /** input parameters */ };
const command = new ListBotsCommand(params);

Async/await

We recommend using the await operator to wait for the promise returned by send operation as follows:

js
// async/await.
try {
  const data = await client.send(command);
  // process data.
} catch (error) {
  // error handling.
} finally {
  // finally.
}

Promises

You can also use Promise chaining.

js
client
  .send(command)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  })
  .finally(() => {
    // finally.
  });

Aggregated client

The aggregated client class is exported from the same package, but without the "Client" suffix.

Wickr extends WickrClient 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 (WickrClient). More details are in the blog post on modular packages in AWS SDK for JavaScript.

ts
import { Wickr } from "@aws-sdk/client-wickr";

const client = new Wickr({ region: "REGION" });

// async/await.
try {
  const data = await client.listBots(params);
  // process data.
} catch (error) {
  // error handling.
}

// Promises.
client
  .listBots(params)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  });

// callbacks (not recommended).
client.listBots(params, (err, data) => {
  // process err and data.
});

Troubleshooting

When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).

js
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.

Getting Help

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.

To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.

Contributing

This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-wickr package is updated. To contribute to client you can check our generate clients scripts.

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

Client Commands (Operations List)

<details> <summary> BatchCreateUser </summary>

Command API Reference / Input / Output

</details> <details> <summary> BatchDeleteUser </summary>

Command API Reference / Input / Output

</details> <details> <summary> BatchLookupUserUname </summary>

Command API Reference / Input / Output

</details> <details> <summary> BatchReinviteUser </summary>

Command API Reference / Input / Output

</details> <details> <summary> BatchResetDevicesForUser </summary>

Command API Reference / Input / Output

</details> <details> <summary> BatchToggleUserSuspendStatus </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateBot </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateDataRetentionBot </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateDataRetentionBotChallenge </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateNetwork </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateSecurityGroup </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteBot </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteDataRetentionBot </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteNetwork </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteSecurityGroup </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetBot </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetBotsCount </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetDataRetentionBot </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetGuestUserHistoryCount </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetNetwork </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetNetworkSettings </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetOidcInfo </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetOpentdfConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetSecurityGroup </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetUser </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetUsersCount </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListBlockedGuestUsers </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListBots </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListDevicesForUser </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListGuestUsers </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListNetworks </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListSecurityGroups </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListSecurityGroupUsers </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListUsers </summary>

Command API Reference / Input / Output

</details> <details> <summary> RegisterOidcConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> RegisterOidcConfigTest </summary>

Command API Reference / Input / Output

</details> <details> <summary> RegisterOpentdfConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateBot </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateDataRetention </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateGuestUser </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateNetwork </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateNetworkSettings </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateSecurityGroup </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateUser </summary>

Command API Reference / Input / Output

</details>