@@ -34,16 +34,16 @@ using your favorite package manager:
34
34
35
35
The AWS SDK is modulized by clients and commands.
36
36
To send a request, you only need to import the ` RUMClient ` and
37
- the commands you need, for example ` CreateAppMonitorCommand ` :
37
+ the commands you need, for example ` BatchCreateRumMetricDefinitionsCommand ` :
38
38
39
39
``` js
40
40
// ES5 example
41
- const { RUMClient , CreateAppMonitorCommand } = require (" @aws-sdk/client-rum" );
41
+ const { RUMClient , BatchCreateRumMetricDefinitionsCommand } = require (" @aws-sdk/client-rum" );
42
42
```
43
43
44
44
``` ts
45
45
// ES6+ example
46
- import { RUMClient , CreateAppMonitorCommand } from " @aws-sdk/client-rum" ;
46
+ import { RUMClient , BatchCreateRumMetricDefinitionsCommand } from " @aws-sdk/client-rum" ;
47
47
```
48
48
49
49
### Usage
@@ -62,7 +62,7 @@ const client = new RUMClient({ region: "REGION" });
62
62
const params = {
63
63
/** input parameters */
64
64
};
65
- const command = new CreateAppMonitorCommand (params);
65
+ const command = new BatchCreateRumMetricDefinitionsCommand (params);
66
66
```
67
67
68
68
#### Async/await
@@ -141,15 +141,15 @@ const client = new AWS.RUM({ region: "REGION" });
141
141
142
142
// async/await.
143
143
try {
144
- const data = await client .createAppMonitor (params );
144
+ const data = await client .batchCreateRumMetricDefinitions (params );
145
145
// process data.
146
146
} catch (error ) {
147
147
// error handling.
148
148
}
149
149
150
150
// Promises.
151
151
client
152
- .createAppMonitor (params )
152
+ .batchCreateRumMetricDefinitions (params )
153
153
.then ((data ) => {
154
154
// process data.
155
155
})
@@ -158,7 +158,7 @@ client
158
158
});
159
159
160
160
// callbacks.
161
- client .createAppMonitor (params , (err , data ) => {
161
+ client .batchCreateRumMetricDefinitions (params , (err , data ) => {
162
162
// process err and data.
163
163
});
164
164
```
0 commit comments