@aws-sdk/client-mediastore
TypeScript icon, indicating that this package has built-in type declarations

3.696.0 • Public • Published

@aws-sdk/client-mediastore

Description

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

An AWS Elemental MediaStore container is a namespace that holds folders and objects. You use a container endpoint to create, read, and delete objects.

Installing

To install this package, simply type add or install @aws-sdk/client-mediastore using your favorite package manager:

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

Getting Started

Import

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

// ES5 example
const { MediaStoreClient, ListContainersCommand } = require("@aws-sdk/client-mediastore");
// ES6+ example
import { MediaStoreClient, ListContainersCommand } from "@aws-sdk/client-mediastore";

Usage

To send a request, you:

  • Initiate client with configuration (e.g. credentials, region).
  • Initiate command with input parameters.
  • Call send operation on client with command object as input.
  • If you are using a custom http handler, you may call destroy() to close open connections.
// a client can be shared by different commands.
const client = new MediaStoreClient({ region: "REGION" });

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

Async/await

We recommend using 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.
}

Async-await is clean, concise, intuitive, easy to debug and has better error handling as compared to using Promise chains or callbacks.

Promises

You can also use Promise chaining to execute send operation.

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

Promises can also be called using .catch() and .finally() as follows:

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

Callbacks

We do not recommend using callbacks because of callback hell, but they are supported by the send operation.

// callbacks.
client.send(command, (err, data) => {
  // process err and data.
});

v2 compatible style

The client can also send requests using v2 compatible style. However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post on modular packages in AWS SDK for JavaScript

import * as AWS from "@aws-sdk/client-mediastore";
const client = new AWS.MediaStore({ region: "REGION" });

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

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

// callbacks.
client.listContainers(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).

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;
   * }
   */
}

Getting Help

Please use these community resources for getting help. We use the 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-mediastore 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)

CreateContainer

Command API Reference / Input / Output

DeleteContainer

Command API Reference / Input / Output

DeleteContainerPolicy

Command API Reference / Input / Output

DeleteCorsPolicy

Command API Reference / Input / Output

DeleteLifecyclePolicy

Command API Reference / Input / Output

DeleteMetricPolicy

Command API Reference / Input / Output

DescribeContainer

Command API Reference / Input / Output

GetContainerPolicy

Command API Reference / Input / Output

GetCorsPolicy

Command API Reference / Input / Output

GetLifecyclePolicy

Command API Reference / Input / Output

GetMetricPolicy

Command API Reference / Input / Output

ListContainers

Command API Reference / Input / Output

ListTagsForResource

Command API Reference / Input / Output

PutContainerPolicy

Command API Reference / Input / Output

PutCorsPolicy

Command API Reference / Input / Output

PutLifecyclePolicy

Command API Reference / Input / Output

PutMetricPolicy

Command API Reference / Input / Output

StartAccessLogging

Command API Reference / Input / Output

StopAccessLogging

Command API Reference / Input / Output

TagResource

Command API Reference / Input / Output

UntagResource

Command API Reference / Input / Output

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.0-gamma.110gamma
1.0.0-beta.50beta
1.0.0-alpha.260alpha
3.696.080latest

Version History

