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
// 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 Migration Hub
///
/// Client for invoking operations on AWS Migration Hub. Each operation on AWS Migration Hub 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_migrationhub::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::RetryConfig;
/// # async fn docs() {
/// let shared_config = aws_config::load_from_env().await;
/// let config = aws_sdk_migrationhub::config::Builder::from(&shared_config)
/// .retry_config(RetryConfig::disabled())
/// .build();
/// let client = aws_sdk_migrationhub::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 [`AssociateCreatedArtifact`](crate::client::fluent_builders::AssociateCreatedArtifact) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::AssociateCreatedArtifact::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::AssociateCreatedArtifact::set_progress_update_stream): <p>The name of the ProgressUpdateStream. </p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::AssociateCreatedArtifact::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::AssociateCreatedArtifact::set_migration_task_name): <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
/// - [`created_artifact(CreatedArtifact)`](crate::client::fluent_builders::AssociateCreatedArtifact::created_artifact) / [`set_created_artifact(Option<CreatedArtifact>)`](crate::client::fluent_builders::AssociateCreatedArtifact::set_created_artifact): <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.) </p>
/// - [`dry_run(bool)`](crate::client::fluent_builders::AssociateCreatedArtifact::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::AssociateCreatedArtifact::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`AssociateCreatedArtifactOutput`](crate::output::AssociateCreatedArtifactOutput)
/// - On failure, responds with [`SdkError<AssociateCreatedArtifactError>`](crate::error::AssociateCreatedArtifactError)
pub fn associate_created_artifact(&self) -> fluent_builders::AssociateCreatedArtifact {
fluent_builders::AssociateCreatedArtifact::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`AssociateDiscoveredResource`](crate::client::fluent_builders::AssociateDiscoveredResource) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::AssociateDiscoveredResource::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::AssociateDiscoveredResource::set_progress_update_stream): <p>The name of the ProgressUpdateStream.</p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::AssociateDiscoveredResource::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::AssociateDiscoveredResource::set_migration_task_name): <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
/// - [`discovered_resource(DiscoveredResource)`](crate::client::fluent_builders::AssociateDiscoveredResource::discovered_resource) / [`set_discovered_resource(Option<DiscoveredResource>)`](crate::client::fluent_builders::AssociateDiscoveredResource::set_discovered_resource): <p>Object representing a Resource.</p>
/// - [`dry_run(bool)`](crate::client::fluent_builders::AssociateDiscoveredResource::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::AssociateDiscoveredResource::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`AssociateDiscoveredResourceOutput`](crate::output::AssociateDiscoveredResourceOutput)
/// - On failure, responds with [`SdkError<AssociateDiscoveredResourceError>`](crate::error::AssociateDiscoveredResourceError)
pub fn associate_discovered_resource(&self) -> fluent_builders::AssociateDiscoveredResource {
fluent_builders::AssociateDiscoveredResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreateProgressUpdateStream`](crate::client::fluent_builders::CreateProgressUpdateStream) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream_name(impl Into<String>)`](crate::client::fluent_builders::CreateProgressUpdateStream::progress_update_stream_name) / [`set_progress_update_stream_name(Option<String>)`](crate::client::fluent_builders::CreateProgressUpdateStream::set_progress_update_stream_name): <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
/// - [`dry_run(bool)`](crate::client::fluent_builders::CreateProgressUpdateStream::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::CreateProgressUpdateStream::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`CreateProgressUpdateStreamOutput`](crate::output::CreateProgressUpdateStreamOutput)
/// - On failure, responds with [`SdkError<CreateProgressUpdateStreamError>`](crate::error::CreateProgressUpdateStreamError)
pub fn create_progress_update_stream(&self) -> fluent_builders::CreateProgressUpdateStream {
fluent_builders::CreateProgressUpdateStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteProgressUpdateStream`](crate::client::fluent_builders::DeleteProgressUpdateStream) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream_name(impl Into<String>)`](crate::client::fluent_builders::DeleteProgressUpdateStream::progress_update_stream_name) / [`set_progress_update_stream_name(Option<String>)`](crate::client::fluent_builders::DeleteProgressUpdateStream::set_progress_update_stream_name): <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
/// - [`dry_run(bool)`](crate::client::fluent_builders::DeleteProgressUpdateStream::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::DeleteProgressUpdateStream::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`DeleteProgressUpdateStreamOutput`](crate::output::DeleteProgressUpdateStreamOutput)
/// - On failure, responds with [`SdkError<DeleteProgressUpdateStreamError>`](crate::error::DeleteProgressUpdateStreamError)
pub fn delete_progress_update_stream(&self) -> fluent_builders::DeleteProgressUpdateStream {
fluent_builders::DeleteProgressUpdateStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DescribeApplicationState`](crate::client::fluent_builders::DescribeApplicationState) operation.
///
/// - The fluent builder is configurable:
/// - [`application_id(impl Into<String>)`](crate::client::fluent_builders::DescribeApplicationState::application_id) / [`set_application_id(Option<String>)`](crate::client::fluent_builders::DescribeApplicationState::set_application_id): <p>The configurationId in Application Discovery Service that uniquely identifies the grouped application.</p>
/// - On success, responds with [`DescribeApplicationStateOutput`](crate::output::DescribeApplicationStateOutput) with field(s):
/// - [`application_status(Option<ApplicationStatus>)`](crate::output::DescribeApplicationStateOutput::application_status): <p>Status of the application - Not Started, In-Progress, Complete.</p>
/// - [`last_updated_time(Option<DateTime>)`](crate::output::DescribeApplicationStateOutput::last_updated_time): <p>The timestamp when the application status was last updated.</p>
/// - On failure, responds with [`SdkError<DescribeApplicationStateError>`](crate::error::DescribeApplicationStateError)
pub fn describe_application_state(&self) -> fluent_builders::DescribeApplicationState {
fluent_builders::DescribeApplicationState::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DescribeMigrationTask`](crate::client::fluent_builders::DescribeMigrationTask) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::DescribeMigrationTask::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::DescribeMigrationTask::set_progress_update_stream): <p>The name of the ProgressUpdateStream. </p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::DescribeMigrationTask::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::DescribeMigrationTask::set_migration_task_name): <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
/// - On success, responds with [`DescribeMigrationTaskOutput`](crate::output::DescribeMigrationTaskOutput) with field(s):
/// - [`migration_task(Option<MigrationTask>)`](crate::output::DescribeMigrationTaskOutput::migration_task): <p>Object encapsulating information about the migration task.</p>
/// - On failure, responds with [`SdkError<DescribeMigrationTaskError>`](crate::error::DescribeMigrationTaskError)
pub fn describe_migration_task(&self) -> fluent_builders::DescribeMigrationTask {
fluent_builders::DescribeMigrationTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DisassociateCreatedArtifact`](crate::client::fluent_builders::DisassociateCreatedArtifact) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::DisassociateCreatedArtifact::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::DisassociateCreatedArtifact::set_progress_update_stream): <p>The name of the ProgressUpdateStream. </p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::DisassociateCreatedArtifact::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::DisassociateCreatedArtifact::set_migration_task_name): <p>Unique identifier that references the migration task to be disassociated with the artifact. <i>Do not store personal data in this field.</i> </p>
/// - [`created_artifact_name(impl Into<String>)`](crate::client::fluent_builders::DisassociateCreatedArtifact::created_artifact_name) / [`set_created_artifact_name(Option<String>)`](crate::client::fluent_builders::DisassociateCreatedArtifact::set_created_artifact_name): <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
/// - [`dry_run(bool)`](crate::client::fluent_builders::DisassociateCreatedArtifact::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::DisassociateCreatedArtifact::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`DisassociateCreatedArtifactOutput`](crate::output::DisassociateCreatedArtifactOutput)
/// - On failure, responds with [`SdkError<DisassociateCreatedArtifactError>`](crate::error::DisassociateCreatedArtifactError)
pub fn disassociate_created_artifact(&self) -> fluent_builders::DisassociateCreatedArtifact {
fluent_builders::DisassociateCreatedArtifact::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DisassociateDiscoveredResource`](crate::client::fluent_builders::DisassociateDiscoveredResource) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::DisassociateDiscoveredResource::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::DisassociateDiscoveredResource::set_progress_update_stream): <p>The name of the ProgressUpdateStream.</p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::DisassociateDiscoveredResource::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::DisassociateDiscoveredResource::set_migration_task_name): <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
/// - [`configuration_id(impl Into<String>)`](crate::client::fluent_builders::DisassociateDiscoveredResource::configuration_id) / [`set_configuration_id(Option<String>)`](crate::client::fluent_builders::DisassociateDiscoveredResource::set_configuration_id): <p>ConfigurationId of the Application Discovery Service resource to be disassociated.</p>
/// - [`dry_run(bool)`](crate::client::fluent_builders::DisassociateDiscoveredResource::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::DisassociateDiscoveredResource::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`DisassociateDiscoveredResourceOutput`](crate::output::DisassociateDiscoveredResourceOutput)
/// - On failure, responds with [`SdkError<DisassociateDiscoveredResourceError>`](crate::error::DisassociateDiscoveredResourceError)
pub fn disassociate_discovered_resource(
&self,
) -> fluent_builders::DisassociateDiscoveredResource {
fluent_builders::DisassociateDiscoveredResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ImportMigrationTask`](crate::client::fluent_builders::ImportMigrationTask) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::ImportMigrationTask::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::ImportMigrationTask::set_progress_update_stream): <p>The name of the ProgressUpdateStream. ></p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::ImportMigrationTask::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::ImportMigrationTask::set_migration_task_name): <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
/// - [`dry_run(bool)`](crate::client::fluent_builders::ImportMigrationTask::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::ImportMigrationTask::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`ImportMigrationTaskOutput`](crate::output::ImportMigrationTaskOutput)
/// - On failure, responds with [`SdkError<ImportMigrationTaskError>`](crate::error::ImportMigrationTaskError)
pub fn import_migration_task(&self) -> fluent_builders::ImportMigrationTask {
fluent_builders::ImportMigrationTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListApplicationStates`](crate::client::fluent_builders::ListApplicationStates) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListApplicationStates::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`application_ids(Vec<String>)`](crate::client::fluent_builders::ListApplicationStates::application_ids) / [`set_application_ids(Option<Vec<String>>)`](crate::client::fluent_builders::ListApplicationStates::set_application_ids): <p>The configurationIds from the Application Discovery Service that uniquely identifies your applications.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListApplicationStates::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListApplicationStates::set_next_token): <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListApplicationStates::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListApplicationStates::set_max_results): <p>Maximum number of results to be returned per page.</p>
/// - On success, responds with [`ListApplicationStatesOutput`](crate::output::ListApplicationStatesOutput) with field(s):
/// - [`application_state_list(Option<Vec<ApplicationState>>)`](crate::output::ListApplicationStatesOutput::application_state_list): <p>A list of Applications that exist in Application Discovery Service.</p>
/// - [`next_token(Option<String>)`](crate::output::ListApplicationStatesOutput::next_token): <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
/// - On failure, responds with [`SdkError<ListApplicationStatesError>`](crate::error::ListApplicationStatesError)
pub fn list_application_states(&self) -> fluent_builders::ListApplicationStates {
fluent_builders::ListApplicationStates::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListCreatedArtifacts`](crate::client::fluent_builders::ListCreatedArtifacts) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListCreatedArtifacts::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::ListCreatedArtifacts::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::ListCreatedArtifacts::set_progress_update_stream): <p>The name of the ProgressUpdateStream. </p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::ListCreatedArtifacts::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::ListCreatedArtifacts::set_migration_task_name): <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListCreatedArtifacts::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListCreatedArtifacts::set_next_token): <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListCreatedArtifacts::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListCreatedArtifacts::set_max_results): <p>Maximum number of results to be returned per page.</p>
/// - On success, responds with [`ListCreatedArtifactsOutput`](crate::output::ListCreatedArtifactsOutput) with field(s):
/// - [`next_token(Option<String>)`](crate::output::ListCreatedArtifactsOutput::next_token): <p>If there are more created artifacts than the max result, return the next token to be passed to the next call as a bookmark of where to start from.</p>
/// - [`created_artifact_list(Option<Vec<CreatedArtifact>>)`](crate::output::ListCreatedArtifactsOutput::created_artifact_list): <p>List of created artifacts up to the maximum number of results specified in the request.</p>
/// - On failure, responds with [`SdkError<ListCreatedArtifactsError>`](crate::error::ListCreatedArtifactsError)
pub fn list_created_artifacts(&self) -> fluent_builders::ListCreatedArtifacts {
fluent_builders::ListCreatedArtifacts::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListDiscoveredResources`](crate::client::fluent_builders::ListDiscoveredResources) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListDiscoveredResources::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::ListDiscoveredResources::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::ListDiscoveredResources::set_progress_update_stream): <p>The name of the ProgressUpdateStream.</p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::ListDiscoveredResources::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::ListDiscoveredResources::set_migration_task_name): <p>The name of the MigrationTask. <i>Do not store personal data in this field.</i> </p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListDiscoveredResources::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListDiscoveredResources::set_next_token): <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListDiscoveredResources::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListDiscoveredResources::set_max_results): <p>The maximum number of results returned per page.</p>
/// - On success, responds with [`ListDiscoveredResourcesOutput`](crate::output::ListDiscoveredResourcesOutput) with field(s):
/// - [`next_token(Option<String>)`](crate::output::ListDiscoveredResourcesOutput::next_token): <p>If there are more discovered resources than the max result, return the next token to be passed to the next call as a bookmark of where to start from.</p>
/// - [`discovered_resource_list(Option<Vec<DiscoveredResource>>)`](crate::output::ListDiscoveredResourcesOutput::discovered_resource_list): <p>Returned list of discovered resources associated with the given MigrationTask.</p>
/// - On failure, responds with [`SdkError<ListDiscoveredResourcesError>`](crate::error::ListDiscoveredResourcesError)
pub fn list_discovered_resources(&self) -> fluent_builders::ListDiscoveredResources {
fluent_builders::ListDiscoveredResources::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListMigrationTasks`](crate::client::fluent_builders::ListMigrationTasks) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListMigrationTasks::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListMigrationTasks::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListMigrationTasks::set_next_token): <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListMigrationTasks::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListMigrationTasks::set_max_results): <p>Value to specify how many results are returned per page.</p>
/// - [`resource_name(impl Into<String>)`](crate::client::fluent_builders::ListMigrationTasks::resource_name) / [`set_resource_name(Option<String>)`](crate::client::fluent_builders::ListMigrationTasks::set_resource_name): <p>Filter migration tasks by discovered resource name.</p>
/// - On success, responds with [`ListMigrationTasksOutput`](crate::output::ListMigrationTasksOutput) with field(s):
/// - [`next_token(Option<String>)`](crate::output::ListMigrationTasksOutput::next_token): <p>If there are more migration tasks than the max result, return the next token to be passed to the next call as a bookmark of where to start from.</p>
/// - [`migration_task_summary_list(Option<Vec<MigrationTaskSummary>>)`](crate::output::ListMigrationTasksOutput::migration_task_summary_list): <p>Lists the migration task's summary which includes: <code>MigrationTaskName</code>, <code>ProgressPercent</code>, <code>ProgressUpdateStream</code>, <code>Status</code>, and the <code>UpdateDateTime</code> for each task.</p>
/// - On failure, responds with [`SdkError<ListMigrationTasksError>`](crate::error::ListMigrationTasksError)
pub fn list_migration_tasks(&self) -> fluent_builders::ListMigrationTasks {
fluent_builders::ListMigrationTasks::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListProgressUpdateStreams`](crate::client::fluent_builders::ListProgressUpdateStreams) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListProgressUpdateStreams::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListProgressUpdateStreams::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListProgressUpdateStreams::set_next_token): <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListProgressUpdateStreams::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListProgressUpdateStreams::set_max_results): <p>Filter to limit the maximum number of results to list per page.</p>
/// - On success, responds with [`ListProgressUpdateStreamsOutput`](crate::output::ListProgressUpdateStreamsOutput) with field(s):
/// - [`progress_update_stream_summary_list(Option<Vec<ProgressUpdateStreamSummary>>)`](crate::output::ListProgressUpdateStreamsOutput::progress_update_stream_summary_list): <p>List of progress update streams up to the max number of results passed in the input.</p>
/// - [`next_token(Option<String>)`](crate::output::ListProgressUpdateStreamsOutput::next_token): <p>If there are more streams created than the max result, return the next token to be passed to the next call as a bookmark of where to start from.</p>
/// - On failure, responds with [`SdkError<ListProgressUpdateStreamsError>`](crate::error::ListProgressUpdateStreamsError)
pub fn list_progress_update_streams(&self) -> fluent_builders::ListProgressUpdateStreams {
fluent_builders::ListProgressUpdateStreams::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`NotifyApplicationState`](crate::client::fluent_builders::NotifyApplicationState) operation.
///
/// - The fluent builder is configurable:
/// - [`application_id(impl Into<String>)`](crate::client::fluent_builders::NotifyApplicationState::application_id) / [`set_application_id(Option<String>)`](crate::client::fluent_builders::NotifyApplicationState::set_application_id): <p>The configurationId in Application Discovery Service that uniquely identifies the grouped application.</p>
/// - [`status(ApplicationStatus)`](crate::client::fluent_builders::NotifyApplicationState::status) / [`set_status(Option<ApplicationStatus>)`](crate::client::fluent_builders::NotifyApplicationState::set_status): <p>Status of the application - Not Started, In-Progress, Complete.</p>
/// - [`update_date_time(DateTime)`](crate::client::fluent_builders::NotifyApplicationState::update_date_time) / [`set_update_date_time(Option<DateTime>)`](crate::client::fluent_builders::NotifyApplicationState::set_update_date_time): <p>The timestamp when the application state changed.</p>
/// - [`dry_run(bool)`](crate::client::fluent_builders::NotifyApplicationState::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::NotifyApplicationState::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`NotifyApplicationStateOutput`](crate::output::NotifyApplicationStateOutput)
/// - On failure, responds with [`SdkError<NotifyApplicationStateError>`](crate::error::NotifyApplicationStateError)
pub fn notify_application_state(&self) -> fluent_builders::NotifyApplicationState {
fluent_builders::NotifyApplicationState::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`NotifyMigrationTaskState`](crate::client::fluent_builders::NotifyMigrationTaskState) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::NotifyMigrationTaskState::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::NotifyMigrationTaskState::set_progress_update_stream): <p>The name of the ProgressUpdateStream. </p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::NotifyMigrationTaskState::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::NotifyMigrationTaskState::set_migration_task_name): <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
/// - [`task(Task)`](crate::client::fluent_builders::NotifyMigrationTaskState::task) / [`set_task(Option<Task>)`](crate::client::fluent_builders::NotifyMigrationTaskState::set_task): <p>Information about the task's progress and status.</p>
/// - [`update_date_time(DateTime)`](crate::client::fluent_builders::NotifyMigrationTaskState::update_date_time) / [`set_update_date_time(Option<DateTime>)`](crate::client::fluent_builders::NotifyMigrationTaskState::set_update_date_time): <p>The timestamp when the task was gathered.</p>
/// - [`next_update_seconds(i32)`](crate::client::fluent_builders::NotifyMigrationTaskState::next_update_seconds) / [`set_next_update_seconds(i32)`](crate::client::fluent_builders::NotifyMigrationTaskState::set_next_update_seconds): <p>Number of seconds after the UpdateDateTime within which the Migration Hub can expect an update. If Migration Hub does not receive an update within the specified interval, then the migration task will be considered stale.</p>
/// - [`dry_run(bool)`](crate::client::fluent_builders::NotifyMigrationTaskState::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::NotifyMigrationTaskState::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`NotifyMigrationTaskStateOutput`](crate::output::NotifyMigrationTaskStateOutput)
/// - On failure, responds with [`SdkError<NotifyMigrationTaskStateError>`](crate::error::NotifyMigrationTaskStateError)
pub fn notify_migration_task_state(&self) -> fluent_builders::NotifyMigrationTaskState {
fluent_builders::NotifyMigrationTaskState::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PutResourceAttributes`](crate::client::fluent_builders::PutResourceAttributes) operation.
///
/// - The fluent builder is configurable:
/// - [`progress_update_stream(impl Into<String>)`](crate::client::fluent_builders::PutResourceAttributes::progress_update_stream) / [`set_progress_update_stream(Option<String>)`](crate::client::fluent_builders::PutResourceAttributes::set_progress_update_stream): <p>The name of the ProgressUpdateStream. </p>
/// - [`migration_task_name(impl Into<String>)`](crate::client::fluent_builders::PutResourceAttributes::migration_task_name) / [`set_migration_task_name(Option<String>)`](crate::client::fluent_builders::PutResourceAttributes::set_migration_task_name): <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
/// - [`resource_attribute_list(Vec<ResourceAttribute>)`](crate::client::fluent_builders::PutResourceAttributes::resource_attribute_list) / [`set_resource_attribute_list(Option<Vec<ResourceAttribute>>)`](crate::client::fluent_builders::PutResourceAttributes::set_resource_attribute_list): <p>Information about the resource that is being migrated. This data will be used to map the task to a resource in the Application Discovery Service repository.</p> <note> <p>Takes the object array of <code>ResourceAttribute</code> where the <code>Type</code> field is reserved for the following values: <code>IPV4_ADDRESS | IPV6_ADDRESS | MAC_ADDRESS | FQDN | VM_MANAGER_ID | VM_MANAGED_OBJECT_REFERENCE | VM_NAME | VM_PATH | BIOS_ID | MOTHERBOARD_SERIAL_NUMBER</code> where the identifying value can be a string up to 256 characters.</p> </note> <important> <ul> <li> <p>If any "VM" related value is set for a <code>ResourceAttribute</code> object, it is required that <code>VM_MANAGER_ID</code>, as a minimum, is always set. If <code>VM_MANAGER_ID</code> is not set, then all "VM" fields will be discarded and "VM" fields will not be used for matching the migration task to a server in Application Discovery Service repository. See the <a href="https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#API_PutResourceAttributes_Examples">Example</a> section below for a use case of specifying "VM" related values.</p> </li> <li> <p> If a server you are trying to match has multiple IP or MAC addresses, you should provide as many as you know in separate type/value pairs passed to the <code>ResourceAttributeList</code> parameter to maximize the chances of matching.</p> </li> </ul> </important>
/// - [`dry_run(bool)`](crate::client::fluent_builders::PutResourceAttributes::dry_run) / [`set_dry_run(bool)`](crate::client::fluent_builders::PutResourceAttributes::set_dry_run): <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
/// - On success, responds with [`PutResourceAttributesOutput`](crate::output::PutResourceAttributesOutput)
/// - On failure, responds with [`SdkError<PutResourceAttributesError>`](crate::error::PutResourceAttributesError)
pub fn put_resource_attributes(&self) -> fluent_builders::PutResourceAttributes {
fluent_builders::PutResourceAttributes::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 `AssociateCreatedArtifact`.
///
/// <p>Associates a created artifact of an AWS cloud resource, the target receiving the migration, with the migration task performed by a migration tool. This API has the following traits:</p>
/// <ul>
/// <li> <p>Migration tools can call the <code>AssociateCreatedArtifact</code> operation to indicate which AWS artifact is associated with a migration task.</p> </li>
/// <li> <p>The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: <code>arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b</code>.</p> </li>
/// <li> <p>Examples of the AWS resource behind the created artifact are, AMI's, EC2 instance, or DMS endpoint, etc.</p> </li>
/// </ul>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct AssociateCreatedArtifact {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::associate_created_artifact_input::Builder,
}
impl AssociateCreatedArtifact {
/// Creates a new `AssociateCreatedArtifact`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::AssociateCreatedArtifactOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateCreatedArtifactError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
/// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.) </p>
pub fn created_artifact(mut self, input: crate::model::CreatedArtifact) -> Self {
self.inner = self.inner.created_artifact(input);
self
}
/// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.) </p>
pub fn set_created_artifact(
mut self,
input: std::option::Option<crate::model::CreatedArtifact>,
) -> Self {
self.inner = self.inner.set_created_artifact(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AssociateDiscoveredResource`.
///
/// <p>Associates a discovered resource ID from Application Discovery Service with a migration task.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct AssociateDiscoveredResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::associate_discovered_resource_input::Builder,
}
impl AssociateDiscoveredResource {
/// Creates a new `AssociateDiscoveredResource`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::AssociateDiscoveredResourceOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateDiscoveredResourceError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream.</p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream.</p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
/// <p>Object representing a Resource.</p>
pub fn discovered_resource(mut self, input: crate::model::DiscoveredResource) -> Self {
self.inner = self.inner.discovered_resource(input);
self
}
/// <p>Object representing a Resource.</p>
pub fn set_discovered_resource(
mut self,
input: std::option::Option<crate::model::DiscoveredResource>,
) -> Self {
self.inner = self.inner.set_discovered_resource(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateProgressUpdateStream`.
///
/// <p>Creates a progress update stream which is an AWS resource used for access control as well as a namespace for migration task names that is implicitly linked to your AWS account. It must uniquely identify the migration tool as it is used for all updates made by the tool; however, it does not need to be unique for each AWS account because it is scoped to the AWS account.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateProgressUpdateStream {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_progress_update_stream_input::Builder,
}
impl CreateProgressUpdateStream {
/// Creates a new `CreateProgressUpdateStream`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::CreateProgressUpdateStreamOutput,
aws_smithy_http::result::SdkError<crate::error::CreateProgressUpdateStreamError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
pub fn progress_update_stream_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.progress_update_stream_name(input.into());
self
}
/// <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
pub fn set_progress_update_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream_name(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteProgressUpdateStream`.
///
/// <p>Deletes a progress update stream, including all of its tasks, which was previously created as an AWS resource used for access control. This API has the following traits:</p>
/// <ul>
/// <li> <p>The only parameter needed for <code>DeleteProgressUpdateStream</code> is the stream name (same as a <code>CreateProgressUpdateStream</code> call).</p> </li>
/// <li> <p>The call will return, and a background process will asynchronously delete the stream and all of its resources (tasks, associated resources, resource attributes, created artifacts).</p> </li>
/// <li> <p>If the stream takes time to be deleted, it might still show up on a <code>ListProgressUpdateStreams</code> call.</p> </li>
/// <li> <p> <code>CreateProgressUpdateStream</code>, <code>ImportMigrationTask</code>, <code>NotifyMigrationTaskState</code>, and all Associate[*] APIs related to the tasks belonging to the stream will throw "InvalidInputException" if the stream of the same name is in the process of being deleted.</p> </li>
/// <li> <p>Once the stream and all of its resources are deleted, <code>CreateProgressUpdateStream</code> for a stream of the same name will succeed, and that stream will be an entirely new logical resource (without any resources associated with the old stream).</p> </li>
/// </ul>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeleteProgressUpdateStream {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::delete_progress_update_stream_input::Builder,
}
impl DeleteProgressUpdateStream {
/// Creates a new `DeleteProgressUpdateStream`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::DeleteProgressUpdateStreamOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteProgressUpdateStreamError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
pub fn progress_update_stream_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.progress_update_stream_name(input.into());
self
}
/// <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
pub fn set_progress_update_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream_name(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeApplicationState`.
///
/// <p>Gets the migration status of an application.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DescribeApplicationState {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::describe_application_state_input::Builder,
}
impl DescribeApplicationState {
/// Creates a new `DescribeApplicationState`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::DescribeApplicationStateOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeApplicationStateError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The configurationId in Application Discovery Service that uniquely identifies the grouped application.</p>
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.application_id(input.into());
self
}
/// <p>The configurationId in Application Discovery Service that uniquely identifies the grouped application.</p>
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_application_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeMigrationTask`.
///
/// <p>Retrieves a list of all attributes associated with a specific migration task.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DescribeMigrationTask {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::describe_migration_task_input::Builder,
}
impl DescribeMigrationTask {
/// Creates a new `DescribeMigrationTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::DescribeMigrationTaskOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeMigrationTaskError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateCreatedArtifact`.
///
/// <p>Disassociates a created artifact of an AWS resource with a migration task performed by a migration tool that was previously associated. This API has the following traits:</p>
/// <ul>
/// <li> <p>A migration user can call the <code>DisassociateCreatedArtifacts</code> operation to disassociate a created AWS Artifact from a migration task.</p> </li>
/// <li> <p>The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: <code>arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b</code>.</p> </li>
/// <li> <p>Examples of the AWS resource behind the created artifact are, AMI's, EC2 instance, or RDS instance, etc.</p> </li>
/// </ul>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DisassociateCreatedArtifact {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::disassociate_created_artifact_input::Builder,
}
impl DisassociateCreatedArtifact {
/// Creates a new `DisassociateCreatedArtifact`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::DisassociateCreatedArtifactOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateCreatedArtifactError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>Unique identifier that references the migration task to be disassociated with the artifact. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>Unique identifier that references the migration task to be disassociated with the artifact. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
/// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
pub fn created_artifact_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.created_artifact_name(input.into());
self
}
/// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
pub fn set_created_artifact_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_created_artifact_name(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateDiscoveredResource`.
///
/// <p>Disassociate an Application Discovery Service discovered resource from a migration task.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DisassociateDiscoveredResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::disassociate_discovered_resource_input::Builder,
}
impl DisassociateDiscoveredResource {
/// Creates a new `DisassociateDiscoveredResource`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::DisassociateDiscoveredResourceOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateDiscoveredResourceError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream.</p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream.</p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
/// <p>ConfigurationId of the Application Discovery Service resource to be disassociated.</p>
pub fn configuration_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.configuration_id(input.into());
self
}
/// <p>ConfigurationId of the Application Discovery Service resource to be disassociated.</p>
pub fn set_configuration_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_configuration_id(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ImportMigrationTask`.
///
/// <p>Registers a new migration task which represents a server, database, etc., being migrated to AWS by a migration tool.</p>
/// <p>This API is a prerequisite to calling the <code>NotifyMigrationTaskState</code> API as the migration tool must first register the migration task with Migration Hub.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ImportMigrationTask {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::import_migration_task_input::Builder,
}
impl ImportMigrationTask {
/// Creates a new `ImportMigrationTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::ImportMigrationTaskOutput,
aws_smithy_http::result::SdkError<crate::error::ImportMigrationTaskError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream. ></p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream. ></p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ListApplicationStates`.
///
/// <p>Lists all the migration statuses for your applications. If you use the optional <code>ApplicationIds</code> parameter, only the migration statuses for those applications will be returned.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListApplicationStates {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_application_states_input::Builder,
}
impl ListApplicationStates {
/// Creates a new `ListApplicationStates`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::ListApplicationStatesOutput,
aws_smithy_http::result::SdkError<crate::error::ListApplicationStatesError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListApplicationStatesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListApplicationStatesPaginator {
crate::paginator::ListApplicationStatesPaginator::new(self.handle, self.inner)
}
/// Appends an item to `ApplicationIds`.
///
/// To override the contents of this collection use [`set_application_ids`](Self::set_application_ids).
///
/// <p>The configurationIds from the Application Discovery Service that uniquely identifies your applications.</p>
pub fn application_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.application_ids(input.into());
self
}
/// <p>The configurationIds from the Application Discovery Service that uniquely identifies your applications.</p>
pub fn set_application_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_application_ids(input);
self
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Maximum number of results to be returned per page.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Maximum number of results to be returned per page.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `ListCreatedArtifacts`.
///
/// <p>Lists the created artifacts attached to a given migration task in an update stream. This API has the following traits:</p>
/// <ul>
/// <li> <p>Gets the list of the created artifacts while migration is taking place.</p> </li>
/// <li> <p>Shows the artifacts created by the migration tool that was associated by the <code>AssociateCreatedArtifact</code> API. </p> </li>
/// <li> <p>Lists created artifacts in a paginated interface. </p> </li>
/// </ul>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListCreatedArtifacts {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_created_artifacts_input::Builder,
}
impl ListCreatedArtifacts {
/// Creates a new `ListCreatedArtifacts`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::ListCreatedArtifactsOutput,
aws_smithy_http::result::SdkError<crate::error::ListCreatedArtifactsError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListCreatedArtifactsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListCreatedArtifactsPaginator {
crate::paginator::ListCreatedArtifactsPaginator::new(self.handle, self.inner)
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Maximum number of results to be returned per page.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Maximum number of results to be returned per page.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `ListDiscoveredResources`.
///
/// <p>Lists discovered resources associated with the given <code>MigrationTask</code>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListDiscoveredResources {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_discovered_resources_input::Builder,
}
impl ListDiscoveredResources {
/// Creates a new `ListDiscoveredResources`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::ListDiscoveredResourcesOutput,
aws_smithy_http::result::SdkError<crate::error::ListDiscoveredResourcesError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListDiscoveredResourcesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListDiscoveredResourcesPaginator {
crate::paginator::ListDiscoveredResourcesPaginator::new(self.handle, self.inner)
}
/// <p>The name of the ProgressUpdateStream.</p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream.</p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>The name of the MigrationTask. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>The name of the MigrationTask. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results returned per page.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of results returned per page.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `ListMigrationTasks`.
///
/// <p>Lists all, or filtered by resource name, migration tasks associated with the user account making this call. This API has the following traits:</p>
/// <ul>
/// <li> <p>Can show a summary list of the most recent migration tasks.</p> </li>
/// <li> <p>Can show a summary list of migration tasks associated with a given discovered resource.</p> </li>
/// <li> <p>Lists migration tasks in a paginated interface.</p> </li>
/// </ul>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListMigrationTasks {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_migration_tasks_input::Builder,
}
impl ListMigrationTasks {
/// Creates a new `ListMigrationTasks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::ListMigrationTasksOutput,
aws_smithy_http::result::SdkError<crate::error::ListMigrationTasksError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListMigrationTasksPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListMigrationTasksPaginator {
crate::paginator::ListMigrationTasksPaginator::new(self.handle, self.inner)
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Value to specify how many results are returned per page.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Value to specify how many results are returned per page.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>Filter migration tasks by discovered resource name.</p>
pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_name(input.into());
self
}
/// <p>Filter migration tasks by discovered resource name.</p>
pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_name(input);
self
}
}
/// Fluent builder constructing a request to `ListProgressUpdateStreams`.
///
/// <p>Lists progress update streams associated with the user account making this call.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListProgressUpdateStreams {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_progress_update_streams_input::Builder,
}
impl ListProgressUpdateStreams {
/// Creates a new `ListProgressUpdateStreams`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::ListProgressUpdateStreamsOutput,
aws_smithy_http::result::SdkError<crate::error::ListProgressUpdateStreamsError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListProgressUpdateStreamsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListProgressUpdateStreamsPaginator {
crate::paginator::ListProgressUpdateStreamsPaginator::new(self.handle, self.inner)
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Filter to limit the maximum number of results to list per page.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Filter to limit the maximum number of results to list per page.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `NotifyApplicationState`.
///
/// <p>Sets the migration state of an application. For a given application identified by the value passed to <code>ApplicationId</code>, its status is set or updated by passing one of three values to <code>Status</code>: <code>NOT_STARTED | IN_PROGRESS | COMPLETED</code>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct NotifyApplicationState {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::notify_application_state_input::Builder,
}
impl NotifyApplicationState {
/// Creates a new `NotifyApplicationState`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::NotifyApplicationStateOutput,
aws_smithy_http::result::SdkError<crate::error::NotifyApplicationStateError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The configurationId in Application Discovery Service that uniquely identifies the grouped application.</p>
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.application_id(input.into());
self
}
/// <p>The configurationId in Application Discovery Service that uniquely identifies the grouped application.</p>
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_application_id(input);
self
}
/// <p>Status of the application - Not Started, In-Progress, Complete.</p>
pub fn status(mut self, input: crate::model::ApplicationStatus) -> Self {
self.inner = self.inner.status(input);
self
}
/// <p>Status of the application - Not Started, In-Progress, Complete.</p>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ApplicationStatus>,
) -> Self {
self.inner = self.inner.set_status(input);
self
}
/// <p>The timestamp when the application state changed.</p>
pub fn update_date_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inner = self.inner.update_date_time(input);
self
}
/// <p>The timestamp when the application state changed.</p>
pub fn set_update_date_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inner = self.inner.set_update_date_time(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `NotifyMigrationTaskState`.
///
/// <p>Notifies Migration Hub of the current status, progress, or other detail regarding a migration task. This API has the following traits:</p>
/// <ul>
/// <li> <p>Migration tools will call the <code>NotifyMigrationTaskState</code> API to share the latest progress and status.</p> </li>
/// <li> <p> <code>MigrationTaskName</code> is used for addressing updates to the correct target.</p> </li>
/// <li> <p> <code>ProgressUpdateStream</code> is used for access control and to provide a namespace for each migration tool.</p> </li>
/// </ul>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct NotifyMigrationTaskState {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::notify_migration_task_state_input::Builder,
}
impl NotifyMigrationTaskState {
/// Creates a new `NotifyMigrationTaskState`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::NotifyMigrationTaskStateOutput,
aws_smithy_http::result::SdkError<crate::error::NotifyMigrationTaskStateError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
/// <p>Information about the task's progress and status.</p>
pub fn task(mut self, input: crate::model::Task) -> Self {
self.inner = self.inner.task(input);
self
}
/// <p>Information about the task's progress and status.</p>
pub fn set_task(mut self, input: std::option::Option<crate::model::Task>) -> Self {
self.inner = self.inner.set_task(input);
self
}
/// <p>The timestamp when the task was gathered.</p>
pub fn update_date_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inner = self.inner.update_date_time(input);
self
}
/// <p>The timestamp when the task was gathered.</p>
pub fn set_update_date_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inner = self.inner.set_update_date_time(input);
self
}
/// <p>Number of seconds after the UpdateDateTime within which the Migration Hub can expect an update. If Migration Hub does not receive an update within the specified interval, then the migration task will be considered stale.</p>
pub fn next_update_seconds(mut self, input: i32) -> Self {
self.inner = self.inner.next_update_seconds(input);
self
}
/// <p>Number of seconds after the UpdateDateTime within which the Migration Hub can expect an update. If Migration Hub does not receive an update within the specified interval, then the migration task will be considered stale.</p>
pub fn set_next_update_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_next_update_seconds(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `PutResourceAttributes`.
///
/// <p>Provides identifying details of the resource being migrated so that it can be associated in the Application Discovery Service repository. This association occurs asynchronously after <code>PutResourceAttributes</code> returns.</p> <important>
/// <ul>
/// <li> <p>Keep in mind that subsequent calls to PutResourceAttributes will override previously stored attributes. For example, if it is first called with a MAC address, but later, it is desired to <i>add</i> an IP address, it will then be required to call it with <i>both</i> the IP and MAC addresses to prevent overriding the MAC address.</p> </li>
/// <li> <p>Note the instructions regarding the special use case of the <a href="https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#migrationhub-PutResourceAttributes-request-ResourceAttributeList"> <code>ResourceAttributeList</code> </a> parameter when specifying any "VM" related value.</p> </li>
/// </ul>
/// </important> <note>
/// <p>Because this is an asynchronous call, it will always return 200, whether an association occurs or not. To confirm if an association was found based on the provided details, call <code>ListDiscoveredResources</code>.</p>
/// </note>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct PutResourceAttributes {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::put_resource_attributes_input::Builder,
}
impl PutResourceAttributes {
/// Creates a new `PutResourceAttributes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// 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::PutResourceAttributesOutput,
aws_smithy_http::result::SdkError<crate::error::PutResourceAttributesError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn progress_update_stream(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.progress_update_stream(input.into());
self
}
/// <p>The name of the ProgressUpdateStream. </p>
pub fn set_progress_update_stream(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_progress_update_stream(input);
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn migration_task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.migration_task_name(input.into());
self
}
/// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
pub fn set_migration_task_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_migration_task_name(input);
self
}
/// Appends an item to `ResourceAttributeList`.
///
/// To override the contents of this collection use [`set_resource_attribute_list`](Self::set_resource_attribute_list).
///
/// <p>Information about the resource that is being migrated. This data will be used to map the task to a resource in the Application Discovery Service repository.</p> <note>
/// <p>Takes the object array of <code>ResourceAttribute</code> where the <code>Type</code> field is reserved for the following values: <code>IPV4_ADDRESS | IPV6_ADDRESS | MAC_ADDRESS | FQDN | VM_MANAGER_ID | VM_MANAGED_OBJECT_REFERENCE | VM_NAME | VM_PATH | BIOS_ID | MOTHERBOARD_SERIAL_NUMBER</code> where the identifying value can be a string up to 256 characters.</p>
/// </note> <important>
/// <ul>
/// <li> <p>If any "VM" related value is set for a <code>ResourceAttribute</code> object, it is required that <code>VM_MANAGER_ID</code>, as a minimum, is always set. If <code>VM_MANAGER_ID</code> is not set, then all "VM" fields will be discarded and "VM" fields will not be used for matching the migration task to a server in Application Discovery Service repository. See the <a href="https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#API_PutResourceAttributes_Examples">Example</a> section below for a use case of specifying "VM" related values.</p> </li>
/// <li> <p> If a server you are trying to match has multiple IP or MAC addresses, you should provide as many as you know in separate type/value pairs passed to the <code>ResourceAttributeList</code> parameter to maximize the chances of matching.</p> </li>
/// </ul>
/// </important>
pub fn resource_attribute_list(mut self, input: crate::model::ResourceAttribute) -> Self {
self.inner = self.inner.resource_attribute_list(input);
self
}
/// <p>Information about the resource that is being migrated. This data will be used to map the task to a resource in the Application Discovery Service repository.</p> <note>
/// <p>Takes the object array of <code>ResourceAttribute</code> where the <code>Type</code> field is reserved for the following values: <code>IPV4_ADDRESS | IPV6_ADDRESS | MAC_ADDRESS | FQDN | VM_MANAGER_ID | VM_MANAGED_OBJECT_REFERENCE | VM_NAME | VM_PATH | BIOS_ID | MOTHERBOARD_SERIAL_NUMBER</code> where the identifying value can be a string up to 256 characters.</p>
/// </note> <important>
/// <ul>
/// <li> <p>If any "VM" related value is set for a <code>ResourceAttribute</code> object, it is required that <code>VM_MANAGER_ID</code>, as a minimum, is always set. If <code>VM_MANAGER_ID</code> is not set, then all "VM" fields will be discarded and "VM" fields will not be used for matching the migration task to a server in Application Discovery Service repository. See the <a href="https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#API_PutResourceAttributes_Examples">Example</a> section below for a use case of specifying "VM" related values.</p> </li>
/// <li> <p> If a server you are trying to match has multiple IP or MAC addresses, you should provide as many as you know in separate type/value pairs passed to the <code>ResourceAttributeList</code> parameter to maximize the chances of matching.</p> </li>
/// </ul>
/// </important>
pub fn set_resource_attribute_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ResourceAttribute>>,
) -> Self {
self.inner = self.inner.set_resource_attribute_list(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.inner = self.inner.dry_run(input);
self
}
/// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
}
impl Client {
/// Creates a client with the given service config and connector override.
pub fn from_conf_conn<C, E>(conf: crate::Config, conn: C) -> Self
where
C: aws_smithy_client::bounds::SmithyConnector<Error = E> + Send + 'static,
E: Into<aws_smithy_http::result::ConnectorError>,
{
let retry_config = conf.retry_config.as_ref().cloned().unwrap_or_default();
let timeout_config = conf.timeout_config.as_ref().cloned().unwrap_or_default();
let sleep_impl = conf.sleep_impl.clone();
let mut builder = aws_smithy_client::Builder::new()
.connector(aws_smithy_client::erase::DynConnector::new(conn))
.middleware(aws_smithy_client::erase::DynMiddleware::new(
crate::middleware::DefaultMiddleware::new(),
));
builder.set_retry_config(retry_config.into());
builder.set_timeout_config(timeout_config);
if let Some(sleep_impl) = sleep_impl {
builder.set_sleep_impl(Some(sleep_impl));
}
let client = builder.build();
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
/// Creates a new client from a shared config.
#[cfg(any(feature = "rustls", feature = "native-tls"))]
pub fn new(config: &aws_types::config::Config) -> Self {
Self::from_conf(config.into())
}
/// Creates a new client from the service [`Config`](crate::Config).
#[cfg(any(feature = "rustls", feature = "native-tls"))]
pub fn from_conf(conf: crate::Config) -> Self {
let retry_config = conf.retry_config.as_ref().cloned().unwrap_or_default();
let timeout_config = conf.timeout_config.as_ref().cloned().unwrap_or_default();
let sleep_impl = conf.sleep_impl.clone();
let mut builder = aws_smithy_client::Builder::dyn_https().middleware(
aws_smithy_client::erase::DynMiddleware::new(
crate::middleware::DefaultMiddleware::new(),
),
);
builder.set_retry_config(retry_config.into());
builder.set_timeout_config(timeout_config);
// the builder maintains a try-state. To avoid suppressing the warning when sleep is unset,
// only set it if we actually have a sleep impl.
if let Some(sleep_impl) = sleep_impl {
builder.set_sleep_impl(Some(sleep_impl));
}
let client = builder.build();
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
}