1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidateResourcePolicyOutput {
/// <p>Returns a message stating that your Reource Policy passed validation. </p>
pub policy_validation_passed: bool,
/// <p>Returns an error message if your policy doesn't pass validatation.</p>
pub validation_errors: std::option::Option<std::vec::Vec<crate::model::ValidationErrorsEntry>>,
}
impl ValidateResourcePolicyOutput {
/// <p>Returns a message stating that your Reource Policy passed validation. </p>
pub fn policy_validation_passed(&self) -> bool {
self.policy_validation_passed
}
/// <p>Returns an error message if your policy doesn't pass validatation.</p>
pub fn validation_errors(&self) -> std::option::Option<&[crate::model::ValidationErrorsEntry]> {
self.validation_errors.as_deref()
}
}
impl std::fmt::Debug for ValidateResourcePolicyOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValidateResourcePolicyOutput");
formatter.field("policy_validation_passed", &self.policy_validation_passed);
formatter.field("validation_errors", &self.validation_errors);
formatter.finish()
}
}
/// See [`ValidateResourcePolicyOutput`](crate::output::ValidateResourcePolicyOutput)
pub mod validate_resource_policy_output {
/// A builder for [`ValidateResourcePolicyOutput`](crate::output::ValidateResourcePolicyOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) policy_validation_passed: std::option::Option<bool>,
pub(crate) validation_errors:
std::option::Option<std::vec::Vec<crate::model::ValidationErrorsEntry>>,
}
impl Builder {
/// <p>Returns a message stating that your Reource Policy passed validation. </p>
pub fn policy_validation_passed(mut self, input: bool) -> Self {
self.policy_validation_passed = Some(input);
self
}
/// <p>Returns a message stating that your Reource Policy passed validation. </p>
pub fn set_policy_validation_passed(mut self, input: std::option::Option<bool>) -> Self {
self.policy_validation_passed = input;
self
}
/// Appends an item to `validation_errors`.
///
/// To override the contents of this collection use [`set_validation_errors`](Self::set_validation_errors).
///
/// <p>Returns an error message if your policy doesn't pass validatation.</p>
pub fn validation_errors(
mut self,
input: impl Into<crate::model::ValidationErrorsEntry>,
) -> Self {
let mut v = self.validation_errors.unwrap_or_default();
v.push(input.into());
self.validation_errors = Some(v);
self
}
/// <p>Returns an error message if your policy doesn't pass validatation.</p>
pub fn set_validation_errors(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ValidationErrorsEntry>>,
) -> Self {
self.validation_errors = input;
self
}
/// Consumes the builder and constructs a [`ValidateResourcePolicyOutput`](crate::output::ValidateResourcePolicyOutput)
pub fn build(self) -> crate::output::ValidateResourcePolicyOutput {
crate::output::ValidateResourcePolicyOutput {
policy_validation_passed: self.policy_validation_passed.unwrap_or_default(),
validation_errors: self.validation_errors,
}
}
}
}
impl ValidateResourcePolicyOutput {
/// Creates a new builder-style object to manufacture [`ValidateResourcePolicyOutput`](crate::output::ValidateResourcePolicyOutput)
pub fn builder() -> crate::output::validate_resource_policy_output::Builder {
crate::output::validate_resource_policy_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateSecretVersionStageOutput {
/// <p>The ARN of the secret with the modified staging label.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret with the modified staging label.</p>
pub name: std::option::Option<std::string::String>,
}
impl UpdateSecretVersionStageOutput {
/// <p>The ARN of the secret with the modified staging label.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret with the modified staging label.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
impl std::fmt::Debug for UpdateSecretVersionStageOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateSecretVersionStageOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.finish()
}
}
/// See [`UpdateSecretVersionStageOutput`](crate::output::UpdateSecretVersionStageOutput)
pub mod update_secret_version_stage_output {
/// A builder for [`UpdateSecretVersionStageOutput`](crate::output::UpdateSecretVersionStageOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the secret with the modified staging label.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret with the modified staging label.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret with the modified staging label.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret with the modified staging label.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Consumes the builder and constructs a [`UpdateSecretVersionStageOutput`](crate::output::UpdateSecretVersionStageOutput)
pub fn build(self) -> crate::output::UpdateSecretVersionStageOutput {
crate::output::UpdateSecretVersionStageOutput {
arn: self.arn,
name: self.name,
}
}
}
}
impl UpdateSecretVersionStageOutput {
/// Creates a new builder-style object to manufacture [`UpdateSecretVersionStageOutput`](crate::output::UpdateSecretVersionStageOutput)
pub fn builder() -> crate::output::update_secret_version_stage_output::Builder {
crate::output::update_secret_version_stage_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateSecretOutput {
/// <p>The ARN of the secret that was updated.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret that was updated.</p>
pub name: std::option::Option<std::string::String>,
/// <p>If a new version of the secret was created by this operation, then <code>VersionId</code>
/// contains the unique identifier of the new version.</p>
pub version_id: std::option::Option<std::string::String>,
}
impl UpdateSecretOutput {
/// <p>The ARN of the secret that was updated.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret that was updated.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>If a new version of the secret was created by this operation, then <code>VersionId</code>
/// contains the unique identifier of the new version.</p>
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
}
impl std::fmt::Debug for UpdateSecretOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateSecretOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("version_id", &self.version_id);
formatter.finish()
}
}
/// See [`UpdateSecretOutput`](crate::output::UpdateSecretOutput)
pub mod update_secret_output {
/// A builder for [`UpdateSecretOutput`](crate::output::UpdateSecretOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the secret that was updated.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret that was updated.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret that was updated.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret that was updated.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>If a new version of the secret was created by this operation, then <code>VersionId</code>
/// contains the unique identifier of the new version.</p>
pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
/// <p>If a new version of the secret was created by this operation, then <code>VersionId</code>
/// contains the unique identifier of the new version.</p>
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
/// Consumes the builder and constructs a [`UpdateSecretOutput`](crate::output::UpdateSecretOutput)
pub fn build(self) -> crate::output::UpdateSecretOutput {
crate::output::UpdateSecretOutput {
arn: self.arn,
name: self.name,
version_id: self.version_id,
}
}
}
}
impl UpdateSecretOutput {
/// Creates a new builder-style object to manufacture [`UpdateSecretOutput`](crate::output::UpdateSecretOutput)
pub fn builder() -> crate::output::update_secret_output::Builder {
crate::output::update_secret_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceOutput {}
impl std::fmt::Debug for UntagResourceOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UntagResourceOutput");
formatter.finish()
}
}
/// See [`UntagResourceOutput`](crate::output::UntagResourceOutput)
pub mod untag_resource_output {
/// A builder for [`UntagResourceOutput`](crate::output::UntagResourceOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
/// Consumes the builder and constructs a [`UntagResourceOutput`](crate::output::UntagResourceOutput)
pub fn build(self) -> crate::output::UntagResourceOutput {
crate::output::UntagResourceOutput {}
}
}
}
impl UntagResourceOutput {
/// Creates a new builder-style object to manufacture [`UntagResourceOutput`](crate::output::UntagResourceOutput)
pub fn builder() -> crate::output::untag_resource_output::Builder {
crate::output::untag_resource_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TagResourceOutput {}
impl std::fmt::Debug for TagResourceOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TagResourceOutput");
formatter.finish()
}
}
/// See [`TagResourceOutput`](crate::output::TagResourceOutput)
pub mod tag_resource_output {
/// A builder for [`TagResourceOutput`](crate::output::TagResourceOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
/// Consumes the builder and constructs a [`TagResourceOutput`](crate::output::TagResourceOutput)
pub fn build(self) -> crate::output::TagResourceOutput {
crate::output::TagResourceOutput {}
}
}
}
impl TagResourceOutput {
/// Creates a new builder-style object to manufacture [`TagResourceOutput`](crate::output::TagResourceOutput)
pub fn builder() -> crate::output::tag_resource_output::Builder {
crate::output::tag_resource_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopReplicationToReplicaOutput {
/// <p>Response <code>StopReplicationToReplica</code> of a secret, based on the <code>ARN,</code>.</p>
pub arn: std::option::Option<std::string::String>,
}
impl StopReplicationToReplicaOutput {
/// <p>Response <code>StopReplicationToReplica</code> of a secret, based on the <code>ARN,</code>.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
}
impl std::fmt::Debug for StopReplicationToReplicaOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopReplicationToReplicaOutput");
formatter.field("arn", &self.arn);
formatter.finish()
}
}
/// See [`StopReplicationToReplicaOutput`](crate::output::StopReplicationToReplicaOutput)
pub mod stop_replication_to_replica_output {
/// A builder for [`StopReplicationToReplicaOutput`](crate::output::StopReplicationToReplicaOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>Response <code>StopReplicationToReplica</code> of a secret, based on the <code>ARN,</code>.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>Response <code>StopReplicationToReplica</code> of a secret, based on the <code>ARN,</code>.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// Consumes the builder and constructs a [`StopReplicationToReplicaOutput`](crate::output::StopReplicationToReplicaOutput)
pub fn build(self) -> crate::output::StopReplicationToReplicaOutput {
crate::output::StopReplicationToReplicaOutput { arn: self.arn }
}
}
}
impl StopReplicationToReplicaOutput {
/// Creates a new builder-style object to manufacture [`StopReplicationToReplicaOutput`](crate::output::StopReplicationToReplicaOutput)
pub fn builder() -> crate::output::stop_replication_to_replica_output::Builder {
crate::output::stop_replication_to_replica_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RotateSecretOutput {
/// <p>The ARN of the secret.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The ID of the new version of the secret created by the rotation started by this
/// request.</p>
pub version_id: std::option::Option<std::string::String>,
}
impl RotateSecretOutput {
/// <p>The ARN of the secret.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The ID of the new version of the secret created by the rotation started by this
/// request.</p>
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
}
impl std::fmt::Debug for RotateSecretOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RotateSecretOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("version_id", &self.version_id);
formatter.finish()
}
}
/// See [`RotateSecretOutput`](crate::output::RotateSecretOutput)
pub mod rotate_secret_output {
/// A builder for [`RotateSecretOutput`](crate::output::RotateSecretOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the secret.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The ID of the new version of the secret created by the rotation started by this
/// request.</p>
pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
/// <p>The ID of the new version of the secret created by the rotation started by this
/// request.</p>
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
/// Consumes the builder and constructs a [`RotateSecretOutput`](crate::output::RotateSecretOutput)
pub fn build(self) -> crate::output::RotateSecretOutput {
crate::output::RotateSecretOutput {
arn: self.arn,
name: self.name,
version_id: self.version_id,
}
}
}
}
impl RotateSecretOutput {
/// Creates a new builder-style object to manufacture [`RotateSecretOutput`](crate::output::RotateSecretOutput)
pub fn builder() -> crate::output::rotate_secret_output::Builder {
crate::output::rotate_secret_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RestoreSecretOutput {
/// <p>The ARN of the secret that was restored.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret that was restored.</p>
pub name: std::option::Option<std::string::String>,
}
impl RestoreSecretOutput {
/// <p>The ARN of the secret that was restored.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret that was restored.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
impl std::fmt::Debug for RestoreSecretOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RestoreSecretOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.finish()
}
}
/// See [`RestoreSecretOutput`](crate::output::RestoreSecretOutput)
pub mod restore_secret_output {
/// A builder for [`RestoreSecretOutput`](crate::output::RestoreSecretOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the secret that was restored.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret that was restored.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret that was restored.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret that was restored.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Consumes the builder and constructs a [`RestoreSecretOutput`](crate::output::RestoreSecretOutput)
pub fn build(self) -> crate::output::RestoreSecretOutput {
crate::output::RestoreSecretOutput {
arn: self.arn,
name: self.name,
}
}
}
}
impl RestoreSecretOutput {
/// Creates a new builder-style object to manufacture [`RestoreSecretOutput`](crate::output::RestoreSecretOutput)
pub fn builder() -> crate::output::restore_secret_output::Builder {
crate::output::restore_secret_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReplicateSecretToRegionsOutput {
/// <p>Replicate a secret based on the <code>ReplicaRegionType</code>> consisting of a
/// Region(required) and a KMSKeyId (optional) which can be the ARN, KeyID, or Alias. </p>
pub arn: std::option::Option<std::string::String>,
/// <p>Describes the secret replication status as <code>PENDING</code>, <code>SUCCESS</code> or <code>FAIL</code>.</p>
pub replication_status: std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
}
impl ReplicateSecretToRegionsOutput {
/// <p>Replicate a secret based on the <code>ReplicaRegionType</code>> consisting of a
/// Region(required) and a KMSKeyId (optional) which can be the ARN, KeyID, or Alias. </p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>Describes the secret replication status as <code>PENDING</code>, <code>SUCCESS</code> or <code>FAIL</code>.</p>
pub fn replication_status(
&self,
) -> std::option::Option<&[crate::model::ReplicationStatusType]> {
self.replication_status.as_deref()
}
}
impl std::fmt::Debug for ReplicateSecretToRegionsOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReplicateSecretToRegionsOutput");
formatter.field("arn", &self.arn);
formatter.field("replication_status", &self.replication_status);
formatter.finish()
}
}
/// See [`ReplicateSecretToRegionsOutput`](crate::output::ReplicateSecretToRegionsOutput)
pub mod replicate_secret_to_regions_output {
/// A builder for [`ReplicateSecretToRegionsOutput`](crate::output::ReplicateSecretToRegionsOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) replication_status:
std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
}
impl Builder {
/// <p>Replicate a secret based on the <code>ReplicaRegionType</code>> consisting of a
/// Region(required) and a KMSKeyId (optional) which can be the ARN, KeyID, or Alias. </p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>Replicate a secret based on the <code>ReplicaRegionType</code>> consisting of a
/// Region(required) and a KMSKeyId (optional) which can be the ARN, KeyID, or Alias. </p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// Appends an item to `replication_status`.
///
/// To override the contents of this collection use [`set_replication_status`](Self::set_replication_status).
///
/// <p>Describes the secret replication status as <code>PENDING</code>, <code>SUCCESS</code> or <code>FAIL</code>.</p>
pub fn replication_status(
mut self,
input: impl Into<crate::model::ReplicationStatusType>,
) -> Self {
let mut v = self.replication_status.unwrap_or_default();
v.push(input.into());
self.replication_status = Some(v);
self
}
/// <p>Describes the secret replication status as <code>PENDING</code>, <code>SUCCESS</code> or <code>FAIL</code>.</p>
pub fn set_replication_status(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
) -> Self {
self.replication_status = input;
self
}
/// Consumes the builder and constructs a [`ReplicateSecretToRegionsOutput`](crate::output::ReplicateSecretToRegionsOutput)
pub fn build(self) -> crate::output::ReplicateSecretToRegionsOutput {
crate::output::ReplicateSecretToRegionsOutput {
arn: self.arn,
replication_status: self.replication_status,
}
}
}
}
impl ReplicateSecretToRegionsOutput {
/// Creates a new builder-style object to manufacture [`ReplicateSecretToRegionsOutput`](crate::output::ReplicateSecretToRegionsOutput)
pub fn builder() -> crate::output::replicate_secret_to_regions_output::Builder {
crate::output::replicate_secret_to_regions_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RemoveRegionsFromReplicationOutput {
/// <p>The secret <code>ARN</code> removed from replication regions.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>Describes the remaining replication status after you remove regions from the replication list.</p>
pub replication_status: std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
}
impl RemoveRegionsFromReplicationOutput {
/// <p>The secret <code>ARN</code> removed from replication regions.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>Describes the remaining replication status after you remove regions from the replication list.</p>
pub fn replication_status(
&self,
) -> std::option::Option<&[crate::model::ReplicationStatusType]> {
self.replication_status.as_deref()
}
}
impl std::fmt::Debug for RemoveRegionsFromReplicationOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RemoveRegionsFromReplicationOutput");
formatter.field("arn", &self.arn);
formatter.field("replication_status", &self.replication_status);
formatter.finish()
}
}
/// See [`RemoveRegionsFromReplicationOutput`](crate::output::RemoveRegionsFromReplicationOutput)
pub mod remove_regions_from_replication_output {
/// A builder for [`RemoveRegionsFromReplicationOutput`](crate::output::RemoveRegionsFromReplicationOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) replication_status:
std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
}
impl Builder {
/// <p>The secret <code>ARN</code> removed from replication regions.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The secret <code>ARN</code> removed from replication regions.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// Appends an item to `replication_status`.
///
/// To override the contents of this collection use [`set_replication_status`](Self::set_replication_status).
///
/// <p>Describes the remaining replication status after you remove regions from the replication list.</p>
pub fn replication_status(
mut self,
input: impl Into<crate::model::ReplicationStatusType>,
) -> Self {
let mut v = self.replication_status.unwrap_or_default();
v.push(input.into());
self.replication_status = Some(v);
self
}
/// <p>Describes the remaining replication status after you remove regions from the replication list.</p>
pub fn set_replication_status(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
) -> Self {
self.replication_status = input;
self
}
/// Consumes the builder and constructs a [`RemoveRegionsFromReplicationOutput`](crate::output::RemoveRegionsFromReplicationOutput)
pub fn build(self) -> crate::output::RemoveRegionsFromReplicationOutput {
crate::output::RemoveRegionsFromReplicationOutput {
arn: self.arn,
replication_status: self.replication_status,
}
}
}
}
impl RemoveRegionsFromReplicationOutput {
/// Creates a new builder-style object to manufacture [`RemoveRegionsFromReplicationOutput`](crate::output::RemoveRegionsFromReplicationOutput)
pub fn builder() -> crate::output::remove_regions_from_replication_output::Builder {
crate::output::remove_regions_from_replication_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutSecretValueOutput {
/// <p>The Amazon Resource Name (ARN) for the secret for which you just created a version.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret for which you just created or updated a version.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The unique identifier of the version of the secret you just created or updated.</p>
pub version_id: std::option::Option<std::string::String>,
/// <p>The list of staging labels that are currently attached to this version of the secret.
/// Staging labels are used to track a version as it progresses through the secret rotation
/// process.</p>
pub version_stages: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl PutSecretValueOutput {
/// <p>The Amazon Resource Name (ARN) for the secret for which you just created a version.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret for which you just created or updated a version.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The unique identifier of the version of the secret you just created or updated.</p>
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
/// <p>The list of staging labels that are currently attached to this version of the secret.
/// Staging labels are used to track a version as it progresses through the secret rotation
/// process.</p>
pub fn version_stages(&self) -> std::option::Option<&[std::string::String]> {
self.version_stages.as_deref()
}
}
impl std::fmt::Debug for PutSecretValueOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutSecretValueOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("version_id", &self.version_id);
formatter.field("version_stages", &self.version_stages);
formatter.finish()
}
}
/// See [`PutSecretValueOutput`](crate::output::PutSecretValueOutput)
pub mod put_secret_value_output {
/// A builder for [`PutSecretValueOutput`](crate::output::PutSecretValueOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
pub(crate) version_stages: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) for the secret for which you just created a version.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for the secret for which you just created a version.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret for which you just created or updated a version.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret for which you just created or updated a version.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The unique identifier of the version of the secret you just created or updated.</p>
pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
/// <p>The unique identifier of the version of the secret you just created or updated.</p>
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
/// Appends an item to `version_stages`.
///
/// To override the contents of this collection use [`set_version_stages`](Self::set_version_stages).
///
/// <p>The list of staging labels that are currently attached to this version of the secret.
/// Staging labels are used to track a version as it progresses through the secret rotation
/// process.</p>
pub fn version_stages(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.version_stages.unwrap_or_default();
v.push(input.into());
self.version_stages = Some(v);
self
}
/// <p>The list of staging labels that are currently attached to this version of the secret.
/// Staging labels are used to track a version as it progresses through the secret rotation
/// process.</p>
pub fn set_version_stages(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.version_stages = input;
self
}
/// Consumes the builder and constructs a [`PutSecretValueOutput`](crate::output::PutSecretValueOutput)
pub fn build(self) -> crate::output::PutSecretValueOutput {
crate::output::PutSecretValueOutput {
arn: self.arn,
name: self.name,
version_id: self.version_id,
version_stages: self.version_stages,
}
}
}
}
impl PutSecretValueOutput {
/// Creates a new builder-style object to manufacture [`PutSecretValueOutput`](crate::output::PutSecretValueOutput)
pub fn builder() -> crate::output::put_secret_value_output::Builder {
crate::output::put_secret_value_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutResourcePolicyOutput {
/// <p>The ARN of the secret retrieved by the resource-based policy.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret retrieved by the resource-based policy.</p>
pub name: std::option::Option<std::string::String>,
}
impl PutResourcePolicyOutput {
/// <p>The ARN of the secret retrieved by the resource-based policy.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret retrieved by the resource-based policy.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
impl std::fmt::Debug for PutResourcePolicyOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutResourcePolicyOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.finish()
}
}
/// See [`PutResourcePolicyOutput`](crate::output::PutResourcePolicyOutput)
pub mod put_resource_policy_output {
/// A builder for [`PutResourcePolicyOutput`](crate::output::PutResourcePolicyOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the secret retrieved by the resource-based policy.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret retrieved by the resource-based policy.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret retrieved by the resource-based policy.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret retrieved by the resource-based policy.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Consumes the builder and constructs a [`PutResourcePolicyOutput`](crate::output::PutResourcePolicyOutput)
pub fn build(self) -> crate::output::PutResourcePolicyOutput {
crate::output::PutResourcePolicyOutput {
arn: self.arn,
name: self.name,
}
}
}
}
impl PutResourcePolicyOutput {
/// Creates a new builder-style object to manufacture [`PutResourcePolicyOutput`](crate::output::PutResourcePolicyOutput)
pub fn builder() -> crate::output::put_resource_policy_output::Builder {
crate::output::put_resource_policy_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListSecretVersionIdsOutput {
/// <p>The list of the currently available versions of the specified secret.</p>
pub versions: std::option::Option<std::vec::Vec<crate::model::SecretVersionsListEntry>>,
/// <p>If present in the response, this value indicates that
/// there's more output available than included in the current response. This can
/// occur even when the response includes no values at all, such as when you ask for a filtered view
/// of a very long list. Use this value in the <code>NextToken</code> request parameter in a
/// subsequent call to the operation to continue processing and get the next part of the output. You
/// should repeat this until the <code>NextToken</code> response element comes back empty (as
/// <code>null</code>).</p>
pub next_token: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (ARN) for the secret.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret.</p>
pub name: std::option::Option<std::string::String>,
}
impl ListSecretVersionIdsOutput {
/// <p>The list of the currently available versions of the specified secret.</p>
pub fn versions(&self) -> std::option::Option<&[crate::model::SecretVersionsListEntry]> {
self.versions.as_deref()
}
/// <p>If present in the response, this value indicates that
/// there's more output available than included in the current response. This can
/// occur even when the response includes no values at all, such as when you ask for a filtered view
/// of a very long list. Use this value in the <code>NextToken</code> request parameter in a
/// subsequent call to the operation to continue processing and get the next part of the output. You
/// should repeat this until the <code>NextToken</code> response element comes back empty (as
/// <code>null</code>).</p>
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
/// <p>The Amazon Resource Name (ARN) for the secret.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
impl std::fmt::Debug for ListSecretVersionIdsOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListSecretVersionIdsOutput");
formatter.field("versions", &self.versions);
formatter.field("next_token", &self.next_token);
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.finish()
}
}
/// See [`ListSecretVersionIdsOutput`](crate::output::ListSecretVersionIdsOutput)
pub mod list_secret_version_ids_output {
/// A builder for [`ListSecretVersionIdsOutput`](crate::output::ListSecretVersionIdsOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) versions:
std::option::Option<std::vec::Vec<crate::model::SecretVersionsListEntry>>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
/// Appends an item to `versions`.
///
/// To override the contents of this collection use [`set_versions`](Self::set_versions).
///
/// <p>The list of the currently available versions of the specified secret.</p>
pub fn versions(mut self, input: impl Into<crate::model::SecretVersionsListEntry>) -> Self {
let mut v = self.versions.unwrap_or_default();
v.push(input.into());
self.versions = Some(v);
self
}
/// <p>The list of the currently available versions of the specified secret.</p>
pub fn set_versions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SecretVersionsListEntry>>,
) -> Self {
self.versions = input;
self
}
/// <p>If present in the response, this value indicates that
/// there's more output available than included in the current response. This can
/// occur even when the response includes no values at all, such as when you ask for a filtered view
/// of a very long list. Use this value in the <code>NextToken</code> request parameter in a
/// subsequent call to the operation to continue processing and get the next part of the output. You
/// should repeat this until the <code>NextToken</code> response element comes back empty (as
/// <code>null</code>).</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
/// <p>If present in the response, this value indicates that
/// there's more output available than included in the current response. This can
/// occur even when the response includes no values at all, such as when you ask for a filtered view
/// of a very long list. Use this value in the <code>NextToken</code> request parameter in a
/// subsequent call to the operation to continue processing and get the next part of the output. You
/// should repeat this until the <code>NextToken</code> response element comes back empty (as
/// <code>null</code>).</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
/// <p>The Amazon Resource Name (ARN) for the secret.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for the secret.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Consumes the builder and constructs a [`ListSecretVersionIdsOutput`](crate::output::ListSecretVersionIdsOutput)
pub fn build(self) -> crate::output::ListSecretVersionIdsOutput {
crate::output::ListSecretVersionIdsOutput {
versions: self.versions,
next_token: self.next_token,
arn: self.arn,
name: self.name,
}
}
}
}
impl ListSecretVersionIdsOutput {
/// Creates a new builder-style object to manufacture [`ListSecretVersionIdsOutput`](crate::output::ListSecretVersionIdsOutput)
pub fn builder() -> crate::output::list_secret_version_ids_output::Builder {
crate::output::list_secret_version_ids_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListSecretsOutput {
/// <p>A list of the secrets in the account.</p>
pub secret_list: std::option::Option<std::vec::Vec<crate::model::SecretListEntry>>,
/// <p>If present in the response, this value indicates that
/// there's more output available than included in the current response. This can
/// occur even when the response includes no values at all, such as when you ask for a filtered view
/// of a very long list. Use this value in the <code>NextToken</code> request parameter in a
/// subsequent call to the operation to continue processing and get the next part of the output. You
/// should repeat this until the <code>NextToken</code> response element comes back empty (as
/// <code>null</code>).</p>
pub next_token: std::option::Option<std::string::String>,
}
impl ListSecretsOutput {
/// <p>A list of the secrets in the account.</p>
pub fn secret_list(&self) -> std::option::Option<&[crate::model::SecretListEntry]> {
self.secret_list.as_deref()
}
/// <p>If present in the response, this value indicates that
/// there's more output available than included in the current response. This can
/// occur even when the response includes no values at all, such as when you ask for a filtered view
/// of a very long list. Use this value in the <code>NextToken</code> request parameter in a
/// subsequent call to the operation to continue processing and get the next part of the output. You
/// should repeat this until the <code>NextToken</code> response element comes back empty (as
/// <code>null</code>).</p>
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListSecretsOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListSecretsOutput");
formatter.field("secret_list", &self.secret_list);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
/// See [`ListSecretsOutput`](crate::output::ListSecretsOutput)
pub mod list_secrets_output {
/// A builder for [`ListSecretsOutput`](crate::output::ListSecretsOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) secret_list: std::option::Option<std::vec::Vec<crate::model::SecretListEntry>>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
/// Appends an item to `secret_list`.
///
/// To override the contents of this collection use [`set_secret_list`](Self::set_secret_list).
///
/// <p>A list of the secrets in the account.</p>
pub fn secret_list(mut self, input: impl Into<crate::model::SecretListEntry>) -> Self {
let mut v = self.secret_list.unwrap_or_default();
v.push(input.into());
self.secret_list = Some(v);
self
}
/// <p>A list of the secrets in the account.</p>
pub fn set_secret_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SecretListEntry>>,
) -> Self {
self.secret_list = input;
self
}
/// <p>If present in the response, this value indicates that
/// there's more output available than included in the current response. This can
/// occur even when the response includes no values at all, such as when you ask for a filtered view
/// of a very long list. Use this value in the <code>NextToken</code> request parameter in a
/// subsequent call to the operation to continue processing and get the next part of the output. You
/// should repeat this until the <code>NextToken</code> response element comes back empty (as
/// <code>null</code>).</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
/// <p>If present in the response, this value indicates that
/// there's more output available than included in the current response. This can
/// occur even when the response includes no values at all, such as when you ask for a filtered view
/// of a very long list. Use this value in the <code>NextToken</code> request parameter in a
/// subsequent call to the operation to continue processing and get the next part of the output. You
/// should repeat this until the <code>NextToken</code> response element comes back empty (as
/// <code>null</code>).</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
/// Consumes the builder and constructs a [`ListSecretsOutput`](crate::output::ListSecretsOutput)
pub fn build(self) -> crate::output::ListSecretsOutput {
crate::output::ListSecretsOutput {
secret_list: self.secret_list,
next_token: self.next_token,
}
}
}
}
impl ListSecretsOutput {
/// Creates a new builder-style object to manufacture [`ListSecretsOutput`](crate::output::ListSecretsOutput)
pub fn builder() -> crate::output::list_secrets_output::Builder {
crate::output::list_secrets_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetSecretValueOutput {
/// <p>The ARN of the secret.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The unique identifier of this version of the secret.</p>
pub version_id: std::option::Option<std::string::String>,
/// <p>The decrypted part of the protected secret information that was originally provided as
/// binary data in the form of a byte array. The response parameter represents the binary data as
/// a <a href="https://tools.ietf.org/html/rfc4648#section-4">base64-encoded</a>
/// string.</p>
/// <p>This parameter is not used if the secret is created by the Secrets Manager console.</p>
/// <p>If you store custom information in this field of the secret, then you must code your
/// Lambda rotation function to parse and interpret whatever you store in the
/// <code>SecretString</code> or <code>SecretBinary</code> fields.</p>
pub secret_binary: std::option::Option<aws_smithy_types::Blob>,
/// <p>The decrypted part of the protected secret information that was originally provided as a
/// string.</p>
/// <p>If you create this secret by using the Secrets Manager console then only the
/// <code>SecretString</code> parameter contains data. Secrets Manager stores the information as a
/// JSON structure of key/value pairs that the Lambda rotation function knows how to parse.</p>
/// <p>If you store custom information in the secret by using the <a>CreateSecret</a>,
/// <a>UpdateSecret</a>, or <a>PutSecretValue</a> API operations instead
/// of the Secrets Manager console, or by using the <b>Other secret type</b> in
/// the console, then you must code your Lambda rotation function to parse and interpret those
/// values.</p>
pub secret_string: std::option::Option<std::string::String>,
/// <p>A list of all of the staging labels currently attached to this version of the
/// secret.</p>
pub version_stages: std::option::Option<std::vec::Vec<std::string::String>>,
/// <p>The date and time that this version of the secret was created.</p>
pub created_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl GetSecretValueOutput {
/// <p>The ARN of the secret.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The unique identifier of this version of the secret.</p>
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
/// <p>The decrypted part of the protected secret information that was originally provided as
/// binary data in the form of a byte array. The response parameter represents the binary data as
/// a <a href="https://tools.ietf.org/html/rfc4648#section-4">base64-encoded</a>
/// string.</p>
/// <p>This parameter is not used if the secret is created by the Secrets Manager console.</p>
/// <p>If you store custom information in this field of the secret, then you must code your
/// Lambda rotation function to parse and interpret whatever you store in the
/// <code>SecretString</code> or <code>SecretBinary</code> fields.</p>
pub fn secret_binary(&self) -> std::option::Option<&aws_smithy_types::Blob> {
self.secret_binary.as_ref()
}
/// <p>The decrypted part of the protected secret information that was originally provided as a
/// string.</p>
/// <p>If you create this secret by using the Secrets Manager console then only the
/// <code>SecretString</code> parameter contains data. Secrets Manager stores the information as a
/// JSON structure of key/value pairs that the Lambda rotation function knows how to parse.</p>
/// <p>If you store custom information in the secret by using the <a>CreateSecret</a>,
/// <a>UpdateSecret</a>, or <a>PutSecretValue</a> API operations instead
/// of the Secrets Manager console, or by using the <b>Other secret type</b> in
/// the console, then you must code your Lambda rotation function to parse and interpret those
/// values.</p>
pub fn secret_string(&self) -> std::option::Option<&str> {
self.secret_string.as_deref()
}
/// <p>A list of all of the staging labels currently attached to this version of the
/// secret.</p>
pub fn version_stages(&self) -> std::option::Option<&[std::string::String]> {
self.version_stages.as_deref()
}
/// <p>The date and time that this version of the secret was created.</p>
pub fn created_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_date.as_ref()
}
}
impl std::fmt::Debug for GetSecretValueOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetSecretValueOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("version_id", &self.version_id);
formatter.field("secret_binary", &"*** Sensitive Data Redacted ***");
formatter.field("secret_string", &"*** Sensitive Data Redacted ***");
formatter.field("version_stages", &self.version_stages);
formatter.field("created_date", &self.created_date);
formatter.finish()
}
}
/// See [`GetSecretValueOutput`](crate::output::GetSecretValueOutput)
pub mod get_secret_value_output {
/// A builder for [`GetSecretValueOutput`](crate::output::GetSecretValueOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
pub(crate) secret_binary: std::option::Option<aws_smithy_types::Blob>,
pub(crate) secret_string: std::option::Option<std::string::String>,
pub(crate) version_stages: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) created_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>The ARN of the secret.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The unique identifier of this version of the secret.</p>
pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
/// <p>The unique identifier of this version of the secret.</p>
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
/// <p>The decrypted part of the protected secret information that was originally provided as
/// binary data in the form of a byte array. The response parameter represents the binary data as
/// a <a href="https://tools.ietf.org/html/rfc4648#section-4">base64-encoded</a>
/// string.</p>
/// <p>This parameter is not used if the secret is created by the Secrets Manager console.</p>
/// <p>If you store custom information in this field of the secret, then you must code your
/// Lambda rotation function to parse and interpret whatever you store in the
/// <code>SecretString</code> or <code>SecretBinary</code> fields.</p>
pub fn secret_binary(mut self, input: aws_smithy_types::Blob) -> Self {
self.secret_binary = Some(input);
self
}
/// <p>The decrypted part of the protected secret information that was originally provided as
/// binary data in the form of a byte array. The response parameter represents the binary data as
/// a <a href="https://tools.ietf.org/html/rfc4648#section-4">base64-encoded</a>
/// string.</p>
/// <p>This parameter is not used if the secret is created by the Secrets Manager console.</p>
/// <p>If you store custom information in this field of the secret, then you must code your
/// Lambda rotation function to parse and interpret whatever you store in the
/// <code>SecretString</code> or <code>SecretBinary</code> fields.</p>
pub fn set_secret_binary(
mut self,
input: std::option::Option<aws_smithy_types::Blob>,
) -> Self {
self.secret_binary = input;
self
}
/// <p>The decrypted part of the protected secret information that was originally provided as a
/// string.</p>
/// <p>If you create this secret by using the Secrets Manager console then only the
/// <code>SecretString</code> parameter contains data. Secrets Manager stores the information as a
/// JSON structure of key/value pairs that the Lambda rotation function knows how to parse.</p>
/// <p>If you store custom information in the secret by using the <a>CreateSecret</a>,
/// <a>UpdateSecret</a>, or <a>PutSecretValue</a> API operations instead
/// of the Secrets Manager console, or by using the <b>Other secret type</b> in
/// the console, then you must code your Lambda rotation function to parse and interpret those
/// values.</p>
pub fn secret_string(mut self, input: impl Into<std::string::String>) -> Self {
self.secret_string = Some(input.into());
self
}
/// <p>The decrypted part of the protected secret information that was originally provided as a
/// string.</p>
/// <p>If you create this secret by using the Secrets Manager console then only the
/// <code>SecretString</code> parameter contains data. Secrets Manager stores the information as a
/// JSON structure of key/value pairs that the Lambda rotation function knows how to parse.</p>
/// <p>If you store custom information in the secret by using the <a>CreateSecret</a>,
/// <a>UpdateSecret</a>, or <a>PutSecretValue</a> API operations instead
/// of the Secrets Manager console, or by using the <b>Other secret type</b> in
/// the console, then you must code your Lambda rotation function to parse and interpret those
/// values.</p>
pub fn set_secret_string(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.secret_string = input;
self
}
/// Appends an item to `version_stages`.
///
/// To override the contents of this collection use [`set_version_stages`](Self::set_version_stages).
///
/// <p>A list of all of the staging labels currently attached to this version of the
/// secret.</p>
pub fn version_stages(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.version_stages.unwrap_or_default();
v.push(input.into());
self.version_stages = Some(v);
self
}
/// <p>A list of all of the staging labels currently attached to this version of the
/// secret.</p>
pub fn set_version_stages(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.version_stages = input;
self
}
/// <p>The date and time that this version of the secret was created.</p>
pub fn created_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_date = Some(input);
self
}
/// <p>The date and time that this version of the secret was created.</p>
pub fn set_created_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_date = input;
self
}
/// Consumes the builder and constructs a [`GetSecretValueOutput`](crate::output::GetSecretValueOutput)
pub fn build(self) -> crate::output::GetSecretValueOutput {
crate::output::GetSecretValueOutput {
arn: self.arn,
name: self.name,
version_id: self.version_id,
secret_binary: self.secret_binary,
secret_string: self.secret_string,
version_stages: self.version_stages,
created_date: self.created_date,
}
}
}
}
impl GetSecretValueOutput {
/// Creates a new builder-style object to manufacture [`GetSecretValueOutput`](crate::output::GetSecretValueOutput)
pub fn builder() -> crate::output::get_secret_value_output::Builder {
crate::output::get_secret_value_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetResourcePolicyOutput {
/// <p>The ARN of the secret that the resource-based policy was retrieved for.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret that the resource-based policy was retrieved for.</p>
pub name: std::option::Option<std::string::String>,
/// <p>A JSON-formatted string that describes the permissions that are associated with the
/// attached secret. These permissions are combined with any permissions that are associated with
/// the user or role that attempts to access this secret. The combined permissions specify who can
/// access the secret and what actions they can perform. For more information, see <a href="http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication and Access Control for
/// Amazon Web Services Secrets Manager</a> in the <i>Amazon Web Services Secrets Manager User Guide</i>.</p>
pub resource_policy: std::option::Option<std::string::String>,
}
impl GetResourcePolicyOutput {
/// <p>The ARN of the secret that the resource-based policy was retrieved for.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret that the resource-based policy was retrieved for.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>A JSON-formatted string that describes the permissions that are associated with the
/// attached secret. These permissions are combined with any permissions that are associated with
/// the user or role that attempts to access this secret. The combined permissions specify who can
/// access the secret and what actions they can perform. For more information, see <a href="http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication and Access Control for
/// Amazon Web Services Secrets Manager</a> in the <i>Amazon Web Services Secrets Manager User Guide</i>.</p>
pub fn resource_policy(&self) -> std::option::Option<&str> {
self.resource_policy.as_deref()
}
}
impl std::fmt::Debug for GetResourcePolicyOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetResourcePolicyOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("resource_policy", &self.resource_policy);
formatter.finish()
}
}
/// See [`GetResourcePolicyOutput`](crate::output::GetResourcePolicyOutput)
pub mod get_resource_policy_output {
/// A builder for [`GetResourcePolicyOutput`](crate::output::GetResourcePolicyOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) resource_policy: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the secret that the resource-based policy was retrieved for.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret that the resource-based policy was retrieved for.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret that the resource-based policy was retrieved for.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret that the resource-based policy was retrieved for.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>A JSON-formatted string that describes the permissions that are associated with the
/// attached secret. These permissions are combined with any permissions that are associated with
/// the user or role that attempts to access this secret. The combined permissions specify who can
/// access the secret and what actions they can perform. For more information, see <a href="http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication and Access Control for
/// Amazon Web Services Secrets Manager</a> in the <i>Amazon Web Services Secrets Manager User Guide</i>.</p>
pub fn resource_policy(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_policy = Some(input.into());
self
}
/// <p>A JSON-formatted string that describes the permissions that are associated with the
/// attached secret. These permissions are combined with any permissions that are associated with
/// the user or role that attempts to access this secret. The combined permissions specify who can
/// access the secret and what actions they can perform. For more information, see <a href="http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication and Access Control for
/// Amazon Web Services Secrets Manager</a> in the <i>Amazon Web Services Secrets Manager User Guide</i>.</p>
pub fn set_resource_policy(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_policy = input;
self
}
/// Consumes the builder and constructs a [`GetResourcePolicyOutput`](crate::output::GetResourcePolicyOutput)
pub fn build(self) -> crate::output::GetResourcePolicyOutput {
crate::output::GetResourcePolicyOutput {
arn: self.arn,
name: self.name,
resource_policy: self.resource_policy,
}
}
}
}
impl GetResourcePolicyOutput {
/// Creates a new builder-style object to manufacture [`GetResourcePolicyOutput`](crate::output::GetResourcePolicyOutput)
pub fn builder() -> crate::output::get_resource_policy_output::Builder {
crate::output::get_resource_policy_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetRandomPasswordOutput {
/// <p>A string with the generated password.</p>
pub random_password: std::option::Option<std::string::String>,
}
impl GetRandomPasswordOutput {
/// <p>A string with the generated password.</p>
pub fn random_password(&self) -> std::option::Option<&str> {
self.random_password.as_deref()
}
}
impl std::fmt::Debug for GetRandomPasswordOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetRandomPasswordOutput");
formatter.field("random_password", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
/// See [`GetRandomPasswordOutput`](crate::output::GetRandomPasswordOutput)
pub mod get_random_password_output {
/// A builder for [`GetRandomPasswordOutput`](crate::output::GetRandomPasswordOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) random_password: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>A string with the generated password.</p>
pub fn random_password(mut self, input: impl Into<std::string::String>) -> Self {
self.random_password = Some(input.into());
self
}
/// <p>A string with the generated password.</p>
pub fn set_random_password(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.random_password = input;
self
}
/// Consumes the builder and constructs a [`GetRandomPasswordOutput`](crate::output::GetRandomPasswordOutput)
pub fn build(self) -> crate::output::GetRandomPasswordOutput {
crate::output::GetRandomPasswordOutput {
random_password: self.random_password,
}
}
}
}
impl GetRandomPasswordOutput {
/// Creates a new builder-style object to manufacture [`GetRandomPasswordOutput`](crate::output::GetRandomPasswordOutput)
pub fn builder() -> crate::output::get_random_password_output::Builder {
crate::output::get_random_password_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeSecretOutput {
/// <p>The ARN of the secret.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The user-provided friendly name of the secret.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The user-provided description of the secret.</p>
pub description: std::option::Option<std::string::String>,
/// <p>The ARN or alias of the Amazon Web Services KMS customer master key (CMK) that's used to encrypt the
/// <code>SecretString</code> or <code>SecretBinary</code> fields in each version of the secret.
/// If you don't provide a key, then Secrets Manager defaults to encrypting the secret fields with the
/// default Amazon Web Services KMS CMK (the one named <code>awssecretsmanager</code>) for this account.</p>
pub kms_key_id: std::option::Option<std::string::String>,
/// <p>Specifies whether automatic rotation is enabled for this secret.</p>
/// <p>To enable rotation, use <a>RotateSecret</a> with
/// <code>AutomaticallyRotateAfterDays</code> set to a value greater than 0. To disable
/// rotation, use <a>CancelRotateSecret</a>.</p>
pub rotation_enabled: std::option::Option<bool>,
/// <p>The ARN of a Lambda function that's invoked by Secrets Manager to rotate the
/// secret either automatically per the schedule or manually by a call to
/// <code>RotateSecret</code>.</p>
pub rotation_lambda_arn: std::option::Option<std::string::String>,
/// <p>A structure with the rotation configuration for this secret. This field is only populated
/// if rotation is configured.</p>
pub rotation_rules: std::option::Option<crate::model::RotationRulesType>,
/// <p>The last date and time that the rotation process for this secret was invoked.</p>
/// <p>The most recent date and time that the Secrets Manager rotation process successfully
/// completed. If the secret doesn't rotate, Secrets Manager returns a null value.</p>
pub last_rotated_date: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The last date and time that this secret was modified in any way.</p>
pub last_changed_date: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The last date that this secret was accessed. This value is truncated to midnight of the
/// date and therefore shows only the date, not the time.</p>
pub last_accessed_date: std::option::Option<aws_smithy_types::DateTime>,
/// <p>This value exists if the secret is scheduled for deletion. Some time after the specified
/// date and time, Secrets Manager deletes the secret and all of its versions.</p>
/// <p>If a secret is scheduled for deletion, then its details, including the encrypted secret
/// information, is not accessible. To cancel a scheduled deletion and restore access, use <a>RestoreSecret</a>.</p>
pub deleted_date: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The list of user-defined tags that are associated with the secret. To add tags to a
/// secret, use <a>TagResource</a>. To remove tags, use <a>UntagResource</a>.</p>
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
/// <p>A list of all of the currently assigned <code>VersionStage</code> staging labels and the
/// <code>VersionId</code> that each is attached to. Staging labels are used to keep track of
/// the different versions during the rotation process.</p>
/// <note>
/// <p>A version that does not have any staging labels attached is considered deprecated and
/// subject to deletion. Such versions are not included in this list.</p>
/// </note>
pub version_ids_to_stages: std::option::Option<
std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
>,
/// <p>Returns the name of the service that created this secret.</p>
pub owning_service: std::option::Option<std::string::String>,
/// <p>The date you created the secret.</p>
pub created_date: std::option::Option<aws_smithy_types::DateTime>,
/// <p>Specifies the primary region for secret replication. </p>
pub primary_region: std::option::Option<std::string::String>,
/// <p>Describes a list of replication status objects as <code>InProgress</code>, <code>Failed</code> or <code>InSync</code>.<code>P</code>
/// </p>
pub replication_status: std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
}
impl DescribeSecretOutput {
/// <p>The ARN of the secret.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The user-provided friendly name of the secret.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The user-provided description of the secret.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The ARN or alias of the Amazon Web Services KMS customer master key (CMK) that's used to encrypt the
/// <code>SecretString</code> or <code>SecretBinary</code> fields in each version of the secret.
/// If you don't provide a key, then Secrets Manager defaults to encrypting the secret fields with the
/// default Amazon Web Services KMS CMK (the one named <code>awssecretsmanager</code>) for this account.</p>
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
/// <p>Specifies whether automatic rotation is enabled for this secret.</p>
/// <p>To enable rotation, use <a>RotateSecret</a> with
/// <code>AutomaticallyRotateAfterDays</code> set to a value greater than 0. To disable
/// rotation, use <a>CancelRotateSecret</a>.</p>
pub fn rotation_enabled(&self) -> std::option::Option<bool> {
self.rotation_enabled
}
/// <p>The ARN of a Lambda function that's invoked by Secrets Manager to rotate the
/// secret either automatically per the schedule or manually by a call to
/// <code>RotateSecret</code>.</p>
pub fn rotation_lambda_arn(&self) -> std::option::Option<&str> {
self.rotation_lambda_arn.as_deref()
}
/// <p>A structure with the rotation configuration for this secret. This field is only populated
/// if rotation is configured.</p>
pub fn rotation_rules(&self) -> std::option::Option<&crate::model::RotationRulesType> {
self.rotation_rules.as_ref()
}
/// <p>The last date and time that the rotation process for this secret was invoked.</p>
/// <p>The most recent date and time that the Secrets Manager rotation process successfully
/// completed. If the secret doesn't rotate, Secrets Manager returns a null value.</p>
pub fn last_rotated_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_rotated_date.as_ref()
}
/// <p>The last date and time that this secret was modified in any way.</p>
pub fn last_changed_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_changed_date.as_ref()
}
/// <p>The last date that this secret was accessed. This value is truncated to midnight of the
/// date and therefore shows only the date, not the time.</p>
pub fn last_accessed_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_accessed_date.as_ref()
}
/// <p>This value exists if the secret is scheduled for deletion. Some time after the specified
/// date and time, Secrets Manager deletes the secret and all of its versions.</p>
/// <p>If a secret is scheduled for deletion, then its details, including the encrypted secret
/// information, is not accessible. To cancel a scheduled deletion and restore access, use <a>RestoreSecret</a>.</p>
pub fn deleted_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.deleted_date.as_ref()
}
/// <p>The list of user-defined tags that are associated with the secret. To add tags to a
/// secret, use <a>TagResource</a>. To remove tags, use <a>UntagResource</a>.</p>
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
/// <p>A list of all of the currently assigned <code>VersionStage</code> staging labels and the
/// <code>VersionId</code> that each is attached to. Staging labels are used to keep track of
/// the different versions during the rotation process.</p>
/// <note>
/// <p>A version that does not have any staging labels attached is considered deprecated and
/// subject to deletion. Such versions are not included in this list.</p>
/// </note>
pub fn version_ids_to_stages(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
> {
self.version_ids_to_stages.as_ref()
}
/// <p>Returns the name of the service that created this secret.</p>
pub fn owning_service(&self) -> std::option::Option<&str> {
self.owning_service.as_deref()
}
/// <p>The date you created the secret.</p>
pub fn created_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_date.as_ref()
}
/// <p>Specifies the primary region for secret replication. </p>
pub fn primary_region(&self) -> std::option::Option<&str> {
self.primary_region.as_deref()
}
/// <p>Describes a list of replication status objects as <code>InProgress</code>, <code>Failed</code> or <code>InSync</code>.<code>P</code>
/// </p>
pub fn replication_status(
&self,
) -> std::option::Option<&[crate::model::ReplicationStatusType]> {
self.replication_status.as_deref()
}
}
impl std::fmt::Debug for DescribeSecretOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeSecretOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("kms_key_id", &self.kms_key_id);
formatter.field("rotation_enabled", &self.rotation_enabled);
formatter.field("rotation_lambda_arn", &self.rotation_lambda_arn);
formatter.field("rotation_rules", &self.rotation_rules);
formatter.field("last_rotated_date", &self.last_rotated_date);
formatter.field("last_changed_date", &self.last_changed_date);
formatter.field("last_accessed_date", &self.last_accessed_date);
formatter.field("deleted_date", &self.deleted_date);
formatter.field("tags", &self.tags);
formatter.field("version_ids_to_stages", &self.version_ids_to_stages);
formatter.field("owning_service", &self.owning_service);
formatter.field("created_date", &self.created_date);
formatter.field("primary_region", &self.primary_region);
formatter.field("replication_status", &self.replication_status);
formatter.finish()
}
}
/// See [`DescribeSecretOutput`](crate::output::DescribeSecretOutput)
pub mod describe_secret_output {
/// A builder for [`DescribeSecretOutput`](crate::output::DescribeSecretOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
pub(crate) rotation_enabled: std::option::Option<bool>,
pub(crate) rotation_lambda_arn: std::option::Option<std::string::String>,
pub(crate) rotation_rules: std::option::Option<crate::model::RotationRulesType>,
pub(crate) last_rotated_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) last_changed_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) last_accessed_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) deleted_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) version_ids_to_stages: std::option::Option<
std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
>,
pub(crate) owning_service: std::option::Option<std::string::String>,
pub(crate) created_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) primary_region: std::option::Option<std::string::String>,
pub(crate) replication_status:
std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
}
impl Builder {
/// <p>The ARN of the secret.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The user-provided friendly name of the secret.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The user-provided friendly name of the secret.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The user-provided description of the secret.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>The user-provided description of the secret.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The ARN or alias of the Amazon Web Services KMS customer master key (CMK) that's used to encrypt the
/// <code>SecretString</code> or <code>SecretBinary</code> fields in each version of the secret.
/// If you don't provide a key, then Secrets Manager defaults to encrypting the secret fields with the
/// default Amazon Web Services KMS CMK (the one named <code>awssecretsmanager</code>) for this account.</p>
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
/// <p>The ARN or alias of the Amazon Web Services KMS customer master key (CMK) that's used to encrypt the
/// <code>SecretString</code> or <code>SecretBinary</code> fields in each version of the secret.
/// If you don't provide a key, then Secrets Manager defaults to encrypting the secret fields with the
/// default Amazon Web Services KMS CMK (the one named <code>awssecretsmanager</code>) for this account.</p>
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
/// <p>Specifies whether automatic rotation is enabled for this secret.</p>
/// <p>To enable rotation, use <a>RotateSecret</a> with
/// <code>AutomaticallyRotateAfterDays</code> set to a value greater than 0. To disable
/// rotation, use <a>CancelRotateSecret</a>.</p>
pub fn rotation_enabled(mut self, input: bool) -> Self {
self.rotation_enabled = Some(input);
self
}
/// <p>Specifies whether automatic rotation is enabled for this secret.</p>
/// <p>To enable rotation, use <a>RotateSecret</a> with
/// <code>AutomaticallyRotateAfterDays</code> set to a value greater than 0. To disable
/// rotation, use <a>CancelRotateSecret</a>.</p>
pub fn set_rotation_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.rotation_enabled = input;
self
}
/// <p>The ARN of a Lambda function that's invoked by Secrets Manager to rotate the
/// secret either automatically per the schedule or manually by a call to
/// <code>RotateSecret</code>.</p>
pub fn rotation_lambda_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.rotation_lambda_arn = Some(input.into());
self
}
/// <p>The ARN of a Lambda function that's invoked by Secrets Manager to rotate the
/// secret either automatically per the schedule or manually by a call to
/// <code>RotateSecret</code>.</p>
pub fn set_rotation_lambda_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.rotation_lambda_arn = input;
self
}
/// <p>A structure with the rotation configuration for this secret. This field is only populated
/// if rotation is configured.</p>
pub fn rotation_rules(mut self, input: crate::model::RotationRulesType) -> Self {
self.rotation_rules = Some(input);
self
}
/// <p>A structure with the rotation configuration for this secret. This field is only populated
/// if rotation is configured.</p>
pub fn set_rotation_rules(
mut self,
input: std::option::Option<crate::model::RotationRulesType>,
) -> Self {
self.rotation_rules = input;
self
}
/// <p>The last date and time that the rotation process for this secret was invoked.</p>
/// <p>The most recent date and time that the Secrets Manager rotation process successfully
/// completed. If the secret doesn't rotate, Secrets Manager returns a null value.</p>
pub fn last_rotated_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_rotated_date = Some(input);
self
}
/// <p>The last date and time that the rotation process for this secret was invoked.</p>
/// <p>The most recent date and time that the Secrets Manager rotation process successfully
/// completed. If the secret doesn't rotate, Secrets Manager returns a null value.</p>
pub fn set_last_rotated_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_rotated_date = input;
self
}
/// <p>The last date and time that this secret was modified in any way.</p>
pub fn last_changed_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_changed_date = Some(input);
self
}
/// <p>The last date and time that this secret was modified in any way.</p>
pub fn set_last_changed_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_changed_date = input;
self
}
/// <p>The last date that this secret was accessed. This value is truncated to midnight of the
/// date and therefore shows only the date, not the time.</p>
pub fn last_accessed_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_accessed_date = Some(input);
self
}
/// <p>The last date that this secret was accessed. This value is truncated to midnight of the
/// date and therefore shows only the date, not the time.</p>
pub fn set_last_accessed_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_accessed_date = input;
self
}
/// <p>This value exists if the secret is scheduled for deletion. Some time after the specified
/// date and time, Secrets Manager deletes the secret and all of its versions.</p>
/// <p>If a secret is scheduled for deletion, then its details, including the encrypted secret
/// information, is not accessible. To cancel a scheduled deletion and restore access, use <a>RestoreSecret</a>.</p>
pub fn deleted_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.deleted_date = Some(input);
self
}
/// <p>This value exists if the secret is scheduled for deletion. Some time after the specified
/// date and time, Secrets Manager deletes the secret and all of its versions.</p>
/// <p>If a secret is scheduled for deletion, then its details, including the encrypted secret
/// information, is not accessible. To cancel a scheduled deletion and restore access, use <a>RestoreSecret</a>.</p>
pub fn set_deleted_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.deleted_date = input;
self
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The list of user-defined tags that are associated with the secret. To add tags to a
/// secret, use <a>TagResource</a>. To remove tags, use <a>UntagResource</a>.</p>
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
/// <p>The list of user-defined tags that are associated with the secret. To add tags to a
/// secret, use <a>TagResource</a>. To remove tags, use <a>UntagResource</a>.</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
/// Adds a key-value pair to `version_ids_to_stages`.
///
/// To override the contents of this collection use [`set_version_ids_to_stages`](Self::set_version_ids_to_stages).
///
/// <p>A list of all of the currently assigned <code>VersionStage</code> staging labels and the
/// <code>VersionId</code> that each is attached to. Staging labels are used to keep track of
/// the different versions during the rotation process.</p>
/// <note>
/// <p>A version that does not have any staging labels attached is considered deprecated and
/// subject to deletion. Such versions are not included in this list.</p>
/// </note>
pub fn version_ids_to_stages(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::vec::Vec<std::string::String>>,
) -> Self {
let mut hash_map = self.version_ids_to_stages.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.version_ids_to_stages = Some(hash_map);
self
}
/// <p>A list of all of the currently assigned <code>VersionStage</code> staging labels and the
/// <code>VersionId</code> that each is attached to. Staging labels are used to keep track of
/// the different versions during the rotation process.</p>
/// <note>
/// <p>A version that does not have any staging labels attached is considered deprecated and
/// subject to deletion. Such versions are not included in this list.</p>
/// </note>
pub fn set_version_ids_to_stages(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
>,
) -> Self {
self.version_ids_to_stages = input;
self
}
/// <p>Returns the name of the service that created this secret.</p>
pub fn owning_service(mut self, input: impl Into<std::string::String>) -> Self {
self.owning_service = Some(input.into());
self
}
/// <p>Returns the name of the service that created this secret.</p>
pub fn set_owning_service(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owning_service = input;
self
}
/// <p>The date you created the secret.</p>
pub fn created_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_date = Some(input);
self
}
/// <p>The date you created the secret.</p>
pub fn set_created_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_date = input;
self
}
/// <p>Specifies the primary region for secret replication. </p>
pub fn primary_region(mut self, input: impl Into<std::string::String>) -> Self {
self.primary_region = Some(input.into());
self
}
/// <p>Specifies the primary region for secret replication. </p>
pub fn set_primary_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.primary_region = input;
self
}
/// Appends an item to `replication_status`.
///
/// To override the contents of this collection use [`set_replication_status`](Self::set_replication_status).
///
/// <p>Describes a list of replication status objects as <code>InProgress</code>, <code>Failed</code> or <code>InSync</code>.<code>P</code>
/// </p>
pub fn replication_status(
mut self,
input: impl Into<crate::model::ReplicationStatusType>,
) -> Self {
let mut v = self.replication_status.unwrap_or_default();
v.push(input.into());
self.replication_status = Some(v);
self
}
/// <p>Describes a list of replication status objects as <code>InProgress</code>, <code>Failed</code> or <code>InSync</code>.<code>P</code>
/// </p>
pub fn set_replication_status(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
) -> Self {
self.replication_status = input;
self
}
/// Consumes the builder and constructs a [`DescribeSecretOutput`](crate::output::DescribeSecretOutput)
pub fn build(self) -> crate::output::DescribeSecretOutput {
crate::output::DescribeSecretOutput {
arn: self.arn,
name: self.name,
description: self.description,
kms_key_id: self.kms_key_id,
rotation_enabled: self.rotation_enabled,
rotation_lambda_arn: self.rotation_lambda_arn,
rotation_rules: self.rotation_rules,
last_rotated_date: self.last_rotated_date,
last_changed_date: self.last_changed_date,
last_accessed_date: self.last_accessed_date,
deleted_date: self.deleted_date,
tags: self.tags,
version_ids_to_stages: self.version_ids_to_stages,
owning_service: self.owning_service,
created_date: self.created_date,
primary_region: self.primary_region,
replication_status: self.replication_status,
}
}
}
}
impl DescribeSecretOutput {
/// Creates a new builder-style object to manufacture [`DescribeSecretOutput`](crate::output::DescribeSecretOutput)
pub fn builder() -> crate::output::describe_secret_output::Builder {
crate::output::describe_secret_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteSecretOutput {
/// <p>The ARN of the secret that is now scheduled for deletion.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret currently scheduled for deletion.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The date and time after which this secret can be deleted by Secrets Manager and can no longer be
/// restored. This value is the date and time of the delete request plus the number of days
/// specified in <code>RecoveryWindowInDays</code>.</p>
pub deletion_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl DeleteSecretOutput {
/// <p>The ARN of the secret that is now scheduled for deletion.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret currently scheduled for deletion.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The date and time after which this secret can be deleted by Secrets Manager and can no longer be
/// restored. This value is the date and time of the delete request plus the number of days
/// specified in <code>RecoveryWindowInDays</code>.</p>
pub fn deletion_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.deletion_date.as_ref()
}
}
impl std::fmt::Debug for DeleteSecretOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteSecretOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("deletion_date", &self.deletion_date);
formatter.finish()
}
}
/// See [`DeleteSecretOutput`](crate::output::DeleteSecretOutput)
pub mod delete_secret_output {
/// A builder for [`DeleteSecretOutput`](crate::output::DeleteSecretOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) deletion_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>The ARN of the secret that is now scheduled for deletion.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret that is now scheduled for deletion.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret currently scheduled for deletion.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret currently scheduled for deletion.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The date and time after which this secret can be deleted by Secrets Manager and can no longer be
/// restored. This value is the date and time of the delete request plus the number of days
/// specified in <code>RecoveryWindowInDays</code>.</p>
pub fn deletion_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.deletion_date = Some(input);
self
}
/// <p>The date and time after which this secret can be deleted by Secrets Manager and can no longer be
/// restored. This value is the date and time of the delete request plus the number of days
/// specified in <code>RecoveryWindowInDays</code>.</p>
pub fn set_deletion_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.deletion_date = input;
self
}
/// Consumes the builder and constructs a [`DeleteSecretOutput`](crate::output::DeleteSecretOutput)
pub fn build(self) -> crate::output::DeleteSecretOutput {
crate::output::DeleteSecretOutput {
arn: self.arn,
name: self.name,
deletion_date: self.deletion_date,
}
}
}
}
impl DeleteSecretOutput {
/// Creates a new builder-style object to manufacture [`DeleteSecretOutput`](crate::output::DeleteSecretOutput)
pub fn builder() -> crate::output::delete_secret_output::Builder {
crate::output::delete_secret_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteResourcePolicyOutput {
/// <p>The ARN of the secret that the resource-based policy was deleted for.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret that the resource-based policy was deleted for.</p>
pub name: std::option::Option<std::string::String>,
}
impl DeleteResourcePolicyOutput {
/// <p>The ARN of the secret that the resource-based policy was deleted for.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret that the resource-based policy was deleted for.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
impl std::fmt::Debug for DeleteResourcePolicyOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteResourcePolicyOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.finish()
}
}
/// See [`DeleteResourcePolicyOutput`](crate::output::DeleteResourcePolicyOutput)
pub mod delete_resource_policy_output {
/// A builder for [`DeleteResourcePolicyOutput`](crate::output::DeleteResourcePolicyOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the secret that the resource-based policy was deleted for.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret that the resource-based policy was deleted for.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret that the resource-based policy was deleted for.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret that the resource-based policy was deleted for.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Consumes the builder and constructs a [`DeleteResourcePolicyOutput`](crate::output::DeleteResourcePolicyOutput)
pub fn build(self) -> crate::output::DeleteResourcePolicyOutput {
crate::output::DeleteResourcePolicyOutput {
arn: self.arn,
name: self.name,
}
}
}
}
impl DeleteResourcePolicyOutput {
/// Creates a new builder-style object to manufacture [`DeleteResourcePolicyOutput`](crate::output::DeleteResourcePolicyOutput)
pub fn builder() -> crate::output::delete_resource_policy_output::Builder {
crate::output::delete_resource_policy_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateSecretOutput {
/// <p>The Amazon Resource Name (ARN) of the secret that you just created.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret that you just created.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The unique identifier associated with the version of the secret you just created.</p>
pub version_id: std::option::Option<std::string::String>,
/// <p>Describes a list of replication status objects as <code>InProgress</code>, <code>Failed</code> or <code>InSync</code>.</p>
pub replication_status: std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
}
impl CreateSecretOutput {
/// <p>The Amazon Resource Name (ARN) of the secret that you just created.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret that you just created.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The unique identifier associated with the version of the secret you just created.</p>
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
/// <p>Describes a list of replication status objects as <code>InProgress</code>, <code>Failed</code> or <code>InSync</code>.</p>
pub fn replication_status(
&self,
) -> std::option::Option<&[crate::model::ReplicationStatusType]> {
self.replication_status.as_deref()
}
}
impl std::fmt::Debug for CreateSecretOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateSecretOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("version_id", &self.version_id);
formatter.field("replication_status", &self.replication_status);
formatter.finish()
}
}
/// See [`CreateSecretOutput`](crate::output::CreateSecretOutput)
pub mod create_secret_output {
/// A builder for [`CreateSecretOutput`](crate::output::CreateSecretOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
pub(crate) replication_status:
std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the secret that you just created.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the secret that you just created.</p>
/// <note>
/// <p>Secrets Manager automatically adds several random characters to the name at the end of the ARN when
/// you initially create a secret. This affects only the ARN and not the actual friendly name.
/// This ensures that if you create a new secret with the same name as an old secret that you
/// previously deleted, then users with access to the old secret <i>don't</i>
/// automatically get access to the new secret because the ARNs are different.</p>
/// </note>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret that you just created.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret that you just created.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The unique identifier associated with the version of the secret you just created.</p>
pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
/// <p>The unique identifier associated with the version of the secret you just created.</p>
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
/// Appends an item to `replication_status`.
///
/// To override the contents of this collection use [`set_replication_status`](Self::set_replication_status).
///
/// <p>Describes a list of replication status objects as <code>InProgress</code>, <code>Failed</code> or <code>InSync</code>.</p>
pub fn replication_status(
mut self,
input: impl Into<crate::model::ReplicationStatusType>,
) -> Self {
let mut v = self.replication_status.unwrap_or_default();
v.push(input.into());
self.replication_status = Some(v);
self
}
/// <p>Describes a list of replication status objects as <code>InProgress</code>, <code>Failed</code> or <code>InSync</code>.</p>
pub fn set_replication_status(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ReplicationStatusType>>,
) -> Self {
self.replication_status = input;
self
}
/// Consumes the builder and constructs a [`CreateSecretOutput`](crate::output::CreateSecretOutput)
pub fn build(self) -> crate::output::CreateSecretOutput {
crate::output::CreateSecretOutput {
arn: self.arn,
name: self.name,
version_id: self.version_id,
replication_status: self.replication_status,
}
}
}
}
impl CreateSecretOutput {
/// Creates a new builder-style object to manufacture [`CreateSecretOutput`](crate::output::CreateSecretOutput)
pub fn builder() -> crate::output::create_secret_output::Builder {
crate::output::create_secret_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CancelRotateSecretOutput {
/// <p>The ARN of the secret for which rotation was canceled.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The friendly name of the secret for which rotation was canceled.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The unique identifier of the version of the secret created during the rotation. This
/// version might not be complete, and should be evaluated for possible deletion. At the very
/// least, you should remove the <code>VersionStage</code> value <code>AWSPENDING</code> to enable this
/// version to be deleted. Failing to clean up a cancelled rotation can block you from
/// successfully starting future rotations.</p>
pub version_id: std::option::Option<std::string::String>,
}
impl CancelRotateSecretOutput {
/// <p>The ARN of the secret for which rotation was canceled.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The friendly name of the secret for which rotation was canceled.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The unique identifier of the version of the secret created during the rotation. This
/// version might not be complete, and should be evaluated for possible deletion. At the very
/// least, you should remove the <code>VersionStage</code> value <code>AWSPENDING</code> to enable this
/// version to be deleted. Failing to clean up a cancelled rotation can block you from
/// successfully starting future rotations.</p>
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
}
impl std::fmt::Debug for CancelRotateSecretOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CancelRotateSecretOutput");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("version_id", &self.version_id);
formatter.finish()
}
}
/// See [`CancelRotateSecretOutput`](crate::output::CancelRotateSecretOutput)
pub mod cancel_rotate_secret_output {
/// A builder for [`CancelRotateSecretOutput`](crate::output::CancelRotateSecretOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the secret for which rotation was canceled.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of the secret for which rotation was canceled.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The friendly name of the secret for which rotation was canceled.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The friendly name of the secret for which rotation was canceled.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The unique identifier of the version of the secret created during the rotation. This
/// version might not be complete, and should be evaluated for possible deletion. At the very
/// least, you should remove the <code>VersionStage</code> value <code>AWSPENDING</code> to enable this
/// version to be deleted. Failing to clean up a cancelled rotation can block you from
/// successfully starting future rotations.</p>
pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
/// <p>The unique identifier of the version of the secret created during the rotation. This
/// version might not be complete, and should be evaluated for possible deletion. At the very
/// least, you should remove the <code>VersionStage</code> value <code>AWSPENDING</code> to enable this
/// version to be deleted. Failing to clean up a cancelled rotation can block you from
/// successfully starting future rotations.</p>
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
/// Consumes the builder and constructs a [`CancelRotateSecretOutput`](crate::output::CancelRotateSecretOutput)
pub fn build(self) -> crate::output::CancelRotateSecretOutput {
crate::output::CancelRotateSecretOutput {
arn: self.arn,
name: self.name,
version_id: self.version_id,
}
}
}
}
impl CancelRotateSecretOutput {
/// Creates a new builder-style object to manufacture [`CancelRotateSecretOutput`](crate::output::CancelRotateSecretOutput)
pub fn builder() -> crate::output::cancel_rotate_secret_output::Builder {
crate::output::cancel_rotate_secret_output::Builder::default()
}
}