1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115
// 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 Amazon QLDB
///
/// Client for invoking operations on Amazon QLDB. Each operation on Amazon QLDB 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_qldb::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_qldb::config::Builder::from(&shared_config)
/// .retry_config(RetryConfig::disabled())
/// .build();
/// let client = aws_sdk_qldb::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 [`CancelJournalKinesisStream`](crate::client::fluent_builders::CancelJournalKinesisStream) operation.
///
/// - The fluent builder is configurable:
/// - [`ledger_name(impl Into<String>)`](crate::client::fluent_builders::CancelJournalKinesisStream::ledger_name) / [`set_ledger_name(Option<String>)`](crate::client::fluent_builders::CancelJournalKinesisStream::set_ledger_name): <p>The name of the ledger.</p>
/// - [`stream_id(impl Into<String>)`](crate::client::fluent_builders::CancelJournalKinesisStream::stream_id) / [`set_stream_id(Option<String>)`](crate::client::fluent_builders::CancelJournalKinesisStream::set_stream_id): <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled.</p>
/// - On success, responds with [`CancelJournalKinesisStreamOutput`](crate::output::CancelJournalKinesisStreamOutput) with field(s):
/// - [`stream_id(Option<String>)`](crate::output::CancelJournalKinesisStreamOutput::stream_id): <p>The UUID (Base62-encoded text) of the canceled QLDB journal stream.</p>
/// - On failure, responds with [`SdkError<CancelJournalKinesisStreamError>`](crate::error::CancelJournalKinesisStreamError)
pub fn cancel_journal_kinesis_stream(&self) -> fluent_builders::CancelJournalKinesisStream {
fluent_builders::CancelJournalKinesisStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreateLedger`](crate::client::fluent_builders::CreateLedger) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreateLedger::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreateLedger::set_name): <p>The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon Web Services account in the current Region.</p> <p>Naming constraints for ledger names are defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// - [`tags(HashMap<String, Option<String>>)`](crate::client::fluent_builders::CreateLedger::tags) / [`set_tags(Option<HashMap<String, Option<String>>>)`](crate::client::fluent_builders::CreateLedger::set_tags): <p>The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
/// - [`permissions_mode(PermissionsMode)`](crate::client::fluent_builders::CreateLedger::permissions_mode) / [`set_permissions_mode(Option<PermissionsMode>)`](crate::client::fluent_builders::CreateLedger::set_permissions_mode): <p>The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:</p> <ul> <li> <p> <code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p> <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p> </li> <li> <p> <code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p> <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p> </li> </ul> <note> <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p> </note>
/// - [`deletion_protection(bool)`](crate::client::fluent_builders::CreateLedger::deletion_protection) / [`set_deletion_protection(Option<bool>)`](crate::client::fluent_builders::CreateLedger::set_deletion_protection): <p>The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (<code>true</code>) by default.</p> <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
/// - [`kms_key(impl Into<String>)`](crate::client::fluent_builders::CreateLedger::kms_key) / [`set_kms_key(Option<String>)`](crate::client::fluent_builders::CreateLedger::set_kms_key): <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p> <p>Use one of the following options to specify this parameter:</p> <ul> <li> <p> <code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p> </li> <li> <p> <b>Undefined</b>: By default, use an Amazon Web Services owned KMS key.</p> </li> <li> <p> <b>A valid symmetric customer managed KMS key</b>: Use the specified KMS key in your account that you create, own, and manage.</p> <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p> </li> </ul> <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p> <p>For example:</p> <ul> <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> <li> <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> <li> <p>Alias name: <code>alias/ExampleAlias</code> </p> </li> <li> <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code> </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
/// - On success, responds with [`CreateLedgerOutput`](crate::output::CreateLedgerOutput) with field(s):
/// - [`name(Option<String>)`](crate::output::CreateLedgerOutput::name): <p>The name of the ledger.</p>
/// - [`arn(Option<String>)`](crate::output::CreateLedgerOutput::arn): <p>The Amazon Resource Name (ARN) for the ledger.</p>
/// - [`state(Option<LedgerState>)`](crate::output::CreateLedgerOutput::state): <p>The current status of the ledger.</p>
/// - [`creation_date_time(Option<DateTime>)`](crate::output::CreateLedgerOutput::creation_date_time): <p>The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
/// - [`permissions_mode(Option<PermissionsMode>)`](crate::output::CreateLedgerOutput::permissions_mode): <p>The permissions mode of the ledger that you created.</p>
/// - [`deletion_protection(Option<bool>)`](crate::output::CreateLedgerOutput::deletion_protection): <p>The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (<code>true</code>) by default.</p> <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
/// - [`kms_key_arn(Option<String>)`](crate::output::CreateLedgerOutput::kms_key_arn): <p>The ARN of the customer managed KMS key that the ledger uses for encryption at rest. If this parameter is undefined, the ledger uses an Amazon Web Services owned KMS key for encryption.</p>
/// - On failure, responds with [`SdkError<CreateLedgerError>`](crate::error::CreateLedgerError)
pub fn create_ledger(&self) -> fluent_builders::CreateLedger {
fluent_builders::CreateLedger::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteLedger`](crate::client::fluent_builders::DeleteLedger) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::DeleteLedger::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::DeleteLedger::set_name): <p>The name of the ledger that you want to delete.</p>
/// - On success, responds with [`DeleteLedgerOutput`](crate::output::DeleteLedgerOutput)
/// - On failure, responds with [`SdkError<DeleteLedgerError>`](crate::error::DeleteLedgerError)
pub fn delete_ledger(&self) -> fluent_builders::DeleteLedger {
fluent_builders::DeleteLedger::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DescribeJournalKinesisStream`](crate::client::fluent_builders::DescribeJournalKinesisStream) operation.
///
/// - The fluent builder is configurable:
/// - [`ledger_name(impl Into<String>)`](crate::client::fluent_builders::DescribeJournalKinesisStream::ledger_name) / [`set_ledger_name(Option<String>)`](crate::client::fluent_builders::DescribeJournalKinesisStream::set_ledger_name): <p>The name of the ledger.</p>
/// - [`stream_id(impl Into<String>)`](crate::client::fluent_builders::DescribeJournalKinesisStream::stream_id) / [`set_stream_id(Option<String>)`](crate::client::fluent_builders::DescribeJournalKinesisStream::set_stream_id): <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream to describe.</p>
/// - On success, responds with [`DescribeJournalKinesisStreamOutput`](crate::output::DescribeJournalKinesisStreamOutput) with field(s):
/// - [`stream(Option<JournalKinesisStreamDescription>)`](crate::output::DescribeJournalKinesisStreamOutput::stream): <p>Information about the QLDB journal stream returned by a <code>DescribeJournalS3Export</code> request.</p>
/// - On failure, responds with [`SdkError<DescribeJournalKinesisStreamError>`](crate::error::DescribeJournalKinesisStreamError)
pub fn describe_journal_kinesis_stream(&self) -> fluent_builders::DescribeJournalKinesisStream {
fluent_builders::DescribeJournalKinesisStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DescribeJournalS3Export`](crate::client::fluent_builders::DescribeJournalS3Export) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::DescribeJournalS3Export::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::DescribeJournalS3Export::set_name): <p>The name of the ledger.</p>
/// - [`export_id(impl Into<String>)`](crate::client::fluent_builders::DescribeJournalS3Export::export_id) / [`set_export_id(Option<String>)`](crate::client::fluent_builders::DescribeJournalS3Export::set_export_id): <p>The UUID (represented in Base62-encoded text) of the journal export job to describe.</p>
/// - On success, responds with [`DescribeJournalS3ExportOutput`](crate::output::DescribeJournalS3ExportOutput) with field(s):
/// - [`export_description(Option<JournalS3ExportDescription>)`](crate::output::DescribeJournalS3ExportOutput::export_description): <p>Information about the journal export job returned by a <code>DescribeJournalS3Export</code> request.</p>
/// - On failure, responds with [`SdkError<DescribeJournalS3ExportError>`](crate::error::DescribeJournalS3ExportError)
pub fn describe_journal_s3_export(&self) -> fluent_builders::DescribeJournalS3Export {
fluent_builders::DescribeJournalS3Export::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DescribeLedger`](crate::client::fluent_builders::DescribeLedger) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::DescribeLedger::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::DescribeLedger::set_name): <p>The name of the ledger that you want to describe.</p>
/// - On success, responds with [`DescribeLedgerOutput`](crate::output::DescribeLedgerOutput) with field(s):
/// - [`name(Option<String>)`](crate::output::DescribeLedgerOutput::name): <p>The name of the ledger.</p>
/// - [`arn(Option<String>)`](crate::output::DescribeLedgerOutput::arn): <p>The Amazon Resource Name (ARN) for the ledger.</p>
/// - [`state(Option<LedgerState>)`](crate::output::DescribeLedgerOutput::state): <p>The current status of the ledger.</p>
/// - [`creation_date_time(Option<DateTime>)`](crate::output::DescribeLedgerOutput::creation_date_time): <p>The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
/// - [`permissions_mode(Option<PermissionsMode>)`](crate::output::DescribeLedgerOutput::permissions_mode): <p>The permissions mode of the ledger.</p>
/// - [`deletion_protection(Option<bool>)`](crate::output::DescribeLedgerOutput::deletion_protection): <p>The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (<code>true</code>) by default.</p> <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
/// - [`encryption_description(Option<LedgerEncryptionDescription>)`](crate::output::DescribeLedgerOutput::encryption_description): <p>Information about the encryption of data at rest in the ledger. This includes the current status, the KMS key, and when the key became inaccessible (in the case of an error).</p>
/// - On failure, responds with [`SdkError<DescribeLedgerError>`](crate::error::DescribeLedgerError)
pub fn describe_ledger(&self) -> fluent_builders::DescribeLedger {
fluent_builders::DescribeLedger::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ExportJournalToS3`](crate::client::fluent_builders::ExportJournalToS3) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::ExportJournalToS3::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::ExportJournalToS3::set_name): <p>The name of the ledger.</p>
/// - [`inclusive_start_time(DateTime)`](crate::client::fluent_builders::ExportJournalToS3::inclusive_start_time) / [`set_inclusive_start_time(Option<DateTime>)`](crate::client::fluent_builders::ExportJournalToS3::set_inclusive_start_time): <p>The inclusive start date and time for the range of journal contents to export.</p> <p>The <code>InclusiveStartTime</code> must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p> <p>The <code>InclusiveStartTime</code> must be before <code>ExclusiveEndTime</code>.</p> <p>If you provide an <code>InclusiveStartTime</code> that is before the ledger's <code>CreationDateTime</code>, Amazon QLDB defaults it to the ledger's <code>CreationDateTime</code>.</p>
/// - [`exclusive_end_time(DateTime)`](crate::client::fluent_builders::ExportJournalToS3::exclusive_end_time) / [`set_exclusive_end_time(Option<DateTime>)`](crate::client::fluent_builders::ExportJournalToS3::set_exclusive_end_time): <p>The exclusive end date and time for the range of journal contents to export.</p> <p>The <code>ExclusiveEndTime</code> must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p> <p>The <code>ExclusiveEndTime</code> must be less than or equal to the current UTC date and time.</p>
/// - [`s3_export_configuration(S3ExportConfiguration)`](crate::client::fluent_builders::ExportJournalToS3::s3_export_configuration) / [`set_s3_export_configuration(Option<S3ExportConfiguration>)`](crate::client::fluent_builders::ExportJournalToS3::set_s3_export_configuration): <p>The configuration settings of the Amazon S3 bucket destination for your export request.</p>
/// - [`role_arn(impl Into<String>)`](crate::client::fluent_builders::ExportJournalToS3::role_arn) / [`set_role_arn(Option<String>)`](crate::client::fluent_builders::ExportJournalToS3::set_role_arn): <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:</p> <ul> <li> <p>Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.</p> </li> <li> <p>(Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.</p> </li> </ul> <p>To pass a role to QLDB when requesting a journal export, you must have permissions to perform the <code>iam:PassRole</code> action on the IAM role resource. This is required for all journal export requests.</p>
/// - [`output_format(OutputFormat)`](crate::client::fluent_builders::ExportJournalToS3::output_format) / [`set_output_format(Option<OutputFormat>)`](crate::client::fluent_builders::ExportJournalToS3::set_output_format): <p>The output format of your exported journal data. If this parameter is not specified, the exported data defaults to <code>ION_TEXT</code> format.</p>
/// - On success, responds with [`ExportJournalToS3Output`](crate::output::ExportJournalToS3Output) with field(s):
/// - [`export_id(Option<String>)`](crate::output::ExportJournalToS3Output::export_id): <p>The UUID (represented in Base62-encoded text) that QLDB assigns to each journal export job.</p> <p>To describe your export request and check the status of the job, you can use <code>ExportId</code> to call <code>DescribeJournalS3Export</code>.</p>
/// - On failure, responds with [`SdkError<ExportJournalToS3Error>`](crate::error::ExportJournalToS3Error)
pub fn export_journal_to_s3(&self) -> fluent_builders::ExportJournalToS3 {
fluent_builders::ExportJournalToS3::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetBlock`](crate::client::fluent_builders::GetBlock) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::GetBlock::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::GetBlock::set_name): <p>The name of the ledger.</p>
/// - [`block_address(ValueHolder)`](crate::client::fluent_builders::GetBlock::block_address) / [`set_block_address(Option<ValueHolder>)`](crate::client::fluent_builders::GetBlock::set_block_address): <p>The location of the block that you want to request. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p> <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
/// - [`digest_tip_address(ValueHolder)`](crate::client::fluent_builders::GetBlock::digest_tip_address) / [`set_digest_tip_address(Option<ValueHolder>)`](crate::client::fluent_builders::GetBlock::set_digest_tip_address): <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p> <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
/// - On success, responds with [`GetBlockOutput`](crate::output::GetBlockOutput) with field(s):
/// - [`block(Option<ValueHolder>)`](crate::output::GetBlockOutput::block): <p>The block data object in Amazon Ion format.</p>
/// - [`proof(Option<ValueHolder>)`](crate::output::GetBlockOutput::proof): <p>The proof object in Amazon Ion format returned by a <code>GetBlock</code> request. A proof contains the list of hash values required to recalculate the specified digest using a Merkle tree, starting with the specified block.</p>
/// - On failure, responds with [`SdkError<GetBlockError>`](crate::error::GetBlockError)
pub fn get_block(&self) -> fluent_builders::GetBlock {
fluent_builders::GetBlock::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetDigest`](crate::client::fluent_builders::GetDigest) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::GetDigest::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::GetDigest::set_name): <p>The name of the ledger.</p>
/// - On success, responds with [`GetDigestOutput`](crate::output::GetDigestOutput) with field(s):
/// - [`digest(Option<Blob>)`](crate::output::GetDigestOutput::digest): <p>The 256-bit hash value representing the digest returned by a <code>GetDigest</code> request.</p>
/// - [`digest_tip_address(Option<ValueHolder>)`](crate::output::GetDigestOutput::digest_tip_address): <p>The latest block location covered by the digest that you requested. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
/// - On failure, responds with [`SdkError<GetDigestError>`](crate::error::GetDigestError)
pub fn get_digest(&self) -> fluent_builders::GetDigest {
fluent_builders::GetDigest::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetRevision`](crate::client::fluent_builders::GetRevision) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::GetRevision::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::GetRevision::set_name): <p>The name of the ledger.</p>
/// - [`block_address(ValueHolder)`](crate::client::fluent_builders::GetRevision::block_address) / [`set_block_address(Option<ValueHolder>)`](crate::client::fluent_builders::GetRevision::set_block_address): <p>The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p> <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
/// - [`document_id(impl Into<String>)`](crate::client::fluent_builders::GetRevision::document_id) / [`set_document_id(Option<String>)`](crate::client::fluent_builders::GetRevision::set_document_id): <p>The UUID (represented in Base62-encoded text) of the document to be verified.</p>
/// - [`digest_tip_address(ValueHolder)`](crate::client::fluent_builders::GetRevision::digest_tip_address) / [`set_digest_tip_address(Option<ValueHolder>)`](crate::client::fluent_builders::GetRevision::set_digest_tip_address): <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p> <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
/// - On success, responds with [`GetRevisionOutput`](crate::output::GetRevisionOutput) with field(s):
/// - [`proof(Option<ValueHolder>)`](crate::output::GetRevisionOutput::proof): <p>The proof object in Amazon Ion format returned by a <code>GetRevision</code> request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.</p>
/// - [`revision(Option<ValueHolder>)`](crate::output::GetRevisionOutput::revision): <p>The document revision data object in Amazon Ion format.</p>
/// - On failure, responds with [`SdkError<GetRevisionError>`](crate::error::GetRevisionError)
pub fn get_revision(&self) -> fluent_builders::GetRevision {
fluent_builders::GetRevision::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListJournalKinesisStreamsForLedger`](crate::client::fluent_builders::ListJournalKinesisStreamsForLedger) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListJournalKinesisStreamsForLedger::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`ledger_name(impl Into<String>)`](crate::client::fluent_builders::ListJournalKinesisStreamsForLedger::ledger_name) / [`set_ledger_name(Option<String>)`](crate::client::fluent_builders::ListJournalKinesisStreamsForLedger::set_ledger_name): <p>The name of the ledger.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListJournalKinesisStreamsForLedger::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListJournalKinesisStreamsForLedger::set_max_results): <p>The maximum number of results to return in a single <code>ListJournalKinesisStreamsForLedger</code> request. (The actual number of results returned might be fewer.)</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListJournalKinesisStreamsForLedger::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListJournalKinesisStreamsForLedger::set_next_token): <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListJournalKinesisStreamsForLedger</code> call, you should use that value as input here.</p>
/// - On success, responds with [`ListJournalKinesisStreamsForLedgerOutput`](crate::output::ListJournalKinesisStreamsForLedgerOutput) with field(s):
/// - [`streams(Option<Vec<JournalKinesisStreamDescription>>)`](crate::output::ListJournalKinesisStreamsForLedgerOutput::streams): <p>The array of QLDB journal stream descriptors that are associated with the given ledger.</p>
/// - [`next_token(Option<String>)`](crate::output::ListJournalKinesisStreamsForLedgerOutput::next_token): <ul> <li> <p>If <code>NextToken</code> is empty, the last page of results has been processed and there are no more results to be retrieved.</p> </li> <li> <p>If <code>NextToken</code> is <i>not</i> empty, more results are available. To retrieve the next page of results, use the value of <code>NextToken</code> in a subsequent <code>ListJournalKinesisStreamsForLedger</code> call.</p> </li> </ul>
/// - On failure, responds with [`SdkError<ListJournalKinesisStreamsForLedgerError>`](crate::error::ListJournalKinesisStreamsForLedgerError)
pub fn list_journal_kinesis_streams_for_ledger(
&self,
) -> fluent_builders::ListJournalKinesisStreamsForLedger {
fluent_builders::ListJournalKinesisStreamsForLedger::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListJournalS3Exports`](crate::client::fluent_builders::ListJournalS3Exports) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListJournalS3Exports::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`max_results(i32)`](crate::client::fluent_builders::ListJournalS3Exports::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListJournalS3Exports::set_max_results): <p>The maximum number of results to return in a single <code>ListJournalS3Exports</code> request. (The actual number of results returned might be fewer.)</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListJournalS3Exports::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListJournalS3Exports::set_next_token): <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListJournalS3Exports</code> call, then you should use that value as input here.</p>
/// - On success, responds with [`ListJournalS3ExportsOutput`](crate::output::ListJournalS3ExportsOutput) with field(s):
/// - [`journal_s3_exports(Option<Vec<JournalS3ExportDescription>>)`](crate::output::ListJournalS3ExportsOutput::journal_s3_exports): <p>The array of journal export job descriptions for all ledgers that are associated with the current Amazon Web Services account and Region.</p>
/// - [`next_token(Option<String>)`](crate::output::ListJournalS3ExportsOutput::next_token): <ul> <li> <p>If <code>NextToken</code> is empty, then the last page of results has been processed and there are no more results to be retrieved.</p> </li> <li> <p>If <code>NextToken</code> is <i>not</i> empty, then there are more results available. To retrieve the next page of results, use the value of <code>NextToken</code> in a subsequent <code>ListJournalS3Exports</code> call.</p> </li> </ul>
/// - On failure, responds with [`SdkError<ListJournalS3ExportsError>`](crate::error::ListJournalS3ExportsError)
pub fn list_journal_s3_exports(&self) -> fluent_builders::ListJournalS3Exports {
fluent_builders::ListJournalS3Exports::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListJournalS3ExportsForLedger`](crate::client::fluent_builders::ListJournalS3ExportsForLedger) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListJournalS3ExportsForLedger::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::ListJournalS3ExportsForLedger::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::ListJournalS3ExportsForLedger::set_name): <p>The name of the ledger.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListJournalS3ExportsForLedger::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListJournalS3ExportsForLedger::set_max_results): <p>The maximum number of results to return in a single <code>ListJournalS3ExportsForLedger</code> request. (The actual number of results returned might be fewer.)</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListJournalS3ExportsForLedger::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListJournalS3ExportsForLedger::set_next_token): <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListJournalS3ExportsForLedger</code> call, then you should use that value as input here.</p>
/// - On success, responds with [`ListJournalS3ExportsForLedgerOutput`](crate::output::ListJournalS3ExportsForLedgerOutput) with field(s):
/// - [`journal_s3_exports(Option<Vec<JournalS3ExportDescription>>)`](crate::output::ListJournalS3ExportsForLedgerOutput::journal_s3_exports): <p>The array of journal export job descriptions that are associated with the specified ledger.</p>
/// - [`next_token(Option<String>)`](crate::output::ListJournalS3ExportsForLedgerOutput::next_token): <ul> <li> <p>If <code>NextToken</code> is empty, then the last page of results has been processed and there are no more results to be retrieved.</p> </li> <li> <p>If <code>NextToken</code> is <i>not</i> empty, then there are more results available. To retrieve the next page of results, use the value of <code>NextToken</code> in a subsequent <code>ListJournalS3ExportsForLedger</code> call.</p> </li> </ul>
/// - On failure, responds with [`SdkError<ListJournalS3ExportsForLedgerError>`](crate::error::ListJournalS3ExportsForLedgerError)
pub fn list_journal_s3_exports_for_ledger(
&self,
) -> fluent_builders::ListJournalS3ExportsForLedger {
fluent_builders::ListJournalS3ExportsForLedger::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListLedgers`](crate::client::fluent_builders::ListLedgers) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListLedgers::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`max_results(i32)`](crate::client::fluent_builders::ListLedgers::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListLedgers::set_max_results): <p>The maximum number of results to return in a single <code>ListLedgers</code> request. (The actual number of results returned might be fewer.)</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListLedgers::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListLedgers::set_next_token): <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListLedgers</code> call, then you should use that value as input here.</p>
/// - On success, responds with [`ListLedgersOutput`](crate::output::ListLedgersOutput) with field(s):
/// - [`ledgers(Option<Vec<LedgerSummary>>)`](crate::output::ListLedgersOutput::ledgers): <p>The array of ledger summaries that are associated with the current Amazon Web Services account and Region.</p>
/// - [`next_token(Option<String>)`](crate::output::ListLedgersOutput::next_token): <p>A pagination token, indicating whether there are more results available:</p> <ul> <li> <p>If <code>NextToken</code> is empty, then the last page of results has been processed and there are no more results to be retrieved.</p> </li> <li> <p>If <code>NextToken</code> is <i>not</i> empty, then there are more results available. To retrieve the next page of results, use the value of <code>NextToken</code> in a subsequent <code>ListLedgers</code> call.</p> </li> </ul>
/// - On failure, responds with [`SdkError<ListLedgersError>`](crate::error::ListLedgersError)
pub fn list_ledgers(&self) -> fluent_builders::ListLedgers {
fluent_builders::ListLedgers::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListTagsForResource`](crate::client::fluent_builders::ListTagsForResource) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::ListTagsForResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::ListTagsForResource::set_resource_arn): <p>The Amazon Resource Name (ARN) for which to list the tags. For example:</p> <p> <code>arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger</code> </p>
/// - On success, responds with [`ListTagsForResourceOutput`](crate::output::ListTagsForResourceOutput) with field(s):
/// - [`tags(Option<HashMap<String, Option<String>>>)`](crate::output::ListTagsForResourceOutput::tags): <p>The tags that are currently associated with the specified Amazon QLDB resource.</p>
/// - On failure, responds with [`SdkError<ListTagsForResourceError>`](crate::error::ListTagsForResourceError)
pub fn list_tags_for_resource(&self) -> fluent_builders::ListTagsForResource {
fluent_builders::ListTagsForResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`StreamJournalToKinesis`](crate::client::fluent_builders::StreamJournalToKinesis) operation.
///
/// - The fluent builder is configurable:
/// - [`ledger_name(impl Into<String>)`](crate::client::fluent_builders::StreamJournalToKinesis::ledger_name) / [`set_ledger_name(Option<String>)`](crate::client::fluent_builders::StreamJournalToKinesis::set_ledger_name): <p>The name of the ledger.</p>
/// - [`role_arn(impl Into<String>)`](crate::client::fluent_builders::StreamJournalToKinesis::role_arn) / [`set_role_arn(Option<String>)`](crate::client::fluent_builders::StreamJournalToKinesis::set_role_arn): <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.</p> <p>To pass a role to QLDB when requesting a journal stream, you must have permissions to perform the <code>iam:PassRole</code> action on the IAM role resource. This is required for all journal stream requests.</p>
/// - [`tags(HashMap<String, Option<String>>)`](crate::client::fluent_builders::StreamJournalToKinesis::tags) / [`set_tags(Option<HashMap<String, Option<String>>>)`](crate::client::fluent_builders::StreamJournalToKinesis::set_tags): <p>The key-value pairs to add as tags to the stream that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
/// - [`inclusive_start_time(DateTime)`](crate::client::fluent_builders::StreamJournalToKinesis::inclusive_start_time) / [`set_inclusive_start_time(Option<DateTime>)`](crate::client::fluent_builders::StreamJournalToKinesis::set_inclusive_start_time): <p>The inclusive start date and time from which to start streaming journal data. This parameter must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p> <p>The <code>InclusiveStartTime</code> cannot be in the future and must be before <code>ExclusiveEndTime</code>.</p> <p>If you provide an <code>InclusiveStartTime</code> that is before the ledger's <code>CreationDateTime</code>, QLDB effectively defaults it to the ledger's <code>CreationDateTime</code>.</p>
/// - [`exclusive_end_time(DateTime)`](crate::client::fluent_builders::StreamJournalToKinesis::exclusive_end_time) / [`set_exclusive_end_time(Option<DateTime>)`](crate::client::fluent_builders::StreamJournalToKinesis::set_exclusive_end_time): <p>The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it.</p> <p>The <code>ExclusiveEndTime</code> must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p>
/// - [`kinesis_configuration(KinesisConfiguration)`](crate::client::fluent_builders::StreamJournalToKinesis::kinesis_configuration) / [`set_kinesis_configuration(Option<KinesisConfiguration>)`](crate::client::fluent_builders::StreamJournalToKinesis::set_kinesis_configuration): <p>The configuration settings of the Kinesis Data Streams destination for your stream request.</p>
/// - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::StreamJournalToKinesis::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::StreamJournalToKinesis::set_stream_name): <p>The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream.</p> <p>Your stream name must be unique among other <i>active</i> streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// - On success, responds with [`StreamJournalToKinesisOutput`](crate::output::StreamJournalToKinesisOutput) with field(s):
/// - [`stream_id(Option<String>)`](crate::output::StreamJournalToKinesisOutput::stream_id): <p>The UUID (represented in Base62-encoded text) that QLDB assigns to each QLDB journal stream.</p>
/// - On failure, responds with [`SdkError<StreamJournalToKinesisError>`](crate::error::StreamJournalToKinesisError)
pub fn stream_journal_to_kinesis(&self) -> fluent_builders::StreamJournalToKinesis {
fluent_builders::StreamJournalToKinesis::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`TagResource`](crate::client::fluent_builders::TagResource) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::TagResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::TagResource::set_resource_arn): <p>The Amazon Resource Name (ARN) to which you want to add the tags. For example:</p> <p> <code>arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger</code> </p>
/// - [`tags(HashMap<String, Option<String>>)`](crate::client::fluent_builders::TagResource::tags) / [`set_tags(Option<HashMap<String, Option<String>>>)`](crate::client::fluent_builders::TagResource::set_tags): <p>The key-value pairs to add as tags to the specified QLDB resource. Tag keys are case sensitive. If you specify a key that already exists for the resource, your request fails and returns an error. Tag values are case sensitive and can be null.</p>
/// - On success, responds with [`TagResourceOutput`](crate::output::TagResourceOutput)
/// - On failure, responds with [`SdkError<TagResourceError>`](crate::error::TagResourceError)
pub fn tag_resource(&self) -> fluent_builders::TagResource {
fluent_builders::TagResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UntagResource`](crate::client::fluent_builders::UntagResource) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::UntagResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::UntagResource::set_resource_arn): <p>The Amazon Resource Name (ARN) from which to remove the tags. For example:</p> <p> <code>arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger</code> </p>
/// - [`tag_keys(Vec<String>)`](crate::client::fluent_builders::UntagResource::tag_keys) / [`set_tag_keys(Option<Vec<String>>)`](crate::client::fluent_builders::UntagResource::set_tag_keys): <p>The list of tag keys to remove.</p>
/// - On success, responds with [`UntagResourceOutput`](crate::output::UntagResourceOutput)
/// - On failure, responds with [`SdkError<UntagResourceError>`](crate::error::UntagResourceError)
pub fn untag_resource(&self) -> fluent_builders::UntagResource {
fluent_builders::UntagResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateLedger`](crate::client::fluent_builders::UpdateLedger) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::UpdateLedger::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::UpdateLedger::set_name): <p>The name of the ledger.</p>
/// - [`deletion_protection(bool)`](crate::client::fluent_builders::UpdateLedger::deletion_protection) / [`set_deletion_protection(Option<bool>)`](crate::client::fluent_builders::UpdateLedger::set_deletion_protection): <p>The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (<code>true</code>) by default.</p> <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
/// - [`kms_key(impl Into<String>)`](crate::client::fluent_builders::UpdateLedger::kms_key) / [`set_kms_key(Option<String>)`](crate::client::fluent_builders::UpdateLedger::set_kms_key): <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p> <p>Use one of the following options to specify this parameter:</p> <ul> <li> <p> <code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p> </li> <li> <p> <b>Undefined</b>: Make no changes to the KMS key of the ledger.</p> </li> <li> <p> <b>A valid symmetric customer managed KMS key</b>: Use the specified KMS key in your account that you create, own, and manage.</p> <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p> </li> </ul> <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p> <p>For example:</p> <ul> <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> <li> <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> <li> <p>Alias name: <code>alias/ExampleAlias</code> </p> </li> <li> <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code> </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
/// - On success, responds with [`UpdateLedgerOutput`](crate::output::UpdateLedgerOutput) with field(s):
/// - [`name(Option<String>)`](crate::output::UpdateLedgerOutput::name): <p>The name of the ledger.</p>
/// - [`arn(Option<String>)`](crate::output::UpdateLedgerOutput::arn): <p>The Amazon Resource Name (ARN) for the ledger.</p>
/// - [`state(Option<LedgerState>)`](crate::output::UpdateLedgerOutput::state): <p>The current status of the ledger.</p>
/// - [`creation_date_time(Option<DateTime>)`](crate::output::UpdateLedgerOutput::creation_date_time): <p>The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
/// - [`deletion_protection(Option<bool>)`](crate::output::UpdateLedgerOutput::deletion_protection): <p>The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (<code>true</code>) by default.</p> <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
/// - [`encryption_description(Option<LedgerEncryptionDescription>)`](crate::output::UpdateLedgerOutput::encryption_description): <p>Information about the encryption of data at rest in the ledger. This includes the current status, the KMS key, and when the key became inaccessible (in the case of an error).</p>
/// - On failure, responds with [`SdkError<UpdateLedgerError>`](crate::error::UpdateLedgerError)
pub fn update_ledger(&self) -> fluent_builders::UpdateLedger {
fluent_builders::UpdateLedger::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateLedgerPermissionsMode`](crate::client::fluent_builders::UpdateLedgerPermissionsMode) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::UpdateLedgerPermissionsMode::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::UpdateLedgerPermissionsMode::set_name): <p>The name of the ledger.</p>
/// - [`permissions_mode(PermissionsMode)`](crate::client::fluent_builders::UpdateLedgerPermissionsMode::permissions_mode) / [`set_permissions_mode(Option<PermissionsMode>)`](crate::client::fluent_builders::UpdateLedgerPermissionsMode::set_permissions_mode): <p>The permissions mode to assign to the ledger. This parameter can have one of the following values:</p> <ul> <li> <p> <code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p> <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p> </li> <li> <p> <code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p> <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p> </li> </ul> <note> <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p> </note>
/// - On success, responds with [`UpdateLedgerPermissionsModeOutput`](crate::output::UpdateLedgerPermissionsModeOutput) with field(s):
/// - [`name(Option<String>)`](crate::output::UpdateLedgerPermissionsModeOutput::name): <p>The name of the ledger.</p>
/// - [`arn(Option<String>)`](crate::output::UpdateLedgerPermissionsModeOutput::arn): <p>The Amazon Resource Name (ARN) for the ledger.</p>
/// - [`permissions_mode(Option<PermissionsMode>)`](crate::output::UpdateLedgerPermissionsModeOutput::permissions_mode): <p>The current permissions mode of the ledger.</p>
/// - On failure, responds with [`SdkError<UpdateLedgerPermissionsModeError>`](crate::error::UpdateLedgerPermissionsModeError)
pub fn update_ledger_permissions_mode(&self) -> fluent_builders::UpdateLedgerPermissionsMode {
fluent_builders::UpdateLedgerPermissionsMode::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 `CancelJournalKinesisStream`.
///
/// <p>Ends a given Amazon QLDB journal stream. Before a stream can be canceled, its current status must be <code>ACTIVE</code>.</p>
/// <p>You can't restart a stream after you cancel it. Canceled QLDB stream resources are subject to a 7-day retention period, so they are automatically deleted after this limit expires.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CancelJournalKinesisStream {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::cancel_journal_kinesis_stream_input::Builder,
}
impl CancelJournalKinesisStream {
/// Creates a new `CancelJournalKinesisStream`.
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::CancelJournalKinesisStreamOutput,
aws_smithy_http::result::SdkError<crate::error::CancelJournalKinesisStreamError>,
> {
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 ledger.</p>
pub fn ledger_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ledger_name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_ledger_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ledger_name(input);
self
}
/// <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled.</p>
pub fn stream_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.stream_id(input.into());
self
}
/// <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled.</p>
pub fn set_stream_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_stream_id(input);
self
}
}
/// Fluent builder constructing a request to `CreateLedger`.
///
/// <p>Creates a new ledger in your Amazon Web Services account in the current Region.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateLedger {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_ledger_input::Builder,
}
impl CreateLedger {
/// Creates a new `CreateLedger`.
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::CreateLedgerOutput,
aws_smithy_http::result::SdkError<crate::error::CreateLedgerError>,
> {
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 ledger that you want to create. The name must be unique among all of the ledgers in your Amazon Web Services account in the current Region.</p>
/// <p>Naming constraints for ledger names are defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon Web Services account in the current Region.</p>
/// <p>Naming constraints for ledger names are defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// Adds a key-value pair to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.tags(k.into(), v);
self
}
/// <p>The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<
std::string::String,
std::option::Option<std::string::String>,
>,
>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
/// <p>The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:</p>
/// <ul>
/// <li> <p> <code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p> <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p> </li>
/// <li> <p> <code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p> <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p> </li>
/// </ul> <note>
/// <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p>
/// </note>
pub fn permissions_mode(mut self, input: crate::model::PermissionsMode) -> Self {
self.inner = self.inner.permissions_mode(input);
self
}
/// <p>The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:</p>
/// <ul>
/// <li> <p> <code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p> <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p> </li>
/// <li> <p> <code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p> <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p> </li>
/// </ul> <note>
/// <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p>
/// </note>
pub fn set_permissions_mode(
mut self,
input: std::option::Option<crate::model::PermissionsMode>,
) -> Self {
self.inner = self.inner.set_permissions_mode(input);
self
}
/// <p>The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (<code>true</code>) by default.</p>
/// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
pub fn deletion_protection(mut self, input: bool) -> Self {
self.inner = self.inner.deletion_protection(input);
self
}
/// <p>The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (<code>true</code>) by default.</p>
/// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
pub fn set_deletion_protection(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_deletion_protection(input);
self
}
/// <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// <p>Use one of the following options to specify this parameter:</p>
/// <ul>
/// <li> <p> <code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p> </li>
/// <li> <p> <b>Undefined</b>: By default, use an Amazon Web Services owned KMS key.</p> </li>
/// <li> <p> <b>A valid symmetric customer managed KMS key</b>: Use the specified KMS key in your account that you create, own, and manage.</p> <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p> </li>
/// </ul>
/// <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
/// <p>For example:</p>
/// <ul>
/// <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li>
/// <li> <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li>
/// <li> <p>Alias name: <code>alias/ExampleAlias</code> </p> </li>
/// <li> <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code> </p> </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
pub fn kms_key(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kms_key(input.into());
self
}
/// <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// <p>Use one of the following options to specify this parameter:</p>
/// <ul>
/// <li> <p> <code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p> </li>
/// <li> <p> <b>Undefined</b>: By default, use an Amazon Web Services owned KMS key.</p> </li>
/// <li> <p> <b>A valid symmetric customer managed KMS key</b>: Use the specified KMS key in your account that you create, own, and manage.</p> <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p> </li>
/// </ul>
/// <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
/// <p>For example:</p>
/// <ul>
/// <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li>
/// <li> <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li>
/// <li> <p>Alias name: <code>alias/ExampleAlias</code> </p> </li>
/// <li> <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code> </p> </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
pub fn set_kms_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kms_key(input);
self
}
}
/// Fluent builder constructing a request to `DeleteLedger`.
///
/// <p>Deletes a ledger and all of its contents. This action is irreversible.</p>
/// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeleteLedger {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::delete_ledger_input::Builder,
}
impl DeleteLedger {
/// Creates a new `DeleteLedger`.
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::DeleteLedgerOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteLedgerError>,
> {
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 ledger that you want to delete.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger that you want to delete.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
}
/// Fluent builder constructing a request to `DescribeJournalKinesisStream`.
///
/// <p>Returns detailed information about a given Amazon QLDB journal stream. The output includes the Amazon Resource Name (ARN), stream name, current status, creation time, and the parameters of the original stream creation request.</p>
/// <p>This action does not return any expired journal streams. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/streams.create.html#streams.create.states.expiration">Expiration for terminal streams</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DescribeJournalKinesisStream {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::describe_journal_kinesis_stream_input::Builder,
}
impl DescribeJournalKinesisStream {
/// Creates a new `DescribeJournalKinesisStream`.
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::DescribeJournalKinesisStreamOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeJournalKinesisStreamError>,
> {
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 ledger.</p>
pub fn ledger_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ledger_name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_ledger_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ledger_name(input);
self
}
/// <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream to describe.</p>
pub fn stream_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.stream_id(input.into());
self
}
/// <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream to describe.</p>
pub fn set_stream_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_stream_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeJournalS3Export`.
///
/// <p>Returns information about a journal export job, including the ledger name, export ID, creation time, current status, and the parameters of the original export creation request.</p>
/// <p>This action does not return any expired export jobs. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration">Export job expiration</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// <p>If the export job with the given <code>ExportId</code> doesn't exist, then throws <code>ResourceNotFoundException</code>.</p>
/// <p>If the ledger with the given <code>Name</code> doesn't exist, then throws <code>ResourceNotFoundException</code>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DescribeJournalS3Export {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::describe_journal_s3_export_input::Builder,
}
impl DescribeJournalS3Export {
/// Creates a new `DescribeJournalS3Export`.
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::DescribeJournalS3ExportOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeJournalS3ExportError>,
> {
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 ledger.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The UUID (represented in Base62-encoded text) of the journal export job to describe.</p>
pub fn export_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.export_id(input.into());
self
}
/// <p>The UUID (represented in Base62-encoded text) of the journal export job to describe.</p>
pub fn set_export_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_export_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeLedger`.
///
/// <p>Returns information about a ledger, including its state, permissions mode, encryption at rest settings, and when it was created.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DescribeLedger {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::describe_ledger_input::Builder,
}
impl DescribeLedger {
/// Creates a new `DescribeLedger`.
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::DescribeLedgerOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeLedgerError>,
> {
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 ledger that you want to describe.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger that you want to describe.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
}
/// Fluent builder constructing a request to `ExportJournalToS3`.
///
/// <p>Exports journal contents within a date and time range from a ledger into a specified Amazon Simple Storage Service (Amazon S3) bucket. A journal export job can write the data objects in either the text or binary representation of Amazon Ion format, or in <i>JSON Lines</i> text format.</p>
/// <p>In JSON Lines format, each journal block in the exported data object is a valid JSON object that is delimited by a newline. You can use this format to easily integrate JSON exports with analytics tools such as Glue and Amazon Athena because these services can parse newline-delimited JSON automatically. For more information about the format, see <a href="https://jsonlines.org/">JSON Lines</a>.</p>
/// <p>If the ledger with the given <code>Name</code> doesn't exist, then throws <code>ResourceNotFoundException</code>.</p>
/// <p>If the ledger with the given <code>Name</code> is in <code>CREATING</code> status, then throws <code>ResourcePreconditionNotMetException</code>.</p>
/// <p>You can initiate up to two concurrent journal export requests for each ledger. Beyond this limit, journal export requests throw <code>LimitExceededException</code>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ExportJournalToS3 {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::export_journal_to_s3_input::Builder,
}
impl ExportJournalToS3 {
/// Creates a new `ExportJournalToS3`.
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::ExportJournalToS3Output,
aws_smithy_http::result::SdkError<crate::error::ExportJournalToS3Error>,
> {
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 ledger.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The inclusive start date and time for the range of journal contents to export.</p>
/// <p>The <code>InclusiveStartTime</code> must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p>
/// <p>The <code>InclusiveStartTime</code> must be before <code>ExclusiveEndTime</code>.</p>
/// <p>If you provide an <code>InclusiveStartTime</code> that is before the ledger's <code>CreationDateTime</code>, Amazon QLDB defaults it to the ledger's <code>CreationDateTime</code>.</p>
pub fn inclusive_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inner = self.inner.inclusive_start_time(input);
self
}
/// <p>The inclusive start date and time for the range of journal contents to export.</p>
/// <p>The <code>InclusiveStartTime</code> must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p>
/// <p>The <code>InclusiveStartTime</code> must be before <code>ExclusiveEndTime</code>.</p>
/// <p>If you provide an <code>InclusiveStartTime</code> that is before the ledger's <code>CreationDateTime</code>, Amazon QLDB defaults it to the ledger's <code>CreationDateTime</code>.</p>
pub fn set_inclusive_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inner = self.inner.set_inclusive_start_time(input);
self
}
/// <p>The exclusive end date and time for the range of journal contents to export.</p>
/// <p>The <code>ExclusiveEndTime</code> must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p>
/// <p>The <code>ExclusiveEndTime</code> must be less than or equal to the current UTC date and time.</p>
pub fn exclusive_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inner = self.inner.exclusive_end_time(input);
self
}
/// <p>The exclusive end date and time for the range of journal contents to export.</p>
/// <p>The <code>ExclusiveEndTime</code> must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p>
/// <p>The <code>ExclusiveEndTime</code> must be less than or equal to the current UTC date and time.</p>
pub fn set_exclusive_end_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inner = self.inner.set_exclusive_end_time(input);
self
}
/// <p>The configuration settings of the Amazon S3 bucket destination for your export request.</p>
pub fn s3_export_configuration(
mut self,
input: crate::model::S3ExportConfiguration,
) -> Self {
self.inner = self.inner.s3_export_configuration(input);
self
}
/// <p>The configuration settings of the Amazon S3 bucket destination for your export request.</p>
pub fn set_s3_export_configuration(
mut self,
input: std::option::Option<crate::model::S3ExportConfiguration>,
) -> Self {
self.inner = self.inner.set_s3_export_configuration(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:</p>
/// <ul>
/// <li> <p>Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.</p> </li>
/// <li> <p>(Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.</p> </li>
/// </ul>
/// <p>To pass a role to QLDB when requesting a journal export, you must have permissions to perform the <code>iam:PassRole</code> action on the IAM role resource. This is required for all journal export requests.</p>
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.role_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:</p>
/// <ul>
/// <li> <p>Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.</p> </li>
/// <li> <p>(Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.</p> </li>
/// </ul>
/// <p>To pass a role to QLDB when requesting a journal export, you must have permissions to perform the <code>iam:PassRole</code> action on the IAM role resource. This is required for all journal export requests.</p>
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_role_arn(input);
self
}
/// <p>The output format of your exported journal data. If this parameter is not specified, the exported data defaults to <code>ION_TEXT</code> format.</p>
pub fn output_format(mut self, input: crate::model::OutputFormat) -> Self {
self.inner = self.inner.output_format(input);
self
}
/// <p>The output format of your exported journal data. If this parameter is not specified, the exported data defaults to <code>ION_TEXT</code> format.</p>
pub fn set_output_format(
mut self,
input: std::option::Option<crate::model::OutputFormat>,
) -> Self {
self.inner = self.inner.set_output_format(input);
self
}
}
/// Fluent builder constructing a request to `GetBlock`.
///
/// <p>Returns a block object at a specified address in a journal. Also returns a proof of the specified block for verification if <code>DigestTipAddress</code> is provided.</p>
/// <p>For information about the data contents in a block, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/journal-contents.html">Journal contents</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// <p>If the specified ledger doesn't exist or is in <code>DELETING</code> status, then throws <code>ResourceNotFoundException</code>.</p>
/// <p>If the specified ledger is in <code>CREATING</code> status, then throws <code>ResourcePreconditionNotMetException</code>.</p>
/// <p>If no block exists with the specified address, then throws <code>InvalidParameterException</code>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetBlock {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_block_input::Builder,
}
impl GetBlock {
/// Creates a new `GetBlock`.
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::GetBlockOutput,
aws_smithy_http::result::SdkError<crate::error::GetBlockError>,
> {
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 ledger.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The location of the block that you want to request. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
/// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
pub fn block_address(mut self, input: crate::model::ValueHolder) -> Self {
self.inner = self.inner.block_address(input);
self
}
/// <p>The location of the block that you want to request. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
/// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
pub fn set_block_address(
mut self,
input: std::option::Option<crate::model::ValueHolder>,
) -> Self {
self.inner = self.inner.set_block_address(input);
self
}
/// <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
/// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
pub fn digest_tip_address(mut self, input: crate::model::ValueHolder) -> Self {
self.inner = self.inner.digest_tip_address(input);
self
}
/// <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
/// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
pub fn set_digest_tip_address(
mut self,
input: std::option::Option<crate::model::ValueHolder>,
) -> Self {
self.inner = self.inner.set_digest_tip_address(input);
self
}
}
/// Fluent builder constructing a request to `GetDigest`.
///
/// <p>Returns the digest of a ledger at the latest committed block in the journal. The response includes a 256-bit hash value and a block address.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetDigest {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_digest_input::Builder,
}
impl GetDigest {
/// Creates a new `GetDigest`.
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::GetDigestOutput,
aws_smithy_http::result::SdkError<crate::error::GetDigestError>,
> {
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 ledger.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
}
/// Fluent builder constructing a request to `GetRevision`.
///
/// <p>Returns a revision data object for a specified document ID and block address. Also returns a proof of the specified revision for verification if <code>DigestTipAddress</code> is provided.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetRevision {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_revision_input::Builder,
}
impl GetRevision {
/// Creates a new `GetRevision`.
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::GetRevisionOutput,
aws_smithy_http::result::SdkError<crate::error::GetRevisionError>,
> {
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 ledger.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
/// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
pub fn block_address(mut self, input: crate::model::ValueHolder) -> Self {
self.inner = self.inner.block_address(input);
self
}
/// <p>The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
/// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
pub fn set_block_address(
mut self,
input: std::option::Option<crate::model::ValueHolder>,
) -> Self {
self.inner = self.inner.set_block_address(input);
self
}
/// <p>The UUID (represented in Base62-encoded text) of the document to be verified.</p>
pub fn document_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.document_id(input.into());
self
}
/// <p>The UUID (represented in Base62-encoded text) of the document to be verified.</p>
pub fn set_document_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_document_id(input);
self
}
/// <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
/// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
pub fn digest_tip_address(mut self, input: crate::model::ValueHolder) -> Self {
self.inner = self.inner.digest_tip_address(input);
self
}
/// <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
/// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
pub fn set_digest_tip_address(
mut self,
input: std::option::Option<crate::model::ValueHolder>,
) -> Self {
self.inner = self.inner.set_digest_tip_address(input);
self
}
}
/// Fluent builder constructing a request to `ListJournalKinesisStreamsForLedger`.
///
/// <p>Returns an array of all Amazon QLDB journal stream descriptors for a given ledger. The output of each stream descriptor includes the same details that are returned by <code>DescribeJournalKinesisStream</code>.</p>
/// <p>This action does not return any expired journal streams. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/streams.create.html#streams.create.states.expiration">Expiration for terminal streams</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// <p>This action returns a maximum of <code>MaxResults</code> items. It is paginated so that you can retrieve all the items by calling <code>ListJournalKinesisStreamsForLedger</code> multiple times.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListJournalKinesisStreamsForLedger {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_journal_kinesis_streams_for_ledger_input::Builder,
}
impl ListJournalKinesisStreamsForLedger {
/// Creates a new `ListJournalKinesisStreamsForLedger`.
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::ListJournalKinesisStreamsForLedgerOutput,
aws_smithy_http::result::SdkError<
crate::error::ListJournalKinesisStreamsForLedgerError,
>,
> {
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::ListJournalKinesisStreamsForLedgerPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(
self,
) -> crate::paginator::ListJournalKinesisStreamsForLedgerPaginator {
crate::paginator::ListJournalKinesisStreamsForLedgerPaginator::new(
self.handle,
self.inner,
)
}
/// <p>The name of the ledger.</p>
pub fn ledger_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ledger_name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_ledger_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ledger_name(input);
self
}
/// <p>The maximum number of results to return in a single <code>ListJournalKinesisStreamsForLedger</code> request. (The actual number of results returned might be fewer.)</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of results to return in a single <code>ListJournalKinesisStreamsForLedger</code> request. (The actual number of results returned might be fewer.)</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListJournalKinesisStreamsForLedger</code> call, you should use that value as input here.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListJournalKinesisStreamsForLedger</code> call, you should use that value as input here.</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
}
}
/// Fluent builder constructing a request to `ListJournalS3Exports`.
///
/// <p>Returns an array of journal export job descriptions for all ledgers that are associated with the current Amazon Web Services account and Region.</p>
/// <p>This action returns a maximum of <code>MaxResults</code> items, and is paginated so that you can retrieve all the items by calling <code>ListJournalS3Exports</code> multiple times.</p>
/// <p>This action does not return any expired export jobs. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration">Export job expiration</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListJournalS3Exports {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_journal_s3_exports_input::Builder,
}
impl ListJournalS3Exports {
/// Creates a new `ListJournalS3Exports`.
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::ListJournalS3ExportsOutput,
aws_smithy_http::result::SdkError<crate::error::ListJournalS3ExportsError>,
> {
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::ListJournalS3ExportsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListJournalS3ExportsPaginator {
crate::paginator::ListJournalS3ExportsPaginator::new(self.handle, self.inner)
}
/// <p>The maximum number of results to return in a single <code>ListJournalS3Exports</code> request. (The actual number of results returned might be fewer.)</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of results to return in a single <code>ListJournalS3Exports</code> request. (The actual number of results returned might be fewer.)</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListJournalS3Exports</code> call, then you should use that value as input here.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListJournalS3Exports</code> call, then you should use that value as input here.</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
}
}
/// Fluent builder constructing a request to `ListJournalS3ExportsForLedger`.
///
/// <p>Returns an array of journal export job descriptions for a specified ledger.</p>
/// <p>This action returns a maximum of <code>MaxResults</code> items, and is paginated so that you can retrieve all the items by calling <code>ListJournalS3ExportsForLedger</code> multiple times.</p>
/// <p>This action does not return any expired export jobs. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration">Export job expiration</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListJournalS3ExportsForLedger {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_journal_s3_exports_for_ledger_input::Builder,
}
impl ListJournalS3ExportsForLedger {
/// Creates a new `ListJournalS3ExportsForLedger`.
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::ListJournalS3ExportsForLedgerOutput,
aws_smithy_http::result::SdkError<crate::error::ListJournalS3ExportsForLedgerError>,
> {
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::ListJournalS3ExportsForLedgerPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListJournalS3ExportsForLedgerPaginator {
crate::paginator::ListJournalS3ExportsForLedgerPaginator::new(self.handle, self.inner)
}
/// <p>The name of the ledger.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The maximum number of results to return in a single <code>ListJournalS3ExportsForLedger</code> request. (The actual number of results returned might be fewer.)</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of results to return in a single <code>ListJournalS3ExportsForLedger</code> request. (The actual number of results returned might be fewer.)</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListJournalS3ExportsForLedger</code> call, then you should use that value as input here.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListJournalS3ExportsForLedger</code> call, then you should use that value as input here.</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
}
}
/// Fluent builder constructing a request to `ListLedgers`.
///
/// <p>Returns an array of ledger summaries that are associated with the current Amazon Web Services account and Region.</p>
/// <p>This action returns a maximum of 100 items and is paginated so that you can retrieve all the items by calling <code>ListLedgers</code> multiple times.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListLedgers {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_ledgers_input::Builder,
}
impl ListLedgers {
/// Creates a new `ListLedgers`.
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::ListLedgersOutput,
aws_smithy_http::result::SdkError<crate::error::ListLedgersError>,
> {
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::ListLedgersPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListLedgersPaginator {
crate::paginator::ListLedgersPaginator::new(self.handle, self.inner)
}
/// <p>The maximum number of results to return in a single <code>ListLedgers</code> request. (The actual number of results returned might be fewer.)</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of results to return in a single <code>ListLedgers</code> request. (The actual number of results returned might be fewer.)</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListLedgers</code> call, then you should use that value as input here.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>A pagination token, indicating that you want to retrieve the next page of results. If you received a value for <code>NextToken</code> in the response from a previous <code>ListLedgers</code> call, then you should use that value as input here.</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
}
}
/// Fluent builder constructing a request to `ListTagsForResource`.
///
/// <p>Returns all tags for a specified Amazon QLDB resource.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListTagsForResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_tags_for_resource_input::Builder,
}
impl ListTagsForResource {
/// Creates a new `ListTagsForResource`.
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::ListTagsForResourceOutput,
aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError>,
> {
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 Amazon Resource Name (ARN) for which to list the tags. For example:</p>
/// <p> <code>arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger</code> </p>
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for which to list the tags. For example:</p>
/// <p> <code>arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger</code> </p>
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_resource_arn(input);
self
}
}
/// Fluent builder constructing a request to `StreamJournalToKinesis`.
///
/// <p>Creates a journal stream for a given Amazon QLDB ledger. The stream captures every document revision that is committed to the ledger's journal and delivers the data to a specified Amazon Kinesis Data Streams resource.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct StreamJournalToKinesis {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::stream_journal_to_kinesis_input::Builder,
}
impl StreamJournalToKinesis {
/// Creates a new `StreamJournalToKinesis`.
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::StreamJournalToKinesisOutput,
aws_smithy_http::result::SdkError<crate::error::StreamJournalToKinesisError>,
> {
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 ledger.</p>
pub fn ledger_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ledger_name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_ledger_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ledger_name(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.</p>
/// <p>To pass a role to QLDB when requesting a journal stream, you must have permissions to perform the <code>iam:PassRole</code> action on the IAM role resource. This is required for all journal stream requests.</p>
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.role_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.</p>
/// <p>To pass a role to QLDB when requesting a journal stream, you must have permissions to perform the <code>iam:PassRole</code> action on the IAM role resource. This is required for all journal stream requests.</p>
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_role_arn(input);
self
}
/// Adds a key-value pair to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The key-value pairs to add as tags to the stream that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.tags(k.into(), v);
self
}
/// <p>The key-value pairs to add as tags to the stream that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<
std::string::String,
std::option::Option<std::string::String>,
>,
>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
/// <p>The inclusive start date and time from which to start streaming journal data. This parameter must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p>
/// <p>The <code>InclusiveStartTime</code> cannot be in the future and must be before <code>ExclusiveEndTime</code>.</p>
/// <p>If you provide an <code>InclusiveStartTime</code> that is before the ledger's <code>CreationDateTime</code>, QLDB effectively defaults it to the ledger's <code>CreationDateTime</code>.</p>
pub fn inclusive_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inner = self.inner.inclusive_start_time(input);
self
}
/// <p>The inclusive start date and time from which to start streaming journal data. This parameter must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p>
/// <p>The <code>InclusiveStartTime</code> cannot be in the future and must be before <code>ExclusiveEndTime</code>.</p>
/// <p>If you provide an <code>InclusiveStartTime</code> that is before the ledger's <code>CreationDateTime</code>, QLDB effectively defaults it to the ledger's <code>CreationDateTime</code>.</p>
pub fn set_inclusive_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inner = self.inner.set_inclusive_start_time(input);
self
}
/// <p>The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it.</p>
/// <p>The <code>ExclusiveEndTime</code> must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p>
pub fn exclusive_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inner = self.inner.exclusive_end_time(input);
self
}
/// <p>The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it.</p>
/// <p>The <code>ExclusiveEndTime</code> must be in <code>ISO 8601</code> date and time format and in Universal Coordinated Time (UTC). For example: <code>2019-06-13T21:36:34Z</code>.</p>
pub fn set_exclusive_end_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inner = self.inner.set_exclusive_end_time(input);
self
}
/// <p>The configuration settings of the Kinesis Data Streams destination for your stream request.</p>
pub fn kinesis_configuration(mut self, input: crate::model::KinesisConfiguration) -> Self {
self.inner = self.inner.kinesis_configuration(input);
self
}
/// <p>The configuration settings of the Kinesis Data Streams destination for your stream request.</p>
pub fn set_kinesis_configuration(
mut self,
input: std::option::Option<crate::model::KinesisConfiguration>,
) -> Self {
self.inner = self.inner.set_kinesis_configuration(input);
self
}
/// <p>The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream.</p>
/// <p>Your stream name must be unique among other <i>active</i> streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.stream_name(input.into());
self
}
/// <p>The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream.</p>
/// <p>Your stream name must be unique among other <i>active</i> streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_stream_name(input);
self
}
}
/// Fluent builder constructing a request to `TagResource`.
///
/// <p>Adds one or more tags to a specified Amazon QLDB resource.</p>
/// <p>A resource can have up to 50 tags. If you try to create more than 50 tags for a resource, your request fails and returns an error.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct TagResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::tag_resource_input::Builder,
}
impl TagResource {
/// Creates a new `TagResource`.
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::TagResourceOutput,
aws_smithy_http::result::SdkError<crate::error::TagResourceError>,
> {
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 Amazon Resource Name (ARN) to which you want to add the tags. For example:</p>
/// <p> <code>arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger</code> </p>
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) to which you want to add the tags. For example:</p>
/// <p> <code>arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger</code> </p>
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_resource_arn(input);
self
}
/// Adds a key-value pair to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The key-value pairs to add as tags to the specified QLDB resource. Tag keys are case sensitive. If you specify a key that already exists for the resource, your request fails and returns an error. Tag values are case sensitive and can be null.</p>
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.tags(k.into(), v);
self
}
/// <p>The key-value pairs to add as tags to the specified QLDB resource. Tag keys are case sensitive. If you specify a key that already exists for the resource, your request fails and returns an error. Tag values are case sensitive and can be null.</p>
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<
std::string::String,
std::option::Option<std::string::String>,
>,
>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `UntagResource`.
///
/// <p>Removes one or more tags from a specified Amazon QLDB resource. You can specify up to 50 tag keys to remove.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UntagResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::untag_resource_input::Builder,
}
impl UntagResource {
/// Creates a new `UntagResource`.
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::UntagResourceOutput,
aws_smithy_http::result::SdkError<crate::error::UntagResourceError>,
> {
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 Amazon Resource Name (ARN) from which to remove the tags. For example:</p>
/// <p> <code>arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger</code> </p>
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) from which to remove the tags. For example:</p>
/// <p> <code>arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger</code> </p>
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_resource_arn(input);
self
}
/// Appends an item to `TagKeys`.
///
/// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
///
/// <p>The list of tag keys to remove.</p>
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.tag_keys(input.into());
self
}
/// <p>The list of tag keys to remove.</p>
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_tag_keys(input);
self
}
}
/// Fluent builder constructing a request to `UpdateLedger`.
///
/// <p>Updates properties on a ledger.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateLedger {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_ledger_input::Builder,
}
impl UpdateLedger {
/// Creates a new `UpdateLedger`.
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::UpdateLedgerOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateLedgerError>,
> {
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 ledger.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (<code>true</code>) by default.</p>
/// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
pub fn deletion_protection(mut self, input: bool) -> Self {
self.inner = self.inner.deletion_protection(input);
self
}
/// <p>The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (<code>true</code>) by default.</p>
/// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set the flag to <code>false</code>.</p>
pub fn set_deletion_protection(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_deletion_protection(input);
self
}
/// <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// <p>Use one of the following options to specify this parameter:</p>
/// <ul>
/// <li> <p> <code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p> </li>
/// <li> <p> <b>Undefined</b>: Make no changes to the KMS key of the ledger.</p> </li>
/// <li> <p> <b>A valid symmetric customer managed KMS key</b>: Use the specified KMS key in your account that you create, own, and manage.</p> <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p> </li>
/// </ul>
/// <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
/// <p>For example:</p>
/// <ul>
/// <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li>
/// <li> <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li>
/// <li> <p>Alias name: <code>alias/ExampleAlias</code> </p> </li>
/// <li> <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code> </p> </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
pub fn kms_key(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kms_key(input.into());
self
}
/// <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// <p>Use one of the following options to specify this parameter:</p>
/// <ul>
/// <li> <p> <code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p> </li>
/// <li> <p> <b>Undefined</b>: Make no changes to the KMS key of the ledger.</p> </li>
/// <li> <p> <b>A valid symmetric customer managed KMS key</b>: Use the specified KMS key in your account that you create, own, and manage.</p> <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p> </li>
/// </ul>
/// <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
/// <p>For example:</p>
/// <ul>
/// <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li>
/// <li> <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li>
/// <li> <p>Alias name: <code>alias/ExampleAlias</code> </p> </li>
/// <li> <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code> </p> </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
pub fn set_kms_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kms_key(input);
self
}
}
/// Fluent builder constructing a request to `UpdateLedgerPermissionsMode`.
///
/// <p>Updates the permissions mode of a ledger.</p> <important>
/// <p>Before you switch to the <code>STANDARD</code> permissions mode, you must first create all required IAM policies and table tags to avoid disruption to your users. To learn more, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/ledger-management.basics.html#ledger-mgmt.basics.update-permissions.migrating">Migrating to the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
/// </important>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateLedgerPermissionsMode {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_ledger_permissions_mode_input::Builder,
}
impl UpdateLedgerPermissionsMode {
/// Creates a new `UpdateLedgerPermissionsMode`.
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::UpdateLedgerPermissionsModeOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateLedgerPermissionsModeError>,
> {
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 ledger.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The permissions mode to assign to the ledger. This parameter can have one of the following values:</p>
/// <ul>
/// <li> <p> <code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p> <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p> </li>
/// <li> <p> <code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p> <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p> </li>
/// </ul> <note>
/// <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p>
/// </note>
pub fn permissions_mode(mut self, input: crate::model::PermissionsMode) -> Self {
self.inner = self.inner.permissions_mode(input);
self
}
/// <p>The permissions mode to assign to the ledger. This parameter can have one of the following values:</p>
/// <ul>
/// <li> <p> <code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p> <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p> </li>
/// <li> <p> <code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p> <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p> </li>
/// </ul> <note>
/// <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p>
/// </note>
pub fn set_permissions_mode(
mut self,
input: std::option::Option<crate::model::PermissionsMode>,
) -> Self {
self.inner = self.inner.set_permissions_mode(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(sdk_config: &aws_types::sdk_config::SdkConfig) -> Self {
Self::from_conf(sdk_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 }),
}
}
}