1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle {
pub(crate) client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
pub(crate) conf: crate::Config,
}
/// Client for AWS Data Pipeline
///
/// Client for invoking operations on AWS Data Pipeline. Each operation on AWS Data Pipeline is a method on this
/// this struct. `.send()` MUST be invoked on the generated operations to dispatch the request to the service.
///
/// # Examples
/// **Constructing a client and invoking an operation**
/// ```rust,no_run
/// # async fn docs() {
/// // create a shared configuration. This can be used & shared between multiple service clients.
/// let shared_config = aws_config::load_from_env().await;
/// let client = aws_sdk_datapipeline::Client::new(&shared_config);
/// // invoke an operation
/// /* let rsp = client
/// .<operation_name>().
/// .<param>("some value")
/// .send().await; */
/// # }
/// ```
/// **Constructing a client with custom configuration**
/// ```rust,no_run
/// use aws_config::retry::RetryConfig;
/// # async fn docs() {
/// let shared_config = aws_config::load_from_env().await;
/// let config = aws_sdk_datapipeline::config::Builder::from(&shared_config)
/// .retry_config(RetryConfig::disabled())
/// .build();
/// let client = aws_sdk_datapipeline::Client::from_conf(config);
/// # }
#[derive(std::fmt::Debug)]
pub struct Client {
handle: std::sync::Arc<Handle>,
}
impl std::clone::Clone for Client {
fn clone(&self) -> Self {
Self {
handle: self.handle.clone(),
}
}
}
#[doc(inline)]
pub use aws_smithy_client::Builder;
impl
From<
aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
> for Client
{
fn from(
client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
) -> Self {
Self::with_config(client, crate::Config::builder().build())
}
}
impl Client {
/// Creates a client with the given service configuration.
pub fn with_config(
client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
conf: crate::Config,
) -> Self {
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
/// Returns the client's configuration.
pub fn conf(&self) -> &crate::Config {
&self.handle.conf
}
}
impl Client {
/// Constructs a fluent builder for the [`ActivatePipeline`](crate::client::fluent_builders::ActivatePipeline) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::ActivatePipeline::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::ActivatePipeline::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - [`parameter_values(Vec<ParameterValue>)`](crate::client::fluent_builders::ActivatePipeline::parameter_values) / [`set_parameter_values(Option<Vec<ParameterValue>>)`](crate::client::fluent_builders::ActivatePipeline::set_parameter_values): <p>A list of parameter values to pass to the pipeline at activation.</p>
/// - [`start_timestamp(DateTime)`](crate::client::fluent_builders::ActivatePipeline::start_timestamp) / [`set_start_timestamp(Option<DateTime>)`](crate::client::fluent_builders::ActivatePipeline::set_start_timestamp): <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
/// - On success, responds with [`ActivatePipelineOutput`](crate::output::ActivatePipelineOutput)
/// - On failure, responds with [`SdkError<ActivatePipelineError>`](crate::error::ActivatePipelineError)
pub fn activate_pipeline(&self) -> fluent_builders::ActivatePipeline {
fluent_builders::ActivatePipeline::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`AddTags`](crate::client::fluent_builders::AddTags) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::AddTags::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::AddTags::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::AddTags::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::AddTags::set_tags): <p>The tags to add, as key/value pairs.</p>
/// - On success, responds with [`AddTagsOutput`](crate::output::AddTagsOutput)
/// - On failure, responds with [`SdkError<AddTagsError>`](crate::error::AddTagsError)
pub fn add_tags(&self) -> fluent_builders::AddTags {
fluent_builders::AddTags::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreatePipeline`](crate::client::fluent_builders::CreatePipeline) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreatePipeline::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreatePipeline::set_name): <p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>
/// - [`unique_id(impl Into<String>)`](crate::client::fluent_builders::CreatePipeline::unique_id) / [`set_unique_id(Option<String>)`](crate::client::fluent_builders::CreatePipeline::set_unique_id): <p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::CreatePipeline::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::CreatePipeline::set_description): <p>The description for the pipeline.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::CreatePipeline::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::CreatePipeline::set_tags): <p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
/// - On success, responds with [`CreatePipelineOutput`](crate::output::CreatePipelineOutput) with field(s):
/// - [`pipeline_id(Option<String>)`](crate::output::CreatePipelineOutput::pipeline_id): <p>The ID that AWS Data Pipeline assigns the newly created pipeline. For example, <code>df-06372391ZG65EXAMPLE</code>.</p>
/// - On failure, responds with [`SdkError<CreatePipelineError>`](crate::error::CreatePipelineError)
pub fn create_pipeline(&self) -> fluent_builders::CreatePipeline {
fluent_builders::CreatePipeline::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeactivatePipeline`](crate::client::fluent_builders::DeactivatePipeline) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::DeactivatePipeline::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::DeactivatePipeline::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - [`cancel_active(bool)`](crate::client::fluent_builders::DeactivatePipeline::cancel_active) / [`set_cancel_active(Option<bool>)`](crate::client::fluent_builders::DeactivatePipeline::set_cancel_active): <p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>
/// - On success, responds with [`DeactivatePipelineOutput`](crate::output::DeactivatePipelineOutput)
/// - On failure, responds with [`SdkError<DeactivatePipelineError>`](crate::error::DeactivatePipelineError)
pub fn deactivate_pipeline(&self) -> fluent_builders::DeactivatePipeline {
fluent_builders::DeactivatePipeline::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeletePipeline`](crate::client::fluent_builders::DeletePipeline) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::DeletePipeline::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::DeletePipeline::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - On success, responds with [`DeletePipelineOutput`](crate::output::DeletePipelineOutput)
/// - On failure, responds with [`SdkError<DeletePipelineError>`](crate::error::DeletePipelineError)
pub fn delete_pipeline(&self) -> fluent_builders::DeletePipeline {
fluent_builders::DeletePipeline::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DescribeObjects`](crate::client::fluent_builders::DescribeObjects) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::DescribeObjects::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::DescribeObjects::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::DescribeObjects::set_pipeline_id): <p>The ID of the pipeline that contains the object definitions.</p>
/// - [`object_ids(Vec<String>)`](crate::client::fluent_builders::DescribeObjects::object_ids) / [`set_object_ids(Option<Vec<String>>)`](crate::client::fluent_builders::DescribeObjects::set_object_ids): <p>The IDs of the pipeline objects that contain the definitions to be described. You can pass as many as 25 identifiers in a single call to <code>DescribeObjects</code>.</p>
/// - [`evaluate_expressions(bool)`](crate::client::fluent_builders::DescribeObjects::evaluate_expressions) / [`set_evaluate_expressions(bool)`](crate::client::fluent_builders::DescribeObjects::set_evaluate_expressions): <p>Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.</p>
/// - [`marker(impl Into<String>)`](crate::client::fluent_builders::DescribeObjects::marker) / [`set_marker(Option<String>)`](crate::client::fluent_builders::DescribeObjects::set_marker): <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>DescribeObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
/// - On success, responds with [`DescribeObjectsOutput`](crate::output::DescribeObjectsOutput) with field(s):
/// - [`pipeline_objects(Option<Vec<PipelineObject>>)`](crate::output::DescribeObjectsOutput::pipeline_objects): <p>An array of object definitions.</p>
/// - [`marker(Option<String>)`](crate::output::DescribeObjectsOutput::marker): <p>The starting point for the next page of results. To view the next page of results, call <code>DescribeObjects</code> again with this marker value. If the value is null, there are no more results.</p>
/// - [`has_more_results(bool)`](crate::output::DescribeObjectsOutput::has_more_results): <p>Indicates whether there are more results to return.</p>
/// - On failure, responds with [`SdkError<DescribeObjectsError>`](crate::error::DescribeObjectsError)
pub fn describe_objects(&self) -> fluent_builders::DescribeObjects {
fluent_builders::DescribeObjects::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DescribePipelines`](crate::client::fluent_builders::DescribePipelines) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_ids(Vec<String>)`](crate::client::fluent_builders::DescribePipelines::pipeline_ids) / [`set_pipeline_ids(Option<Vec<String>>)`](crate::client::fluent_builders::DescribePipelines::set_pipeline_ids): <p>The IDs of the pipelines to describe. You can pass as many as 25 identifiers in a single call. To obtain pipeline IDs, call <code>ListPipelines</code>.</p>
/// - On success, responds with [`DescribePipelinesOutput`](crate::output::DescribePipelinesOutput) with field(s):
/// - [`pipeline_description_list(Option<Vec<PipelineDescription>>)`](crate::output::DescribePipelinesOutput::pipeline_description_list): <p>An array of descriptions for the specified pipelines.</p>
/// - On failure, responds with [`SdkError<DescribePipelinesError>`](crate::error::DescribePipelinesError)
pub fn describe_pipelines(&self) -> fluent_builders::DescribePipelines {
fluent_builders::DescribePipelines::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`EvaluateExpression`](crate::client::fluent_builders::EvaluateExpression) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::EvaluateExpression::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::EvaluateExpression::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - [`object_id(impl Into<String>)`](crate::client::fluent_builders::EvaluateExpression::object_id) / [`set_object_id(Option<String>)`](crate::client::fluent_builders::EvaluateExpression::set_object_id): <p>The ID of the object.</p>
/// - [`expression(impl Into<String>)`](crate::client::fluent_builders::EvaluateExpression::expression) / [`set_expression(Option<String>)`](crate::client::fluent_builders::EvaluateExpression::set_expression): <p>The expression to evaluate.</p>
/// - On success, responds with [`EvaluateExpressionOutput`](crate::output::EvaluateExpressionOutput) with field(s):
/// - [`evaluated_expression(Option<String>)`](crate::output::EvaluateExpressionOutput::evaluated_expression): <p>The evaluated expression.</p>
/// - On failure, responds with [`SdkError<EvaluateExpressionError>`](crate::error::EvaluateExpressionError)
pub fn evaluate_expression(&self) -> fluent_builders::EvaluateExpression {
fluent_builders::EvaluateExpression::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetPipelineDefinition`](crate::client::fluent_builders::GetPipelineDefinition) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::GetPipelineDefinition::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::GetPipelineDefinition::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - [`version(impl Into<String>)`](crate::client::fluent_builders::GetPipelineDefinition::version) / [`set_version(Option<String>)`](crate::client::fluent_builders::GetPipelineDefinition::set_version): <p>The version of the pipeline definition to retrieve. Set this parameter to <code>latest</code> (default) to use the last definition saved to the pipeline or <code>active</code> to use the last definition that was activated.</p>
/// - On success, responds with [`GetPipelineDefinitionOutput`](crate::output::GetPipelineDefinitionOutput) with field(s):
/// - [`pipeline_objects(Option<Vec<PipelineObject>>)`](crate::output::GetPipelineDefinitionOutput::pipeline_objects): <p>The objects defined in the pipeline.</p>
/// - [`parameter_objects(Option<Vec<ParameterObject>>)`](crate::output::GetPipelineDefinitionOutput::parameter_objects): <p>The parameter objects used in the pipeline definition.</p>
/// - [`parameter_values(Option<Vec<ParameterValue>>)`](crate::output::GetPipelineDefinitionOutput::parameter_values): <p>The parameter values used in the pipeline definition.</p>
/// - On failure, responds with [`SdkError<GetPipelineDefinitionError>`](crate::error::GetPipelineDefinitionError)
pub fn get_pipeline_definition(&self) -> fluent_builders::GetPipelineDefinition {
fluent_builders::GetPipelineDefinition::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListPipelines`](crate::client::fluent_builders::ListPipelines) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListPipelines::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`marker(impl Into<String>)`](crate::client::fluent_builders::ListPipelines::marker) / [`set_marker(Option<String>)`](crate::client::fluent_builders::ListPipelines::set_marker): <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>ListPipelines</code> with the marker value from the previous call to retrieve the next set of results.</p>
/// - On success, responds with [`ListPipelinesOutput`](crate::output::ListPipelinesOutput) with field(s):
/// - [`pipeline_id_list(Option<Vec<PipelineIdName>>)`](crate::output::ListPipelinesOutput::pipeline_id_list): <p>The pipeline identifiers. If you require additional information about the pipelines, you can use these identifiers to call <code>DescribePipelines</code> and <code>GetPipelineDefinition</code>.</p>
/// - [`marker(Option<String>)`](crate::output::ListPipelinesOutput::marker): <p>The starting point for the next page of results. To view the next page of results, call <code>ListPipelinesOutput</code> again with this marker value. If the value is null, there are no more results.</p>
/// - [`has_more_results(bool)`](crate::output::ListPipelinesOutput::has_more_results): <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
/// - On failure, responds with [`SdkError<ListPipelinesError>`](crate::error::ListPipelinesError)
pub fn list_pipelines(&self) -> fluent_builders::ListPipelines {
fluent_builders::ListPipelines::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PollForTask`](crate::client::fluent_builders::PollForTask) operation.
///
/// - The fluent builder is configurable:
/// - [`worker_group(impl Into<String>)`](crate::client::fluent_builders::PollForTask::worker_group) / [`set_worker_group(Option<String>)`](crate::client::fluent_builders::PollForTask::set_worker_group): <p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code> in the call to <code>PollForTask</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>
/// - [`hostname(impl Into<String>)`](crate::client::fluent_builders::PollForTask::hostname) / [`set_hostname(Option<String>)`](crate::client::fluent_builders::PollForTask::set_hostname): <p>The public DNS name of the calling task runner.</p>
/// - [`instance_identity(InstanceIdentity)`](crate::client::fluent_builders::PollForTask::instance_identity) / [`set_instance_identity(Option<InstanceIdentity>)`](crate::client::fluent_builders::PollForTask::set_instance_identity): <p>Identity information for the EC2 instance that is hosting the task runner. You can get this value from the instance using <code>http://169.254.169.254/latest/meta-data/instance-id</code>. For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html">Instance Metadata</a> in the <i>Amazon Elastic Compute Cloud User Guide.</i> Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.</p>
/// - On success, responds with [`PollForTaskOutput`](crate::output::PollForTaskOutput) with field(s):
/// - [`task_object(Option<TaskObject>)`](crate::output::PollForTaskOutput::task_object): <p>The information needed to complete the task that is being assigned to the task runner. One of the fields returned in this object is <code>taskId</code>, which contains an identifier for the task being assigned. The calling task runner uses <code>taskId</code> in subsequent calls to <code>ReportTaskProgress</code> and <code>SetTaskStatus</code>.</p>
/// - On failure, responds with [`SdkError<PollForTaskError>`](crate::error::PollForTaskError)
pub fn poll_for_task(&self) -> fluent_builders::PollForTask {
fluent_builders::PollForTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PutPipelineDefinition`](crate::client::fluent_builders::PutPipelineDefinition) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::PutPipelineDefinition::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::PutPipelineDefinition::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - [`pipeline_objects(Vec<PipelineObject>)`](crate::client::fluent_builders::PutPipelineDefinition::pipeline_objects) / [`set_pipeline_objects(Option<Vec<PipelineObject>>)`](crate::client::fluent_builders::PutPipelineDefinition::set_pipeline_objects): <p>The objects that define the pipeline. These objects overwrite the existing pipeline definition.</p>
/// - [`parameter_objects(Vec<ParameterObject>)`](crate::client::fluent_builders::PutPipelineDefinition::parameter_objects) / [`set_parameter_objects(Option<Vec<ParameterObject>>)`](crate::client::fluent_builders::PutPipelineDefinition::set_parameter_objects): <p>The parameter objects used with the pipeline.</p>
/// - [`parameter_values(Vec<ParameterValue>)`](crate::client::fluent_builders::PutPipelineDefinition::parameter_values) / [`set_parameter_values(Option<Vec<ParameterValue>>)`](crate::client::fluent_builders::PutPipelineDefinition::set_parameter_values): <p>The parameter values used with the pipeline.</p>
/// - On success, responds with [`PutPipelineDefinitionOutput`](crate::output::PutPipelineDefinitionOutput) with field(s):
/// - [`validation_errors(Option<Vec<ValidationError>>)`](crate::output::PutPipelineDefinitionOutput::validation_errors): <p>The validation errors that are associated with the objects defined in <code>pipelineObjects</code>.</p>
/// - [`validation_warnings(Option<Vec<ValidationWarning>>)`](crate::output::PutPipelineDefinitionOutput::validation_warnings): <p>The validation warnings that are associated with the objects defined in <code>pipelineObjects</code>.</p>
/// - [`errored(bool)`](crate::output::PutPipelineDefinitionOutput::errored): <p>Indicates whether there were validation errors, and the pipeline definition is stored but cannot be activated until you correct the pipeline and call <code>PutPipelineDefinition</code> to commit the corrected pipeline.</p>
/// - On failure, responds with [`SdkError<PutPipelineDefinitionError>`](crate::error::PutPipelineDefinitionError)
pub fn put_pipeline_definition(&self) -> fluent_builders::PutPipelineDefinition {
fluent_builders::PutPipelineDefinition::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`QueryObjects`](crate::client::fluent_builders::QueryObjects) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::QueryObjects::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::QueryObjects::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::QueryObjects::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - [`query(Query)`](crate::client::fluent_builders::QueryObjects::query) / [`set_query(Option<Query>)`](crate::client::fluent_builders::QueryObjects::set_query): <p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>
/// - [`sphere(impl Into<String>)`](crate::client::fluent_builders::QueryObjects::sphere) / [`set_sphere(Option<String>)`](crate::client::fluent_builders::QueryObjects::set_sphere): <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
/// - [`marker(impl Into<String>)`](crate::client::fluent_builders::QueryObjects::marker) / [`set_marker(Option<String>)`](crate::client::fluent_builders::QueryObjects::set_marker): <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
/// - [`limit(i32)`](crate::client::fluent_builders::QueryObjects::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::QueryObjects::set_limit): <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100. </p>
/// - On success, responds with [`QueryObjectsOutput`](crate::output::QueryObjectsOutput) with field(s):
/// - [`ids(Option<Vec<String>>)`](crate::output::QueryObjectsOutput::ids): <p>The identifiers that match the query selectors.</p>
/// - [`marker(Option<String>)`](crate::output::QueryObjectsOutput::marker): <p>The starting point for the next page of results. To view the next page of results, call <code>QueryObjects</code> again with this marker value. If the value is null, there are no more results.</p>
/// - [`has_more_results(bool)`](crate::output::QueryObjectsOutput::has_more_results): <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
/// - On failure, responds with [`SdkError<QueryObjectsError>`](crate::error::QueryObjectsError)
pub fn query_objects(&self) -> fluent_builders::QueryObjects {
fluent_builders::QueryObjects::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`RemoveTags`](crate::client::fluent_builders::RemoveTags) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::RemoveTags::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::RemoveTags::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - [`tag_keys(Vec<String>)`](crate::client::fluent_builders::RemoveTags::tag_keys) / [`set_tag_keys(Option<Vec<String>>)`](crate::client::fluent_builders::RemoveTags::set_tag_keys): <p>The keys of the tags to remove.</p>
/// - On success, responds with [`RemoveTagsOutput`](crate::output::RemoveTagsOutput)
/// - On failure, responds with [`SdkError<RemoveTagsError>`](crate::error::RemoveTagsError)
pub fn remove_tags(&self) -> fluent_builders::RemoveTags {
fluent_builders::RemoveTags::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ReportTaskProgress`](crate::client::fluent_builders::ReportTaskProgress) operation.
///
/// - The fluent builder is configurable:
/// - [`task_id(impl Into<String>)`](crate::client::fluent_builders::ReportTaskProgress::task_id) / [`set_task_id(Option<String>)`](crate::client::fluent_builders::ReportTaskProgress::set_task_id): <p>The ID of the task assigned to the task runner. This value is provided in the response for <code>PollForTask</code>.</p>
/// - [`fields(Vec<Field>)`](crate::client::fluent_builders::ReportTaskProgress::fields) / [`set_fields(Option<Vec<Field>>)`](crate::client::fluent_builders::ReportTaskProgress::set_fields): <p>Key-value pairs that define the properties of the ReportTaskProgressInput object.</p>
/// - On success, responds with [`ReportTaskProgressOutput`](crate::output::ReportTaskProgressOutput) with field(s):
/// - [`canceled(bool)`](crate::output::ReportTaskProgressOutput::canceled): <p>If true, the calling task runner should cancel processing of the task. The task runner does not need to call <code>SetTaskStatus</code> for canceled tasks.</p>
/// - On failure, responds with [`SdkError<ReportTaskProgressError>`](crate::error::ReportTaskProgressError)
pub fn report_task_progress(&self) -> fluent_builders::ReportTaskProgress {
fluent_builders::ReportTaskProgress::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ReportTaskRunnerHeartbeat`](crate::client::fluent_builders::ReportTaskRunnerHeartbeat) operation.
///
/// - The fluent builder is configurable:
/// - [`taskrunner_id(impl Into<String>)`](crate::client::fluent_builders::ReportTaskRunnerHeartbeat::taskrunner_id) / [`set_taskrunner_id(Option<String>)`](crate::client::fluent_builders::ReportTaskRunnerHeartbeat::set_taskrunner_id): <p>The ID of the task runner. This value should be unique across your AWS account. In the case of AWS Data Pipeline Task Runner launched on a resource managed by AWS Data Pipeline, the web service provides a unique identifier when it launches the application. If you have written a custom task runner, you should assign a unique identifier for the task runner.</p>
/// - [`worker_group(impl Into<String>)`](crate::client::fluent_builders::ReportTaskRunnerHeartbeat::worker_group) / [`set_worker_group(Option<String>)`](crate::client::fluent_builders::ReportTaskRunnerHeartbeat::set_worker_group): <p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>
/// - [`hostname(impl Into<String>)`](crate::client::fluent_builders::ReportTaskRunnerHeartbeat::hostname) / [`set_hostname(Option<String>)`](crate::client::fluent_builders::ReportTaskRunnerHeartbeat::set_hostname): <p>The public DNS name of the task runner.</p>
/// - On success, responds with [`ReportTaskRunnerHeartbeatOutput`](crate::output::ReportTaskRunnerHeartbeatOutput) with field(s):
/// - [`terminate(bool)`](crate::output::ReportTaskRunnerHeartbeatOutput::terminate): <p>Indicates whether the calling task runner should terminate.</p>
/// - On failure, responds with [`SdkError<ReportTaskRunnerHeartbeatError>`](crate::error::ReportTaskRunnerHeartbeatError)
pub fn report_task_runner_heartbeat(&self) -> fluent_builders::ReportTaskRunnerHeartbeat {
fluent_builders::ReportTaskRunnerHeartbeat::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`SetStatus`](crate::client::fluent_builders::SetStatus) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::SetStatus::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::SetStatus::set_pipeline_id): <p>The ID of the pipeline that contains the objects.</p>
/// - [`object_ids(Vec<String>)`](crate::client::fluent_builders::SetStatus::object_ids) / [`set_object_ids(Option<Vec<String>>)`](crate::client::fluent_builders::SetStatus::set_object_ids): <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
/// - [`status(impl Into<String>)`](crate::client::fluent_builders::SetStatus::status) / [`set_status(Option<String>)`](crate::client::fluent_builders::SetStatus::set_status): <p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>
/// - On success, responds with [`SetStatusOutput`](crate::output::SetStatusOutput)
/// - On failure, responds with [`SdkError<SetStatusError>`](crate::error::SetStatusError)
pub fn set_status(&self) -> fluent_builders::SetStatus {
fluent_builders::SetStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`SetTaskStatus`](crate::client::fluent_builders::SetTaskStatus) operation.
///
/// - The fluent builder is configurable:
/// - [`task_id(impl Into<String>)`](crate::client::fluent_builders::SetTaskStatus::task_id) / [`set_task_id(Option<String>)`](crate::client::fluent_builders::SetTaskStatus::set_task_id): <p>The ID of the task assigned to the task runner. This value is provided in the response for <code>PollForTask</code>.</p>
/// - [`task_status(TaskStatus)`](crate::client::fluent_builders::SetTaskStatus::task_status) / [`set_task_status(Option<TaskStatus>)`](crate::client::fluent_builders::SetTaskStatus::set_task_status): <p>If <code>FINISHED</code>, the task successfully completed. If <code>FAILED</code>, the task ended unsuccessfully. Preconditions use false.</p>
/// - [`error_id(impl Into<String>)`](crate::client::fluent_builders::SetTaskStatus::error_id) / [`set_error_id(Option<String>)`](crate::client::fluent_builders::SetTaskStatus::set_error_id): <p>If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.</p>
/// - [`error_message(impl Into<String>)`](crate::client::fluent_builders::SetTaskStatus::error_message) / [`set_error_message(Option<String>)`](crate::client::fluent_builders::SetTaskStatus::set_error_message): <p>If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>
/// - [`error_stack_trace(impl Into<String>)`](crate::client::fluent_builders::SetTaskStatus::error_stack_trace) / [`set_error_stack_trace(Option<String>)`](crate::client::fluent_builders::SetTaskStatus::set_error_stack_trace): <p>If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>
/// - On success, responds with [`SetTaskStatusOutput`](crate::output::SetTaskStatusOutput)
/// - On failure, responds with [`SdkError<SetTaskStatusError>`](crate::error::SetTaskStatusError)
pub fn set_task_status(&self) -> fluent_builders::SetTaskStatus {
fluent_builders::SetTaskStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ValidatePipelineDefinition`](crate::client::fluent_builders::ValidatePipelineDefinition) operation.
///
/// - The fluent builder is configurable:
/// - [`pipeline_id(impl Into<String>)`](crate::client::fluent_builders::ValidatePipelineDefinition::pipeline_id) / [`set_pipeline_id(Option<String>)`](crate::client::fluent_builders::ValidatePipelineDefinition::set_pipeline_id): <p>The ID of the pipeline.</p>
/// - [`pipeline_objects(Vec<PipelineObject>)`](crate::client::fluent_builders::ValidatePipelineDefinition::pipeline_objects) / [`set_pipeline_objects(Option<Vec<PipelineObject>>)`](crate::client::fluent_builders::ValidatePipelineDefinition::set_pipeline_objects): <p>The objects that define the pipeline changes to validate against the pipeline.</p>
/// - [`parameter_objects(Vec<ParameterObject>)`](crate::client::fluent_builders::ValidatePipelineDefinition::parameter_objects) / [`set_parameter_objects(Option<Vec<ParameterObject>>)`](crate::client::fluent_builders::ValidatePipelineDefinition::set_parameter_objects): <p>The parameter objects used with the pipeline.</p>
/// - [`parameter_values(Vec<ParameterValue>)`](crate::client::fluent_builders::ValidatePipelineDefinition::parameter_values) / [`set_parameter_values(Option<Vec<ParameterValue>>)`](crate::client::fluent_builders::ValidatePipelineDefinition::set_parameter_values): <p>The parameter values used with the pipeline.</p>
/// - On success, responds with [`ValidatePipelineDefinitionOutput`](crate::output::ValidatePipelineDefinitionOutput) with field(s):
/// - [`validation_errors(Option<Vec<ValidationError>>)`](crate::output::ValidatePipelineDefinitionOutput::validation_errors): <p>Any validation errors that were found.</p>
/// - [`validation_warnings(Option<Vec<ValidationWarning>>)`](crate::output::ValidatePipelineDefinitionOutput::validation_warnings): <p>Any validation warnings that were found.</p>
/// - [`errored(bool)`](crate::output::ValidatePipelineDefinitionOutput::errored): <p>Indicates whether there were validation errors.</p>
/// - On failure, responds with [`SdkError<ValidatePipelineDefinitionError>`](crate::error::ValidatePipelineDefinitionError)
pub fn validate_pipeline_definition(&self) -> fluent_builders::ValidatePipelineDefinition {
fluent_builders::ValidatePipelineDefinition::new(self.handle.clone())
}
}
pub mod fluent_builders {
//! Utilities to ergonomically construct a request to the service.
//!
//! Fluent builders are created through the [`Client`](crate::client::Client) by calling
//! one if its operation methods. After parameters are set using the builder methods,
//! the `send` method can be called to initiate the request.
/// Fluent builder constructing a request to `ActivatePipeline`.
///
/// <p>Validates the specified pipeline and starts processing pipeline tasks. If the pipeline does not pass validation, activation fails.</p>
/// <p>If you need to pause the pipeline to investigate an issue with a component, such as a data source or script, call <code>DeactivatePipeline</code>.</p>
/// <p>To activate a finished pipeline, modify the end date for the pipeline and then activate it.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ActivatePipeline Content-Length: 39 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE"}
/// </request>
/// <response>
/// HTTP/1.1 200 x-amzn-RequestId: ee19d5bf-074e-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 2 Date: Mon, 12 Nov 2012 17:50:53 GMT {}
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ActivatePipeline {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::activate_pipeline_input::Builder,
}
impl ActivatePipeline {
/// Creates a new `ActivatePipeline`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ActivatePipeline,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ActivatePipelineError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ActivatePipelineOutput,
aws_smithy_http::result::SdkError<crate::error::ActivatePipelineError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// Appends an item to `parameterValues`.
///
/// To override the contents of this collection use [`set_parameter_values`](Self::set_parameter_values).
///
/// <p>A list of parameter values to pass to the pipeline at activation.</p>
pub fn parameter_values(mut self, input: crate::model::ParameterValue) -> Self {
self.inner = self.inner.parameter_values(input);
self
}
/// <p>A list of parameter values to pass to the pipeline at activation.</p>
pub fn set_parameter_values(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ParameterValue>>,
) -> Self {
self.inner = self.inner.set_parameter_values(input);
self
}
/// <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
pub fn start_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inner = self.inner.start_timestamp(input);
self
}
/// <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
pub fn set_start_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inner = self.inner.set_start_timestamp(input);
self
}
}
/// Fluent builder constructing a request to `AddTags`.
///
/// <p>Adds or modifies tags for the specified pipeline.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct AddTags {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::add_tags_input::Builder,
}
impl AddTags {
/// Creates a new `AddTags`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::AddTags,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::AddTagsError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AddTagsOutput,
aws_smithy_http::result::SdkError<crate::error::AddTagsError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags to add, as key/value pairs.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>The tags to add, as key/value pairs.</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `CreatePipeline`.
///
/// <p>Creates a new, empty pipeline. Use <code>PutPipelineDefinition</code> to populate the pipeline.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.CreatePipeline Content-Length: 91 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"name": "myPipeline", "uniqueId": "123456789", "description": "This is my first pipeline"}
/// </request>
/// <response>
/// HTTP/1.1 200 x-amzn-RequestId: b16911ce-0774-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 40 Date: Mon, 12 Nov 2012 17:50:53 GMT {"pipelineId": "df-06372391ZG65EXAMPLE"}
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreatePipeline {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_pipeline_input::Builder,
}
impl CreatePipeline {
/// Creates a new `CreatePipeline`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreatePipeline,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreatePipelineError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreatePipelineOutput,
aws_smithy_http::result::SdkError<crate::error::CreatePipelineError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>
pub fn unique_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.unique_id(input.into());
self
}
/// <p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>
pub fn set_unique_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_unique_id(input);
self
}
/// <p>The description for the pipeline.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(input.into());
self
}
/// <p>The description for the pipeline.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `DeactivatePipeline`.
///
/// <p>Deactivates the specified running pipeline. The pipeline is set to the <code>DEACTIVATING</code> state until the deactivation process completes.</p>
/// <p>To resume a deactivated pipeline, use <code>ActivatePipeline</code>. By default, the pipeline resumes from the last completed execution. Optionally, you can specify the date and time to resume the pipeline.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeactivatePipeline {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::deactivate_pipeline_input::Builder,
}
impl DeactivatePipeline {
/// Creates a new `DeactivatePipeline`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DeactivatePipeline,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DeactivatePipelineError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeactivatePipelineOutput,
aws_smithy_http::result::SdkError<crate::error::DeactivatePipelineError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// <p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>
pub fn cancel_active(mut self, input: bool) -> Self {
self.inner = self.inner.cancel_active(input);
self
}
/// <p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>
pub fn set_cancel_active(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_cancel_active(input);
self
}
}
/// Fluent builder constructing a request to `DeletePipeline`.
///
/// <p>Deletes a pipeline, its pipeline definition, and its run history. AWS Data Pipeline attempts to cancel instances associated with the pipeline that are currently being processed by task runners.</p>
/// <p>Deleting a pipeline cannot be undone. You cannot query or restore a deleted pipeline. To temporarily pause a pipeline instead of deleting it, call <code>SetStatus</code> with the status set to <code>PAUSE</code> on individual components. Components that are paused by <code>SetStatus</code> can be resumed.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.DeletePipeline Content-Length: 50 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE"}
/// </request>
/// <response>
/// x-amzn-RequestId: b7a88c81-0754-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 0 Date: Mon, 12 Nov 2012 17:50:53 GMT Unexpected response: 200, OK, undefined
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeletePipeline {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::delete_pipeline_input::Builder,
}
impl DeletePipeline {
/// Creates a new `DeletePipeline`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DeletePipeline,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DeletePipelineError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeletePipelineOutput,
aws_smithy_http::result::SdkError<crate::error::DeletePipelineError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeObjects`.
///
/// <p>Gets the object definitions for a set of objects associated with the pipeline. Object definitions are composed of a set of fields that define the properties of the object.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.DescribeObjects Content-Length: 98 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE", "objectIds": ["Schedule"], "evaluateExpressions": true}
/// </request>
/// <response>
/// x-amzn-RequestId: 4c18ea5d-0777-11e2-8a14-21bb8a1f50ef Content-Type: application/x-amz-json-1.1 Content-Length: 1488 Date: Mon, 12 Nov 2012 17:50:53 GMT {"hasMoreResults": false, "pipelineObjects": [ {"fields": [ {"key": "startDateTime", "stringValue": "2012-12-12T00:00:00"}, {"key": "parent", "refValue": "Default"}, {"key": "@sphere", "stringValue": "COMPONENT"}, {"key": "type", "stringValue": "Schedule"}, {"key": "period", "stringValue": "1 hour"}, {"key": "endDateTime", "stringValue": "2012-12-21T18:00:00"}, {"key": "@version", "stringValue": "1"}, {"key": "@status", "stringValue": "PENDING"}, {"key": "@pipelineId", "stringValue": "df-06372391ZG65EXAMPLE"} ], "id": "Schedule", "name": "Schedule"} ] }
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DescribeObjects {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::describe_objects_input::Builder,
}
impl DescribeObjects {
/// Creates a new `DescribeObjects`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DescribeObjects,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DescribeObjectsError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeObjectsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeObjectsError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::DescribeObjectsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::DescribeObjectsPaginator {
crate::paginator::DescribeObjectsPaginator::new(self.handle, self.inner)
}
/// <p>The ID of the pipeline that contains the object definitions.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline that contains the object definitions.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// Appends an item to `objectIds`.
///
/// To override the contents of this collection use [`set_object_ids`](Self::set_object_ids).
///
/// <p>The IDs of the pipeline objects that contain the definitions to be described. You can pass as many as 25 identifiers in a single call to <code>DescribeObjects</code>.</p>
pub fn object_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.object_ids(input.into());
self
}
/// <p>The IDs of the pipeline objects that contain the definitions to be described. You can pass as many as 25 identifiers in a single call to <code>DescribeObjects</code>.</p>
pub fn set_object_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_object_ids(input);
self
}
/// <p>Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.</p>
pub fn evaluate_expressions(mut self, input: bool) -> Self {
self.inner = self.inner.evaluate_expressions(input);
self
}
/// <p>Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.</p>
pub fn set_evaluate_expressions(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_evaluate_expressions(input);
self
}
/// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>DescribeObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
pub fn marker(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.marker(input.into());
self
}
/// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>DescribeObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
pub fn set_marker(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_marker(input);
self
}
}
/// Fluent builder constructing a request to `DescribePipelines`.
///
/// <p>Retrieves metadata about one or more pipelines. The information retrieved includes the name of the pipeline, the pipeline identifier, its current state, and the user account that owns the pipeline. Using account credentials, you can retrieve metadata about pipelines that you or your IAM users have created. If you are using an IAM user account, you can retrieve metadata about only those pipelines for which you have read permissions.</p>
/// <p>To retrieve the full pipeline definition instead of metadata about the pipeline, call <code>GetPipelineDefinition</code>.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.DescribePipelines Content-Length: 70 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineIds": ["df-08785951KAKJEXAMPLE"] }
/// </request>
/// <response>
/// x-amzn-RequestId: 02870eb7-0736-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 767 Date: Mon, 12 Nov 2012 17:50:53 GMT {"pipelineDescriptionList": [ {"description": "This is my first pipeline", "fields": [ {"key": "@pipelineState", "stringValue": "SCHEDULED"}, {"key": "description", "stringValue": "This is my first pipeline"}, {"key": "name", "stringValue": "myPipeline"}, {"key": "@creationTime", "stringValue": "2012-12-13T01:24:06"}, {"key": "@id", "stringValue": "df-0937003356ZJEXAMPLE"}, {"key": "@sphere", "stringValue": "PIPELINE"}, {"key": "@version", "stringValue": "1"}, {"key": "@userId", "stringValue": "924374875933"}, {"key": "@accountId", "stringValue": "924374875933"}, {"key": "uniqueId", "stringValue": "1234567890"} ], "name": "myPipeline", "pipelineId": "df-0937003356ZJEXAMPLE"} ] }
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DescribePipelines {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::describe_pipelines_input::Builder,
}
impl DescribePipelines {
/// Creates a new `DescribePipelines`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DescribePipelines,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DescribePipelinesError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribePipelinesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribePipelinesError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Appends an item to `pipelineIds`.
///
/// To override the contents of this collection use [`set_pipeline_ids`](Self::set_pipeline_ids).
///
/// <p>The IDs of the pipelines to describe. You can pass as many as 25 identifiers in a single call. To obtain pipeline IDs, call <code>ListPipelines</code>.</p>
pub fn pipeline_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_ids(input.into());
self
}
/// <p>The IDs of the pipelines to describe. You can pass as many as 25 identifiers in a single call. To obtain pipeline IDs, call <code>ListPipelines</code>.</p>
pub fn set_pipeline_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_pipeline_ids(input);
self
}
}
/// Fluent builder constructing a request to `EvaluateExpression`.
///
/// <p>Task runners call <code>EvaluateExpression</code> to evaluate a string in the context of the specified object. For example, a task runner can evaluate SQL queries stored in Amazon S3.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.DescribePipelines Content-Length: 164 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-08785951KAKJEXAMPLE", "objectId": "Schedule", "expression": "Transform started at #{startDateTime} and finished at #{endDateTime}"}
/// </request>
/// <response>
/// x-amzn-RequestId: 02870eb7-0736-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 103 Date: Mon, 12 Nov 2012 17:50:53 GMT {"evaluatedExpression": "Transform started at 2012-12-12T00:00:00 and finished at 2012-12-21T18:00:00"}
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct EvaluateExpression {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::evaluate_expression_input::Builder,
}
impl EvaluateExpression {
/// Creates a new `EvaluateExpression`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::EvaluateExpression,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::EvaluateExpressionError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EvaluateExpressionOutput,
aws_smithy_http::result::SdkError<crate::error::EvaluateExpressionError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// <p>The ID of the object.</p>
pub fn object_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.object_id(input.into());
self
}
/// <p>The ID of the object.</p>
pub fn set_object_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_object_id(input);
self
}
/// <p>The expression to evaluate.</p>
pub fn expression(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.expression(input.into());
self
}
/// <p>The expression to evaluate.</p>
pub fn set_expression(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_expression(input);
self
}
}
/// Fluent builder constructing a request to `GetPipelineDefinition`.
///
/// <p>Gets the definition of the specified pipeline. You can call <code>GetPipelineDefinition</code> to retrieve the pipeline definition that you provided using <code>PutPipelineDefinition</code>.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.GetPipelineDefinition Content-Length: 40 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE"}
/// </request>
/// <response>
/// x-amzn-RequestId: e28309e5-0776-11e2-8a14-21bb8a1f50ef Content-Type: application/x-amz-json-1.1 Content-Length: 890 Date: Mon, 12 Nov 2012 17:50:53 GMT {"pipelineObjects": [ {"fields": [ {"key": "workerGroup", "stringValue": "workerGroup"} ], "id": "Default", "name": "Default"}, {"fields": [ {"key": "startDateTime", "stringValue": "2012-09-25T17:00:00"}, {"key": "type", "stringValue": "Schedule"}, {"key": "period", "stringValue": "1 hour"}, {"key": "endDateTime", "stringValue": "2012-09-25T18:00:00"} ], "id": "Schedule", "name": "Schedule"}, {"fields": [ {"key": "schedule", "refValue": "Schedule"}, {"key": "command", "stringValue": "echo hello"}, {"key": "parent", "refValue": "Default"}, {"key": "type", "stringValue": "ShellCommandActivity"} ], "id": "SayHello", "name": "SayHello"} ] }
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetPipelineDefinition {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_pipeline_definition_input::Builder,
}
impl GetPipelineDefinition {
/// Creates a new `GetPipelineDefinition`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::GetPipelineDefinition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::GetPipelineDefinitionError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetPipelineDefinitionOutput,
aws_smithy_http::result::SdkError<crate::error::GetPipelineDefinitionError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// <p>The version of the pipeline definition to retrieve. Set this parameter to <code>latest</code> (default) to use the last definition saved to the pipeline or <code>active</code> to use the last definition that was activated.</p>
pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.version(input.into());
self
}
/// <p>The version of the pipeline definition to retrieve. Set this parameter to <code>latest</code> (default) to use the last definition saved to the pipeline or <code>active</code> to use the last definition that was activated.</p>
pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_version(input);
self
}
}
/// Fluent builder constructing a request to `ListPipelines`.
///
/// <p>Lists the pipeline identifiers for all active pipelines that you have permission to access.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ListPipelines Content-Length: 14 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {}
/// </request>
/// <response>
/// Status: x-amzn-RequestId: b3104dc5-0734-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 39 Date: Mon, 12 Nov 2012 17:50:53 GMT {"PipelineIdList": [ {"id": "df-08785951KAKJEXAMPLE", "name": "MyPipeline"}, {"id": "df-08662578ISYEXAMPLE", "name": "MySecondPipeline"} ] }
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListPipelines {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_pipelines_input::Builder,
}
impl ListPipelines {
/// Creates a new `ListPipelines`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ListPipelines,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ListPipelinesError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListPipelinesOutput,
aws_smithy_http::result::SdkError<crate::error::ListPipelinesError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListPipelinesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListPipelinesPaginator {
crate::paginator::ListPipelinesPaginator::new(self.handle, self.inner)
}
/// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>ListPipelines</code> with the marker value from the previous call to retrieve the next set of results.</p>
pub fn marker(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.marker(input.into());
self
}
/// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>ListPipelines</code> with the marker value from the previous call to retrieve the next set of results.</p>
pub fn set_marker(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_marker(input);
self
}
}
/// Fluent builder constructing a request to `PollForTask`.
///
/// <p>Task runners call <code>PollForTask</code> to receive a task to perform from AWS Data Pipeline. The task runner specifies which tasks it can perform by setting a value for the <code>workerGroup</code> parameter. The task returned can come from any of the pipelines that match the <code>workerGroup</code> value passed in by the task runner and that was launched using the IAM user credentials specified by the task runner.</p>
/// <p>If tasks are ready in the work queue, <code>PollForTask</code> returns a response immediately. If no tasks are available in the queue, <code>PollForTask</code> uses long-polling and holds on to a poll connection for up to a 90 seconds, during which time the first newly scheduled task is handed to the task runner. To accomodate this, set the socket timeout in your task runner to 90 seconds. The task runner should not call <code>PollForTask</code> again on the same <code>workerGroup</code> until it receives a response, and this can take up to 90 seconds. </p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.PollForTask Content-Length: 59 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"workerGroup": "MyworkerGroup", "hostname": "example.com"}
/// </request>
/// <response>
/// x-amzn-RequestId: 41c713d2-0775-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 39 Date: Mon, 12 Nov 2012 17:50:53 GMT {"taskObject": {"attemptId": "@SayHello_2012-12-12T00:00:00_Attempt=1", "objects": {"@SayHello_2012-12-12T00:00:00_Attempt=1": {"fields": [ {"key": "@componentParent", "refValue": "SayHello"}, {"key": "@scheduledStartTime", "stringValue": "2012-12-12T00:00:00"}, {"key": "parent", "refValue": "SayHello"}, {"key": "@sphere", "stringValue": "ATTEMPT"}, {"key": "workerGroup", "stringValue": "workerGroup"}, {"key": "@instanceParent", "refValue": "@SayHello_2012-12-12T00:00:00"}, {"key": "type", "stringValue": "ShellCommandActivity"}, {"key": "@status", "stringValue": "WAITING_FOR_RUNNER"}, {"key": "@version", "stringValue": "1"}, {"key": "schedule", "refValue": "Schedule"}, {"key": "@actualStartTime", "stringValue": "2012-12-13T01:40:50"}, {"key": "command", "stringValue": "echo hello"}, {"key": "@scheduledEndTime", "stringValue": "2012-12-12T01:00:00"}, {"key": "@activeInstances", "refValue": "@SayHello_2012-12-12T00:00:00"}, {"key": "@pipelineId", "stringValue": "df-0937003356ZJEXAMPLE"} ], "id": "@SayHello_2012-12-12T00:00:00_Attempt=1", "name": "@SayHello_2012-12-12T00:00:00_Attempt=1"} }, "pipelineId": "df-0937003356ZJEXAMPLE", "taskId": "2xaM4wRs5zOsIH+g9U3oVHfAgAlbSqU6XduncB0HhZ3xMnmvfePZPn4dIbYXHyWyRK+cU15MqDHwdrvftx/4wv+sNS4w34vJfv7QA9aOoOazW28l1GYSb2ZRR0N0paiQp+d1MhSKo10hOTWOsVK5S5Lnx9Qm6omFgXHyIvZRIvTlrQMpr1xuUrflyGOfbFOGpOLpvPE172MYdqpZKnbSS4TcuqgQKSWV2833fEubI57DPOP7ghWa2TcYeSIv4pdLYG53fTuwfbnbdc98g2LNUQzSVhSnt7BoqyNwht2aQ6b/UHg9A80+KVpuXuqmz3m1MXwHFgxjdmuesXNOrrlGpeLCcRWD+aGo0RN1NqhQRzNAig8V4GlaPTQzMsRCljKqvrIyAoP3Tt2XEGsHkkQo12rEX8Z90957XX2qKRwhruwYzqGkSLWjINoLdAxUJdpRXRc5DJTrBd3D5mdzn7kY1l7NEh4kFHJDt3Cx4Z3Mk8MYCACyCk/CEyy9DwuPi66cLz0NBcgbCM5LKjTBOwo1m+am+pvM1kSposE9FPP1+RFGb8k6jQBTJx3TRz1yKilnGXQTZ5xvdOFpJrklIT0OXP1MG3+auM9FlJA+1dX90QoNJE5z7axmK//MOGXUdkqFe2kiDkorqjxwDvc0Js9pVKfKvAmW8YqUbmI9l0ERpWCXXnLVHNmPWz3jaPY+OBAmuJWDmxB/Z8p94aEDg4BVXQ7LvsKQ3DLYhaB7yJ390CJT+i0mm+EBqY60V6YikPSWDFrYQ/NPi2b1DgE19mX8zHqw8qprIl4yh1Ckx2Iige4En/N5ktOoIxnASxAw/TzcE2skxdw5KlHDF+UTj71m16CR/dIaKlXijlfNlNzUBo/bNSadCQn3G5NoO501wPKI:XO50TgDNyo8EXAMPLE/g==:1"} }
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct PollForTask {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::poll_for_task_input::Builder,
}
impl PollForTask {
/// Creates a new `PollForTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::PollForTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::PollForTaskError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PollForTaskOutput,
aws_smithy_http::result::SdkError<crate::error::PollForTaskError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code> in the call to <code>PollForTask</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>
pub fn worker_group(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.worker_group(input.into());
self
}
/// <p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code> in the call to <code>PollForTask</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>
pub fn set_worker_group(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_worker_group(input);
self
}
/// <p>The public DNS name of the calling task runner.</p>
pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.hostname(input.into());
self
}
/// <p>The public DNS name of the calling task runner.</p>
pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_hostname(input);
self
}
/// <p>Identity information for the EC2 instance that is hosting the task runner. You can get this value from the instance using <code>http://169.254.169.254/latest/meta-data/instance-id</code>. For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html">Instance Metadata</a> in the <i>Amazon Elastic Compute Cloud User Guide.</i> Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.</p>
pub fn instance_identity(mut self, input: crate::model::InstanceIdentity) -> Self {
self.inner = self.inner.instance_identity(input);
self
}
/// <p>Identity information for the EC2 instance that is hosting the task runner. You can get this value from the instance using <code>http://169.254.169.254/latest/meta-data/instance-id</code>. For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html">Instance Metadata</a> in the <i>Amazon Elastic Compute Cloud User Guide.</i> Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.</p>
pub fn set_instance_identity(
mut self,
input: std::option::Option<crate::model::InstanceIdentity>,
) -> Self {
self.inner = self.inner.set_instance_identity(input);
self
}
}
/// Fluent builder constructing a request to `PutPipelineDefinition`.
///
/// <p>Adds tasks, schedules, and preconditions to the specified pipeline. You can use <code>PutPipelineDefinition</code> to populate a new pipeline.</p>
/// <p> <code>PutPipelineDefinition</code> also validates the configuration as it adds it to the pipeline. Changes to the pipeline are saved unless one of the following three validation errors exists in the pipeline. </p>
/// <ol>
/// <li>An object is missing a name or identifier field.</li>
/// <li>A string or reference field is empty.</li>
/// <li>The number of objects in the pipeline exceeds the maximum allowed objects.</li>
/// <li>The pipeline is in a FINISHED state.</li>
/// </ol>
/// <p> Pipeline object definitions are passed to the <code>PutPipelineDefinition</code> action and returned by the <code>GetPipelineDefinition</code> action. </p> <examples>
/// <example>
/// <name>
/// Example 1
/// </name>
/// <description>
/// This example sets an valid pipeline configuration and returns success.
/// </description>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.PutPipelineDefinition Content-Length: 914 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-0937003356ZJEXAMPLE", "pipelineObjects": [ {"id": "Default", "name": "Default", "fields": [ {"key": "workerGroup", "stringValue": "workerGroup"} ] }, {"id": "Schedule", "name": "Schedule", "fields": [ {"key": "startDateTime", "stringValue": "2012-12-12T00:00:00"}, {"key": "type", "stringValue": "Schedule"}, {"key": "period", "stringValue": "1 hour"}, {"key": "endDateTime", "stringValue": "2012-12-21T18:00:00"} ] }, {"id": "SayHello", "name": "SayHello", "fields": [ {"key": "type", "stringValue": "ShellCommandActivity"}, {"key": "command", "stringValue": "echo hello"}, {"key": "parent", "refValue": "Default"}, {"key": "schedule", "refValue": "Schedule"} ] } ] }
/// </request>
/// <response>
/// HTTP/1.1 200 x-amzn-RequestId: f74afc14-0754-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 18 Date: Mon, 12 Nov 2012 17:50:53 GMT {"errored": false}
/// </response>
/// </example>
/// <example>
/// <name>
/// Example 2
/// </name>
/// <description>
/// This example sets an invalid pipeline configuration (the value for
/// <code>workerGroup</code> is an empty string) and returns an error message.
/// </description>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.PutPipelineDefinition Content-Length: 903 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE", "pipelineObjects": [ {"id": "Default", "name": "Default", "fields": [ {"key": "workerGroup", "stringValue": ""} ] }, {"id": "Schedule", "name": "Schedule", "fields": [ {"key": "startDateTime", "stringValue": "2012-09-25T17:00:00"}, {"key": "type", "stringValue": "Schedule"}, {"key": "period", "stringValue": "1 hour"}, {"key": "endDateTime", "stringValue": "2012-09-25T18:00:00"} ] }, {"id": "SayHello", "name": "SayHello", "fields": [ {"key": "type", "stringValue": "ShellCommandActivity"}, {"key": "command", "stringValue": "echo hello"}, {"key": "parent", "refValue": "Default"}, {"key": "schedule", "refValue": "Schedule"} ] } ] }
/// </request>
/// <response>
/// HTTP/1.1 200 x-amzn-RequestId: f74afc14-0754-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 18 Date: Mon, 12 Nov 2012 17:50:53 GMT {"__type": "com.amazon.setl.webservice#InvalidRequestException", "message": "Pipeline definition has errors: Could not save the pipeline definition due to FATAL errors: [com.amazon.setl.webservice.ValidationError@108d7ea9] Please call Validate to validate your pipeline"}
/// </response>
/// </example>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct PutPipelineDefinition {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::put_pipeline_definition_input::Builder,
}
impl PutPipelineDefinition {
/// Creates a new `PutPipelineDefinition`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::PutPipelineDefinition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::PutPipelineDefinitionError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PutPipelineDefinitionOutput,
aws_smithy_http::result::SdkError<crate::error::PutPipelineDefinitionError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// Appends an item to `pipelineObjects`.
///
/// To override the contents of this collection use [`set_pipeline_objects`](Self::set_pipeline_objects).
///
/// <p>The objects that define the pipeline. These objects overwrite the existing pipeline definition.</p>
pub fn pipeline_objects(mut self, input: crate::model::PipelineObject) -> Self {
self.inner = self.inner.pipeline_objects(input);
self
}
/// <p>The objects that define the pipeline. These objects overwrite the existing pipeline definition.</p>
pub fn set_pipeline_objects(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PipelineObject>>,
) -> Self {
self.inner = self.inner.set_pipeline_objects(input);
self
}
/// Appends an item to `parameterObjects`.
///
/// To override the contents of this collection use [`set_parameter_objects`](Self::set_parameter_objects).
///
/// <p>The parameter objects used with the pipeline.</p>
pub fn parameter_objects(mut self, input: crate::model::ParameterObject) -> Self {
self.inner = self.inner.parameter_objects(input);
self
}
/// <p>The parameter objects used with the pipeline.</p>
pub fn set_parameter_objects(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ParameterObject>>,
) -> Self {
self.inner = self.inner.set_parameter_objects(input);
self
}
/// Appends an item to `parameterValues`.
///
/// To override the contents of this collection use [`set_parameter_values`](Self::set_parameter_values).
///
/// <p>The parameter values used with the pipeline.</p>
pub fn parameter_values(mut self, input: crate::model::ParameterValue) -> Self {
self.inner = self.inner.parameter_values(input);
self
}
/// <p>The parameter values used with the pipeline.</p>
pub fn set_parameter_values(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ParameterValue>>,
) -> Self {
self.inner = self.inner.set_parameter_values(input);
self
}
}
/// Fluent builder constructing a request to `QueryObjects`.
///
/// <p>Queries the specified pipeline for the names of objects that match the specified set of conditions.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.QueryObjects Content-Length: 123 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE", "query": {"selectors": [ ] }, "sphere": "INSTANCE", "marker": "", "limit": 10}
/// </request>
/// <response>
/// x-amzn-RequestId: 14d704c1-0775-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 72 Date: Mon, 12 Nov 2012 17:50:53 GMT {"hasMoreResults": false, "ids": ["@SayHello_1_2012-09-25T17:00:00"] }
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct QueryObjects {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::query_objects_input::Builder,
}
impl QueryObjects {
/// Creates a new `QueryObjects`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::QueryObjects,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::QueryObjectsError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::QueryObjectsOutput,
aws_smithy_http::result::SdkError<crate::error::QueryObjectsError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::QueryObjectsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::QueryObjectsPaginator {
crate::paginator::QueryObjectsPaginator::new(self.handle, self.inner)
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// <p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>
pub fn query(mut self, input: crate::model::Query) -> Self {
self.inner = self.inner.query(input);
self
}
/// <p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>
pub fn set_query(mut self, input: std::option::Option<crate::model::Query>) -> Self {
self.inner = self.inner.set_query(input);
self
}
/// <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
pub fn sphere(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.sphere(input.into());
self
}
/// <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
pub fn set_sphere(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_sphere(input);
self
}
/// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
pub fn marker(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.marker(input.into());
self
}
/// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
pub fn set_marker(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_marker(input);
self
}
/// <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100. </p>
pub fn limit(mut self, input: i32) -> Self {
self.inner = self.inner.limit(input);
self
}
/// <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100. </p>
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_limit(input);
self
}
}
/// Fluent builder constructing a request to `RemoveTags`.
///
/// <p>Removes existing tags from the specified pipeline.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct RemoveTags {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::remove_tags_input::Builder,
}
impl RemoveTags {
/// Creates a new `RemoveTags`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::RemoveTags,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::RemoveTagsError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RemoveTagsOutput,
aws_smithy_http::result::SdkError<crate::error::RemoveTagsError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// Appends an item to `tagKeys`.
///
/// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
///
/// <p>The keys of the tags to remove.</p>
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.tag_keys(input.into());
self
}
/// <p>The keys of the tags to remove.</p>
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_tag_keys(input);
self
}
}
/// Fluent builder constructing a request to `ReportTaskProgress`.
///
/// <p>Task runners call <code>ReportTaskProgress</code> when assigned a task to acknowledge that it has the task. If the web service does not receive this acknowledgement within 2 minutes, it assigns the task in a subsequent <code>PollForTask</code> call. After this initial acknowledgement, the task runner only needs to report progress every 15 minutes to maintain its ownership of the task. You can change this reporting time from 15 minutes by specifying a <code>reportProgressTimeout</code> field in your pipeline.</p>
/// <p>If a task runner does not report its status after 5 minutes, AWS Data Pipeline assumes that the task runner is unable to process the task and reassigns the task in a subsequent response to <code>PollForTask</code>. Task runners should call <code>ReportTaskProgress</code> every 60 seconds.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ReportTaskProgress Content-Length: 832 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"taskId": "aaGgHT4LuH0T0Y0oLrJRjas5qH0d8cDPADxqq3tn+zCWGELkCdV2JprLreXm1oxeP5EFZHFLJ69kjSsLYE0iYHYBYVGBrB+E/pYq7ANEEeGJFnSBMRiXZVA+8UJ3OzcInvXeinqBmBaKwii7hnnKb/AXjXiNTXyxgydX1KAyg1AxkwBYG4cfPYMZbuEbQJFJvv5C/2+GVXz1w94nKYTeUeepwUOFOuRLS6JVtZoYwpF56E+Yfk1IcGpFOvCZ01B4Bkuu7x3J+MD/j6kJgZLAgbCJQtI3eiW3kdGmX0p0I2BdY1ZsX6b4UiSvM3OMj6NEHJCJL4E0ZfitnhCoe24Kvjo6C2hFbZq+ei/HPgSXBQMSagkr4vS9c0ChzxH2+LNYvec6bY4kymkaZI1dvOzmpa0FcnGf5AjSK4GpsViZ/ujz6zxFv81qBXzjF0/4M1775rjV1VUdyKaixiA/sJiACNezqZqETidp8d24BDPRhGsj6pBCrnelqGFrk/gXEXUsJ+xwMifRC8UVwiKekpAvHUywVk7Ku4jH/n3i2VoLRP6FXwpUbelu34iiZ9czpXyLtyPKwxa87dlrnRVURwkcVjOt2Mcrcaqe+cbWHvNRhyrPkkdfSF3ac8/wfgVbXvLEB2k9mKc67aD9rvdc1PKX09Tk8BKklsMTpZ3TRCd4NzQlJKigMe8Jat9+1tKj4Ole5ZzW6uyTu2s2iFjEV8KXu4MaiRJyNKCdKeGhhZWY37Qk4NBK4Ppgu+C6Y41dpfOh288SLDEVx0/UySlqOEdhba7c6BiPp5r3hKj3mk9lFy5OYp1aoGLeeFmjXveTnPdf2gkWqXXg7AUbJ7jEs1F0lKZQg4szep2gcKyAJXgvXLfJJHcha8Lfb/Ee7wYmyOcAaRpDBoFNSbtoVXar46teIrpho+ZDvynUXvU0grHWGOk=:wn3SgymHZM99bEXAMPLE", "fields": [ {"key": "percentComplete", "stringValue": "50"} ] }
/// </request>
/// <response>
/// x-amzn-RequestId: 640bd023-0775-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 18 Date: Mon, 12 Nov 2012 17:50:53 GMT {"canceled": false}
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ReportTaskProgress {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::report_task_progress_input::Builder,
}
impl ReportTaskProgress {
/// Creates a new `ReportTaskProgress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ReportTaskProgress,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ReportTaskProgressError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReportTaskProgressOutput,
aws_smithy_http::result::SdkError<crate::error::ReportTaskProgressError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the task assigned to the task runner. This value is provided in the response for <code>PollForTask</code>.</p>
pub fn task_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.task_id(input.into());
self
}
/// <p>The ID of the task assigned to the task runner. This value is provided in the response for <code>PollForTask</code>.</p>
pub fn set_task_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_task_id(input);
self
}
/// Appends an item to `fields`.
///
/// To override the contents of this collection use [`set_fields`](Self::set_fields).
///
/// <p>Key-value pairs that define the properties of the ReportTaskProgressInput object.</p>
pub fn fields(mut self, input: crate::model::Field) -> Self {
self.inner = self.inner.fields(input);
self
}
/// <p>Key-value pairs that define the properties of the ReportTaskProgressInput object.</p>
pub fn set_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Field>>,
) -> Self {
self.inner = self.inner.set_fields(input);
self
}
}
/// Fluent builder constructing a request to `ReportTaskRunnerHeartbeat`.
///
/// <p>Task runners call <code>ReportTaskRunnerHeartbeat</code> every 15 minutes to indicate that they are operational. If the AWS Data Pipeline Task Runner is launched on a resource managed by AWS Data Pipeline, the web service can use this call to detect when the task runner application has failed and restart a new instance.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ReportTaskRunnerHeartbeat Content-Length: 84 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"taskrunnerId": "1234567890", "workerGroup": "wg-12345", "hostname": "example.com"}
/// </request>
/// <response>
/// Status: x-amzn-RequestId: b3104dc5-0734-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 20 Date: Mon, 12 Nov 2012 17:50:53 GMT {"terminate": false}
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ReportTaskRunnerHeartbeat {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::report_task_runner_heartbeat_input::Builder,
}
impl ReportTaskRunnerHeartbeat {
/// Creates a new `ReportTaskRunnerHeartbeat`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ReportTaskRunnerHeartbeat,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ReportTaskRunnerHeartbeatError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReportTaskRunnerHeartbeatOutput,
aws_smithy_http::result::SdkError<crate::error::ReportTaskRunnerHeartbeatError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the task runner. This value should be unique across your AWS account. In the case of AWS Data Pipeline Task Runner launched on a resource managed by AWS Data Pipeline, the web service provides a unique identifier when it launches the application. If you have written a custom task runner, you should assign a unique identifier for the task runner.</p>
pub fn taskrunner_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.taskrunner_id(input.into());
self
}
/// <p>The ID of the task runner. This value should be unique across your AWS account. In the case of AWS Data Pipeline Task Runner launched on a resource managed by AWS Data Pipeline, the web service provides a unique identifier when it launches the application. If you have written a custom task runner, you should assign a unique identifier for the task runner.</p>
pub fn set_taskrunner_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_taskrunner_id(input);
self
}
/// <p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>
pub fn worker_group(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.worker_group(input.into());
self
}
/// <p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>
pub fn set_worker_group(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_worker_group(input);
self
}
/// <p>The public DNS name of the task runner.</p>
pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.hostname(input.into());
self
}
/// <p>The public DNS name of the task runner.</p>
pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_hostname(input);
self
}
}
/// Fluent builder constructing a request to `SetStatus`.
///
/// <p>Requests that the status of the specified physical or logical pipeline objects be updated in the specified pipeline. This update might not occur immediately, but is eventually consistent. The status that can be set depends on the type of object (for example, DataNode or Activity). You cannot perform this operation on <code>FINISHED</code> pipelines and attempting to do so returns <code>InvalidRequestException</code>.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.SetStatus Content-Length: 100 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-0634701J7KEXAMPLE", "objectIds": ["o-08600941GHJWMBR9E2"], "status": "pause"}
/// </request>
/// <response>
/// x-amzn-RequestId: e83b8ab7-076a-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 0 Date: Mon, 12 Nov 2012 17:50:53 GMT Unexpected response: 200, OK, undefined
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct SetStatus {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::set_status_input::Builder,
}
impl SetStatus {
/// Creates a new `SetStatus`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::SetStatus,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::SetStatusError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SetStatusOutput,
aws_smithy_http::result::SdkError<crate::error::SetStatusError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline that contains the objects.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline that contains the objects.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// Appends an item to `objectIds`.
///
/// To override the contents of this collection use [`set_object_ids`](Self::set_object_ids).
///
/// <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
pub fn object_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.object_ids(input.into());
self
}
/// <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
pub fn set_object_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_object_ids(input);
self
}
/// <p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>
pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.status(input.into());
self
}
/// <p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>
pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_status(input);
self
}
}
/// Fluent builder constructing a request to `SetTaskStatus`.
///
/// <p>Task runners call <code>SetTaskStatus</code> to notify AWS Data Pipeline that a task is completed and provide information about the final status. A task runner makes this call regardless of whether the task was sucessful. A task runner does not need to call <code>SetTaskStatus</code> for tasks that are canceled by the web service during a call to <code>ReportTaskProgress</code>.</p> <examples>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.SetTaskStatus Content-Length: 847 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"taskId": "aaGgHT4LuH0T0Y0oLrJRjas5qH0d8cDPADxqq3tn+zCWGELkCdV2JprLreXm1oxeP5EFZHFLJ69kjSsLYE0iYHYBYVGBrB+E/pYq7ANEEeGJFnSBMRiXZVA+8UJ3OzcInvXeinqBmBaKwii7hnnKb/AXjXiNTXyxgydX1KAyg1AxkwBYG4cfPYMZbuEbQJFJvv5C/2+GVXz1w94nKYTeUeepwUOFOuRLS6JVtZoYwpF56E+Yfk1IcGpFOvCZ01B4Bkuu7x3J+MD/j6kJgZLAgbCJQtI3eiW3kdGmX0p0I2BdY1ZsX6b4UiSvM3OMj6NEHJCJL4E0ZfitnhCoe24Kvjo6C2hFbZq+ei/HPgSXBQMSagkr4vS9c0ChzxH2+LNYvec6bY4kymkaZI1dvOzmpa0FcnGf5AjSK4GpsViZ/ujz6zxFv81qBXzjF0/4M1775rjV1VUdyKaixiA/sJiACNezqZqETidp8d24BDPRhGsj6pBCrnelqGFrk/gXEXUsJ+xwMifRC8UVwiKekpAvHUywVk7Ku4jH/n3i2VoLRP6FXwpUbelu34iiZ9czpXyLtyPKwxa87dlrnRVURwkcVjOt2Mcrcaqe+cbWHvNRhyrPkkdfSF3ac8/wfgVbXvLEB2k9mKc67aD9rvdc1PKX09Tk8BKklsMTpZ3TRCd4NzQlJKigMe8Jat9+1tKj4Ole5ZzW6uyTu2s2iFjEV8KXu4MaiRJyNKCdKeGhhZWY37Qk4NBK4Ppgu+C6Y41dpfOh288SLDEVx0/UySlqOEdhba7c6BiPp5r3hKj3mk9lFy5OYp1aoGLeeFmjXveTnPdf2gkWqXXg7AUbJ7jEs1F0lKZQg4szep2gcKyAJXgvXLfJJHcha8Lfb/Ee7wYmyOcAaRpDBoFNSbtoVXar46teIrpho+ZDvynUXvU0grHWGOk=:wn3SgymHZM99bEXAMPLE", "taskStatus": "FINISHED"}
/// </request>
/// <response>
/// x-amzn-RequestId: 8c8deb53-0788-11e2-af9c-6bc7a6be6qr8 Content-Type: application/x-amz-json-1.1 Content-Length: 0 Date: Mon, 12 Nov 2012 17:50:53 GMT {}
/// </response>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct SetTaskStatus {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::set_task_status_input::Builder,
}
impl SetTaskStatus {
/// Creates a new `SetTaskStatus`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::SetTaskStatus,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::SetTaskStatusError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SetTaskStatusOutput,
aws_smithy_http::result::SdkError<crate::error::SetTaskStatusError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the task assigned to the task runner. This value is provided in the response for <code>PollForTask</code>.</p>
pub fn task_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.task_id(input.into());
self
}
/// <p>The ID of the task assigned to the task runner. This value is provided in the response for <code>PollForTask</code>.</p>
pub fn set_task_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_task_id(input);
self
}
/// <p>If <code>FINISHED</code>, the task successfully completed. If <code>FAILED</code>, the task ended unsuccessfully. Preconditions use false.</p>
pub fn task_status(mut self, input: crate::model::TaskStatus) -> Self {
self.inner = self.inner.task_status(input);
self
}
/// <p>If <code>FINISHED</code>, the task successfully completed. If <code>FAILED</code>, the task ended unsuccessfully. Preconditions use false.</p>
pub fn set_task_status(
mut self,
input: std::option::Option<crate::model::TaskStatus>,
) -> Self {
self.inner = self.inner.set_task_status(input);
self
}
/// <p>If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.</p>
pub fn error_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.error_id(input.into());
self
}
/// <p>If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.</p>
pub fn set_error_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_error_id(input);
self
}
/// <p>If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>
pub fn error_message(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.error_message(input.into());
self
}
/// <p>If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>
pub fn set_error_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_error_message(input);
self
}
/// <p>If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>
pub fn error_stack_trace(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.error_stack_trace(input.into());
self
}
/// <p>If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>
pub fn set_error_stack_trace(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_error_stack_trace(input);
self
}
}
/// Fluent builder constructing a request to `ValidatePipelineDefinition`.
///
/// <p>Validates the specified pipeline definition to ensure that it is well formed and can be run without error.</p> <examples>
/// <example>
/// <name>
/// Example 1
/// </name>
/// <description>
/// This example sets an valid pipeline configuration and returns success.
/// </description>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ValidatePipelineDefinition Content-Length: 936 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE", "pipelineObjects": [ {"id": "Default", "name": "Default", "fields": [ {"key": "workerGroup", "stringValue": "MyworkerGroup"} ] }, {"id": "Schedule", "name": "Schedule", "fields": [ {"key": "startDateTime", "stringValue": "2012-09-25T17:00:00"}, {"key": "type", "stringValue": "Schedule"}, {"key": "period", "stringValue": "1 hour"}, {"key": "endDateTime", "stringValue": "2012-09-25T18:00:00"} ] }, {"id": "SayHello", "name": "SayHello", "fields": [ {"key": "type", "stringValue": "ShellCommandActivity"}, {"key": "command", "stringValue": "echo hello"}, {"key": "parent", "refValue": "Default"}, {"key": "schedule", "refValue": "Schedule"} ] } ] }
/// </request>
/// <response>
/// x-amzn-RequestId: 92c9f347-0776-11e2-8a14-21bb8a1f50ef Content-Type: application/x-amz-json-1.1 Content-Length: 18 Date: Mon, 12 Nov 2012 17:50:53 GMT {"errored": false}
/// </response>
/// </example>
/// <example>
/// <name>
/// Example 2
/// </name>
/// <description>
/// This example sets an invalid pipeline configuration and returns the associated set of validation errors.
/// </description>
/// <request>
/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.ValidatePipelineDefinition Content-Length: 903 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE", "pipelineObjects": [ {"id": "Default", "name": "Default", "fields": [ {"key": "workerGroup", "stringValue": "MyworkerGroup"} ] }, {"id": "Schedule", "name": "Schedule", "fields": [ {"key": "startDateTime", "stringValue": "bad-time"}, {"key": "type", "stringValue": "Schedule"}, {"key": "period", "stringValue": "1 hour"}, {"key": "endDateTime", "stringValue": "2012-09-25T18:00:00"} ] }, {"id": "SayHello", "name": "SayHello", "fields": [ {"key": "type", "stringValue": "ShellCommandActivity"}, {"key": "command", "stringValue": "echo hello"}, {"key": "parent", "refValue": "Default"}, {"key": "schedule", "refValue": "Schedule"} ] } ] }
/// </request>
/// <response>
/// x-amzn-RequestId: 496a1f5a-0e6a-11e2-a61c-bd6312c92ddd Content-Type: application/x-amz-json-1.1 Content-Length: 278 Date: Mon, 12 Nov 2012 17:50:53 GMT {"errored": true, "validationErrors": [ {"errors": ["INVALID_FIELD_VALUE: 'startDateTime' value must be a literal datetime value."], "id": "Schedule"} ] }
/// </response>
/// </example>
/// </examples>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ValidatePipelineDefinition {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::validate_pipeline_definition_input::Builder,
}
impl ValidatePipelineDefinition {
/// Creates a new `ValidatePipelineDefinition`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ValidatePipelineDefinition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ValidatePipelineDefinitionError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ValidatePipelineDefinitionOutput,
aws_smithy_http::result::SdkError<crate::error::ValidatePipelineDefinitionError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// <p>The ID of the pipeline.</p>
pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pipeline_id(input.into());
self
}
/// <p>The ID of the pipeline.</p>
pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pipeline_id(input);
self
}
/// Appends an item to `pipelineObjects`.
///
/// To override the contents of this collection use [`set_pipeline_objects`](Self::set_pipeline_objects).
///
/// <p>The objects that define the pipeline changes to validate against the pipeline.</p>
pub fn pipeline_objects(mut self, input: crate::model::PipelineObject) -> Self {
self.inner = self.inner.pipeline_objects(input);
self
}
/// <p>The objects that define the pipeline changes to validate against the pipeline.</p>
pub fn set_pipeline_objects(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PipelineObject>>,
) -> Self {
self.inner = self.inner.set_pipeline_objects(input);
self
}
/// Appends an item to `parameterObjects`.
///
/// To override the contents of this collection use [`set_parameter_objects`](Self::set_parameter_objects).
///
/// <p>The parameter objects used with the pipeline.</p>
pub fn parameter_objects(mut self, input: crate::model::ParameterObject) -> Self {
self.inner = self.inner.parameter_objects(input);
self
}
/// <p>The parameter objects used with the pipeline.</p>
pub fn set_parameter_objects(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ParameterObject>>,
) -> Self {
self.inner = self.inner.set_parameter_objects(input);
self
}
/// Appends an item to `parameterValues`.
///
/// To override the contents of this collection use [`set_parameter_values`](Self::set_parameter_values).
///
/// <p>The parameter values used with the pipeline.</p>
pub fn parameter_values(mut self, input: crate::model::ParameterValue) -> Self {
self.inner = self.inner.parameter_values(input);
self
}
/// <p>The parameter values used with the pipeline.</p>
pub fn set_parameter_values(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ParameterValue>>,
) -> Self {
self.inner = self.inner.set_parameter_values(input);
self
}
}
}
impl Client {
/// Creates a new client from an [SDK Config](aws_types::sdk_config::SdkConfig).
///
/// # Panics
///
/// - This method will panic if the `sdk_config` is missing an async sleep implementation. If you experience this panic, set
/// the `sleep_impl` on the Config passed into this function to fix it.
/// - This method will panic if the `sdk_config` is missing an HTTP connector. If you experience this panic, set the
/// `http_connector` on the Config passed into this function to fix it.
pub fn new(sdk_config: &aws_types::sdk_config::SdkConfig) -> Self {
Self::from_conf(sdk_config.into())
}
/// Creates a new client from the service [`Config`](crate::Config).
///
/// # Panics
///
/// - This method will panic if the `conf` is missing an async sleep implementation. If you experience this panic, set
/// the `sleep_impl` on the Config passed into this function to fix it.
/// - This method will panic if the `conf` is missing an HTTP connector. If you experience this panic, set the
/// `http_connector` on the Config passed into this function to fix it.
pub fn from_conf(conf: crate::Config) -> Self {
let retry_config = conf
.retry_config()
.cloned()
.unwrap_or_else(aws_smithy_types::retry::RetryConfig::disabled);
let timeout_config = conf
.timeout_config()
.cloned()
.unwrap_or_else(aws_smithy_types::timeout::TimeoutConfig::disabled);
let sleep_impl = conf.sleep_impl();
if (retry_config.has_retry() || timeout_config.has_timeouts()) && sleep_impl.is_none() {
panic!("An async sleep implementation is required for retries or timeouts to work. \
Set the `sleep_impl` on the Config passed into this function to fix this panic.");
}
let connector = conf.http_connector().and_then(|c| {
let timeout_config = conf
.timeout_config()
.cloned()
.unwrap_or_else(aws_smithy_types::timeout::TimeoutConfig::disabled);
let connector_settings =
aws_smithy_client::http_connector::ConnectorSettings::from_timeout_config(
&timeout_config,
);
c.connector(&connector_settings, conf.sleep_impl())
});
let builder = aws_smithy_client::Builder::new();
let builder = match connector {
// Use provided connector
Some(c) => builder.connector(c),
None => {
#[cfg(any(feature = "rustls", feature = "native-tls"))]
{
// Use default connector based on enabled features
builder.dyn_https_connector(
aws_smithy_client::http_connector::ConnectorSettings::from_timeout_config(
&timeout_config,
),
)
}
#[cfg(not(any(feature = "rustls", feature = "native-tls")))]
{
panic!("No HTTP connector was available. Enable the `rustls` or `native-tls` crate feature or set a connector to fix this.");
}
}
};
let mut builder = builder
.middleware(aws_smithy_client::erase::DynMiddleware::new(
crate::middleware::DefaultMiddleware::new(),
))
.retry_config(retry_config.into())
.operation_timeout_config(timeout_config.into());
builder.set_sleep_impl(sleep_impl);
let client = builder.build();
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
}