@@ -26,7 +26,7 @@ const client = new CarbonawareScheduler();
2626
2727async function main () {
2828 const schedule = await client .schedule .create ({
29- duration: ' duration ' ,
29+ duration: ' PT1H ' ,
3030 windows: [{ end: ' 2019-12-27T18:11:19.117Z' , start: ' 2019-12-27T18:11:19.117Z' }],
3131 zones: [{ provider: ' aws' , region: ' us-east-1' }],
3232 });
@@ -49,7 +49,7 @@ const client = new CarbonawareScheduler();
4949
5050async function main() {
5151 const params: CarbonawareScheduler .ScheduleCreateParams = {
52- duration: ' duration ' ,
52+ duration: ' PT1H ' ,
5353 windows: [{ end: ' 2019-12-27T18:11:19.117Z' , start: ' 2019-12-27T18:11:19.117Z' }],
5454 zones: [{ provider: ' aws' , region: ' us-east-1' }],
5555 };
@@ -72,7 +72,7 @@ a subclass of `APIError` will be thrown:
7272async function main() {
7373 const schedule = await client .schedule
7474 .create ({
75- duration: ' duration ' ,
75+ duration: ' PT1H ' ,
7676 windows: [{ end: ' 2019-12-27T18:11:19.117Z' , start: ' 2019-12-27T18:11:19.117Z' }],
7777 zones: [{ provider: ' aws' , region: ' us-east-1' }],
7878 })
@@ -119,7 +119,7 @@ const client = new CarbonawareScheduler({
119119});
120120
121121// Or, configure per-request:
122- await client .schedule .create ({ duration: ' duration ' , windows: [{ end: ' 2019-12-27T18:11:19.117Z' , start: ' 2019-12-27T18:11:19.117Z' }], zones: [{ provider: ' aws' , region: ' us-east-1' }] }, {
122+ await client .schedule .create ({ duration: ' PT1H ' , windows: [{ end: ' 2019-12-27T18:11:19.117Z' , start: ' 2019-12-27T18:11:19.117Z' }], zones: [{ provider: ' aws' , region: ' us-east-1' }] }, {
123123 maxRetries: 5 ,
124124});
125125```
@@ -136,7 +136,7 @@ const client = new CarbonawareScheduler({
136136});
137137
138138// Override per-request:
139- await client .schedule .create ({ duration: ' duration ' , windows: [{ end: ' 2019-12-27T18:11:19.117Z' , start: ' 2019-12-27T18:11:19.117Z' }], zones: [{ provider: ' aws' , region: ' us-east-1' }] }, {
139+ await client .schedule .create ({ duration: ' PT1H ' , windows: [{ end: ' 2019-12-27T18:11:19.117Z' , start: ' 2019-12-27T18:11:19.117Z' }], zones: [{ provider: ' aws' , region: ' us-east-1' }] }, {
140140 timeout: 5 * 1000 ,
141141});
142142```
@@ -161,7 +161,7 @@ const client = new CarbonawareScheduler();
161161
162162const response = await client .schedule
163163 .create ({
164- duration: ' duration ' ,
164+ duration: ' PT1H ' ,
165165 windows: [{ end: ' 2019-12-27T18:11:19.117Z' , start: ' 2019-12-27T18:11:19.117Z' }],
166166 zones: [{ provider: ' aws' , region: ' us-east-1' }],
167167 })
@@ -171,7 +171,7 @@ console.log(response.statusText); // access the underlying Response object
171171
172172const { data : schedule, response : raw } = await client .schedule
173173 .create ({
174- duration: ' duration ' ,
174+ duration: ' PT1H ' ,
175175 windows: [{ end: ' 2019-12-27T18:11:19.117Z' , start: ' 2019-12-27T18:11:19.117Z' }],
176176 zones: [{ provider: ' aws' , region: ' us-east-1' }],
177177 })
0 commit comments