VersionDownloads (Last 7 Days)Published
3.696.080
3.693.094
3.692.012
3.691.08
3.687.0104
3.686.01
3.682.00
3.679.01
3.678.01
3.677.057
3.675.00
3.670.00
3.669.00
3.668.00
3.667.00
3.666.00
3.665.00
3.664.00
3.662.00
3.658.10
3.658.00
3.654.00
3.651.10
3.650.00
3.649.00
3.645.00
3.637.017,063
3.635.00
3.632.00
3.631.00
3.629.020
3.624.036
3.623.00
3.622.00
3.621.00
3.620.10
3.620.00
3.616.00
3.614.00
3.613.00
3.609.00
3.606.00
3.600.00
3.598.00
3.596.00
3.592.00
3.590.00
3.588.00
3.587.00
3.583.00
3.582.00
3.577.00
3.576.00
3.575.00
3.574.00
3.572.00
3.569.00
3.568.00
3.567.00
3.565.00
3.564.00
3.563.00
3.556.00
3.554.00
3.552.00
3.549.00
3.540.00
3.535.00
3.533.00
3.529.10
3.529.00
3.525.00
3.523.01
3.521.00
3.515.01
3.514.00
3.513.00
3.511.00
3.509.00
3.507.00
3.504.00
3.503.10
3.503.00
3.502.00
3.501.00
3.499.00
3.496.00
3.495.00
3.490.00
3.489.00
3.485.00
3.484.00
3.481.04
3.478.00
3.477.00
3.476.00
3.474.00
3.473.00
3.470.00
3.468.00
3.465.00
3.462.00
3.461.00
3.460.00
3.458.00
3.454.00
3.451.00
3.450.00
3.449.00
3.445.00
3.441.00
3.438.00
3.437.00
3.436.00
3.435.00
3.433.00
3.431.00
3.430.00
3.429.00
3.428.00
3.427.00
3.425.00
3.423.00
3.421.00
3.418.00
3.414.00
3.413.00
3.410.00
3.409.00
3.408.00
3.405.00
3.398.00
3.395.00
3.391.00
3.388.045
3.387.00
3.386.00
3.385.00
3.382.00
3.379.10
3.378.00
3.377.00
3.370.00
3.369.00
3.363.00
3.362.00
3.360.00
3.359.00
3.358.00
3.357.00
3.354.00
3.353.00
3.352.00
3.350.00
3.348.00
3.347.10
3.347.00
3.345.00
3.344.00
3.342.00
3.341.00
3.338.00
3.337.00
3.335.00
3.332.00
3.329.00
3.328.00
3.327.00
3.326.00
3.325.00
3.321.10
3.319.00
3.316.00
3.315.00
3.312.00
3.310.00
3.309.00
3.306.00
3.303.00
3.301.00
3.300.00
3.299.00
3.298.00
3.297.00
3.296.00
3.295.00
3.294.00
3.293.00
3.292.00
3.290.00
3.289.00
3.288.00
3.287.00
3.282.00
3.281.00
3.279.00
3.278.00
3.276.00
3.272.00
3.271.00
3.267.00
3.266.10
3.266.00
3.264.00
3.262.00
3.261.00
3.259.00
3.258.00
3.257.00
3.256.00
3.254.00
3.252.00
3.245.00
3.241.00
3.238.00
3.236.00
3.235.00
3.234.00
3.231.00
3.229.00
3.226.00
3.224.00
3.223.00
3.222.00
3.218.00
3.216.00
3.215.00
3.213.00
3.212.00
3.211.00
3.210.00
3.209.00
3.208.00
3.204.00
3.202.00
3.201.00
3.200.00
3.199.00
3.198.00
3.197.00
3.196.00
3.195.00
3.194.00
3.193.00
3.192.00
3.190.00
3.188.00
3.186.00
3.185.01
3.183.00
3.181.00
3.180.00
3.179.00
3.178.00
3.171.00
3.170.00
3.169.00
3.168.00
3.165.00
3.163.00
3.162.00
3.161.00
3.160.00
3.159.00
3.154.00
3.150.00
3.145.00
3.142.00
3.141.00
3.137.00
3.131.00
3.130.00
3.128.00
3.127.00
3.121.00
3.118.10
3.118.00
3.112.00
3.110.00
3.109.00
3.105.00
3.100.00
3.99.00
3.95.00
3.94.00
3.92.00
3.87.00
3.85.00
3.82.00
3.81.00
3.80.00
3.79.00
3.78.00
3.76.00
3.75.00
3.74.00
3.72.00
3.67.00
3.58.00
3.56.00
3.55.00
3.54.10
3.54.00
3.53.00
3.52.00
3.51.00
3.50.00
3.49.00
3.48.00
3.47.20
3.47.10
3.47.00
3.46.00
3.45.00
3.43.00
3.42.00
3.41.00
3.40.00
3.39.00
3.38.00
3.37.00
3.36.10
3.36.00
3.35.00
3.34.00
3.33.00
3.32.00
3.31.00
3.30.00
3.29.00
3.28.00
3.27.00
3.26.00
3.25.00
3.24.00
3.23.00
3.22.00
3.21.00
3.20.00
3.19.00
3.18.00
3.17.00
3.16.00
3.15.00
3.14.00
3.13.10
3.13.00
3.12.00
3.11.00
3.10.00
3.9.00
3.8.10
3.8.00
3.7.00
3.6.10
3.6.00
3.5.00
3.4.10
3.4.00
3.3.00
3.2.00
3.1.00
3.0.00
1.0.0-rc.100
1.0.0-rc.90
1.0.0-rc.80
1.0.0-rc.70
1.0.0-rc.60
1.0.0-rc.50
1.0.0-rc.40
1.0.0-rc.30
1.0.0-rc.20
1.0.0-rc.10
1.0.0-gamma.110
1.0.0-gamma.100
1.0.0-gamma.90
1.0.0-gamma.80
1.0.0-gamma.70
1.0.0-gamma.60
1.0.0-gamma.50
1.0.0-gamma.40
1.0.0-gamma.30
1.0.0-gamma.20
1.0.0-gamma.10
1.0.0-beta.50
1.0.0-beta.40
1.0.0-beta.30
1.0.0-beta.20
1.0.0-beta.10
1.0.0-alpha.260
1.0.0-alpha.250
1.0.0-alpha.240
1.0.0-alpha.230
1.0.0-alpha.220
1.0.0-alpha.210
1.0.0-alpha.200
1.0.0-alpha.191
1.0.0-alpha.180
1.0.0-alpha.170
1.0.0-alpha.160
1.0.0-alpha.150
1.0.0-alpha.140
1.0.0-alpha.130
1.0.0-alpha.120
1.0.0-alpha.110
1.0.0-alpha.100
1.0.0-alpha.90
1.0.0-alpha.80
1.0.0-alpha.70
1.0.0-alpha.60
1.0.0-alpha.50
1.0.0-alpha.40
1.0.0-alpha.30
1.0.0-alpha.20
1.0.0-alpha.10

Package Sidebar

Install

npm i @aws-sdk/client-mediastore

Weekly Downloads

17,530

Version

3.696.0

License

Apache-2.0

Unpacked Size

411 kB

Total Files

140

Last publish

Collaborators

  • mattsb42-aws
  • kuhe
  • amzn-oss
  • aws-sdk-bot
  • trivikr-aws