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
// ================================================================= // // * WARNING * // // This file is generated! // // Changes made to this file will be overwritten. If changes are // required to the generated code, the service_crategen project // must be updated to generate the changes. // // ================================================================= use std::error::Error; use std::fmt; #[allow(warnings)] use futures::future; use futures::Future; use rusoto_core::credential::ProvideAwsCredentials; use rusoto_core::region; use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest}; use rusoto_core::{Client, RusotoError, RusotoFuture}; use rusoto_core::proto; use rusoto_core::signature::SignedRequest; use serde_json; /// <p>Contains information about the certificate subject. The certificate can be one issued by your private certificate authority (CA) or it can be your private CA certificate. The <b>Subject</b> field in the certificate identifies the entity that owns or controls the public key in the certificate. The entity can be a user, computer, device, or service. The <b>Subject</b> must contain an X.500 distinguished name (DN). A DN is a sequence of relative distinguished names (RDNs). The RDNs are separated by commas in the certificate. The DN must be unique for each entity, but your private CA can issue more than one certificate with the same DN to the same entity. </p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ASN1Subject { /// <p>Fully qualified domain name (FQDN) associated with the certificate subject.</p> #[serde(rename = "CommonName")] #[serde(skip_serializing_if = "Option::is_none")] pub common_name: Option<String>, /// <p>Two-digit code that specifies the country in which the certificate subject located.</p> #[serde(rename = "Country")] #[serde(skip_serializing_if = "Option::is_none")] pub country: Option<String>, /// <p>Disambiguating information for the certificate subject.</p> #[serde(rename = "DistinguishedNameQualifier")] #[serde(skip_serializing_if = "Option::is_none")] pub distinguished_name_qualifier: Option<String>, /// <p>Typically a qualifier appended to the name of an individual. Examples include Jr. for junior, Sr. for senior, and III for third.</p> #[serde(rename = "GenerationQualifier")] #[serde(skip_serializing_if = "Option::is_none")] pub generation_qualifier: Option<String>, /// <p>First name.</p> #[serde(rename = "GivenName")] #[serde(skip_serializing_if = "Option::is_none")] pub given_name: Option<String>, /// <p>Concatenation that typically contains the first letter of the <b>GivenName</b>, the first letter of the middle name if one exists, and the first letter of the <b>SurName</b>.</p> #[serde(rename = "Initials")] #[serde(skip_serializing_if = "Option::is_none")] pub initials: Option<String>, /// <p>The locality (such as a city or town) in which the certificate subject is located.</p> #[serde(rename = "Locality")] #[serde(skip_serializing_if = "Option::is_none")] pub locality: Option<String>, /// <p>Legal name of the organization with which the certificate subject is affiliated. </p> #[serde(rename = "Organization")] #[serde(skip_serializing_if = "Option::is_none")] pub organization: Option<String>, /// <p>A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.</p> #[serde(rename = "OrganizationalUnit")] #[serde(skip_serializing_if = "Option::is_none")] pub organizational_unit: Option<String>, /// <p>Typically a shortened version of a longer <b>GivenName</b>. For example, Jonathan is often shortened to John. Elizabeth is often shortened to Beth, Liz, or Eliza.</p> #[serde(rename = "Pseudonym")] #[serde(skip_serializing_if = "Option::is_none")] pub pseudonym: Option<String>, /// <p>The certificate serial number.</p> #[serde(rename = "SerialNumber")] #[serde(skip_serializing_if = "Option::is_none")] pub serial_number: Option<String>, /// <p>State in which the subject of the certificate is located.</p> #[serde(rename = "State")] #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, /// <p>Family name. In the US and the UK, for example, the surname of an individual is ordered last. In Asian cultures the surname is typically ordered first.</p> #[serde(rename = "Surname")] #[serde(skip_serializing_if = "Option::is_none")] pub surname: Option<String>, /// <p>A title such as Mr. or Ms., which is pre-pended to the name to refer formally to the certificate subject.</p> #[serde(rename = "Title")] #[serde(skip_serializing_if = "Option::is_none")] pub title: Option<String>, } /// <p>Contains information about your private certificate authority (CA). Your private CA can issue and revoke X.509 digital certificates. Digital certificates verify that the entity named in the certificate <b>Subject</b> field owns or controls the public key contained in the <b>Subject Public Key Info</b> field. Call the <a>CreateCertificateAuthority</a> operation to create your private CA. You must then call the <a>GetCertificateAuthorityCertificate</a> operation to retrieve a private CA certificate signing request (CSR). Take the CSR to your on-premises CA and sign it with the root CA certificate or a subordinate certificate. Call the <a>ImportCertificateAuthorityCertificate</a> operation to import the signed certificate into AWS Certificate Manager (ACM). </p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct CertificateAuthority { /// <p>Amazon Resource Name (ARN) for your private certificate authority (CA). The format is <code> <i>12345678-1234-1234-1234-123456789012</i> </code>.</p> #[serde(rename = "Arn")] #[serde(skip_serializing_if = "Option::is_none")] pub arn: Option<String>, /// <p>Your private CA configuration.</p> #[serde(rename = "CertificateAuthorityConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate_authority_configuration: Option<CertificateAuthorityConfiguration>, /// <p>Date and time at which your private CA was created.</p> #[serde(rename = "CreatedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option<f64>, /// <p>Reason the request to create your private CA failed.</p> #[serde(rename = "FailureReason")] #[serde(skip_serializing_if = "Option::is_none")] pub failure_reason: Option<String>, /// <p>Date and time at which your private CA was last updated.</p> #[serde(rename = "LastStateChangeAt")] #[serde(skip_serializing_if = "Option::is_none")] pub last_state_change_at: Option<f64>, /// <p>Date and time after which your private CA certificate is not valid.</p> #[serde(rename = "NotAfter")] #[serde(skip_serializing_if = "Option::is_none")] pub not_after: Option<f64>, /// <p>Date and time before which your private CA certificate is not valid.</p> #[serde(rename = "NotBefore")] #[serde(skip_serializing_if = "Option::is_none")] pub not_before: Option<f64>, /// <p>The period during which a deleted CA can be restored. For more information, see the <code>PermanentDeletionTimeInDays</code> parameter of the <a>DeleteCertificateAuthorityRequest</a> operation. </p> #[serde(rename = "RestorableUntil")] #[serde(skip_serializing_if = "Option::is_none")] pub restorable_until: Option<f64>, /// <p>Information about the certificate revocation list (CRL) created and maintained by your private CA. </p> #[serde(rename = "RevocationConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub revocation_configuration: Option<RevocationConfiguration>, /// <p>Serial number of your private CA.</p> #[serde(rename = "Serial")] #[serde(skip_serializing_if = "Option::is_none")] pub serial: Option<String>, /// <p>Status of your private CA.</p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>Type of your private CA.</p> #[serde(rename = "Type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<String>, } /// <p>Contains configuration information for your private certificate authority (CA). This includes information about the class of public key algorithm and the key pair that your private CA creates when it issues a certificate. It also includes the signature algorithm that it uses when issuing certificates, and its X.500 distinguished name. You must specify this information when you call the <a>CreateCertificateAuthority</a> operation. </p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CertificateAuthorityConfiguration { /// <p>Type of the public key algorithm and size, in bits, of the key pair that your key pair creates when it issues a certificate.</p> #[serde(rename = "KeyAlgorithm")] pub key_algorithm: String, /// <p>Name of the algorithm your private CA uses to sign certificate requests.</p> #[serde(rename = "SigningAlgorithm")] pub signing_algorithm: String, /// <p>Structure that contains X.500 distinguished name information for your private CA.</p> #[serde(rename = "Subject")] pub subject: ASN1Subject, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CreateCertificateAuthorityAuditReportRequest { /// <p>The format in which to create the report. This can be either <b>JSON</b> or <b>CSV</b>.</p> #[serde(rename = "AuditReportResponseFormat")] pub audit_report_response_format: String, /// <p>The Amazon Resource Name (ARN) of the CA to be audited. This is of the form:</p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>.</p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>The name of the S3 bucket that will contain the audit report.</p> #[serde(rename = "S3BucketName")] pub s3_bucket_name: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct CreateCertificateAuthorityAuditReportResponse { /// <p>An alphanumeric string that contains a report identifier.</p> #[serde(rename = "AuditReportId")] #[serde(skip_serializing_if = "Option::is_none")] pub audit_report_id: Option<String>, /// <p>The <b>key</b> that uniquely identifies the report file in your S3 bucket.</p> #[serde(rename = "S3Key")] #[serde(skip_serializing_if = "Option::is_none")] pub s3_key: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CreateCertificateAuthorityRequest { /// <p>Name and bit size of the private key algorithm, the name of the signing algorithm, and X.500 certificate subject information.</p> #[serde(rename = "CertificateAuthorityConfiguration")] pub certificate_authority_configuration: CertificateAuthorityConfiguration, /// <p>The type of the certificate authority. Currently, this must be <b>SUBORDINATE</b>.</p> #[serde(rename = "CertificateAuthorityType")] pub certificate_authority_type: String, /// <p>Alphanumeric string that can be used to distinguish between calls to <b>CreateCertificateAuthority</b>. Idempotency tokens time out after five minutes. Therefore, if you call <b>CreateCertificateAuthority</b> multiple times with the same idempotency token within a five minute period, ACM PCA recognizes that you are requesting only one certificate. As a result, ACM PCA issues only one. If you change the idempotency token for each call, however, ACM PCA recognizes that you are requesting multiple certificates.</p> #[serde(rename = "IdempotencyToken")] #[serde(skip_serializing_if = "Option::is_none")] pub idempotency_token: Option<String>, /// <p>Contains a Boolean value that you can use to enable a certification revocation list (CRL) for the CA, the name of the S3 bucket to which ACM PCA will write the CRL, and an optional CNAME alias that you can use to hide the name of your bucket in the <b>CRL Distribution Points</b> extension of your CA certificate. For more information, see the <a>CrlConfiguration</a> structure. </p> #[serde(rename = "RevocationConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub revocation_configuration: Option<RevocationConfiguration>, /// <p>Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a private CA.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct CreateCertificateAuthorityResponse { /// <p>If successful, the Amazon Resource Name (ARN) of the certificate authority (CA). This is of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>. </p> #[serde(rename = "CertificateAuthorityArn")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate_authority_arn: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CreatePermissionRequest { /// <p>The actions that the specified AWS service principal can use. These include <code>IssueCertificate</code>, <code>GetCertificate</code>, and <code>ListPermissions</code>.</p> #[serde(rename = "Actions")] pub actions: Vec<String>, /// <p>The Amazon Resource Name (ARN) of the CA that grants the permissions. You can find the ARN by calling the <a>ListCertificateAuthorities</a> operation. This must have the following form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>. </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>The AWS service or identity that receives the permission. At this time, the only valid principal is <code>acm.amazonaws.com</code>.</p> #[serde(rename = "Principal")] pub principal: String, /// <p>The ID of the calling account.</p> #[serde(rename = "SourceAccount")] #[serde(skip_serializing_if = "Option::is_none")] pub source_account: Option<String>, } /// <p>Contains configuration information for a certificate revocation list (CRL). Your private certificate authority (CA) creates base CRLs. Delta CRLs are not supported. You can enable CRLs for your new or an existing private CA by setting the <b>Enabled</b> parameter to <code>true</code>. Your private CA writes CRLs to an S3 bucket that you specify in the <b>S3BucketName</b> parameter. You can hide the name of your bucket by specifying a value for the <b>CustomCname</b> parameter. Your private CA copies the CNAME or the S3 bucket name to the <b>CRL Distribution Points</b> extension of each certificate it issues. Your S3 bucket policy must give write permission to ACM PCA. </p> <p>Your private CA uses the value in the <b>ExpirationInDays</b> parameter to calculate the <b>nextUpdate</b> field in the CRL. The CRL is refreshed at 1/2 the age of next update or when a certificate is revoked. When a certificate is revoked, it is recorded in the next CRL that is generated and in the next audit report. Only time valid certificates are listed in the CRL. Expired certificates are not included. </p> <p>CRLs contain the following fields:</p> <ul> <li> <p> <b>Version</b>: The current version number defined in RFC 5280 is V2. The integer value is 0x1. </p> </li> <li> <p> <b>Signature Algorithm</b>: The name of the algorithm used to sign the CRL.</p> </li> <li> <p> <b>Issuer</b>: The X.500 distinguished name of your private CA that issued the CRL.</p> </li> <li> <p> <b>Last Update</b>: The issue date and time of this CRL.</p> </li> <li> <p> <b>Next Update</b>: The day and time by which the next CRL will be issued.</p> </li> <li> <p> <b>Revoked Certificates</b>: List of revoked certificates. Each list item contains the following information.</p> <ul> <li> <p> <b>Serial Number</b>: The serial number, in hexadecimal format, of the revoked certificate.</p> </li> <li> <p> <b>Revocation Date</b>: Date and time the certificate was revoked.</p> </li> <li> <p> <b>CRL Entry Extensions</b>: Optional extensions for the CRL entry.</p> <ul> <li> <p> <b>X509v3 CRL Reason Code</b>: Reason the certificate was revoked.</p> </li> </ul> </li> </ul> </li> <li> <p> <b>CRL Extensions</b>: Optional extensions for the CRL.</p> <ul> <li> <p> <b>X509v3 Authority Key Identifier</b>: Identifies the public key associated with the private key used to sign the certificate.</p> </li> <li> <p> <b>X509v3 CRL Number:</b>: Decimal sequence number for the CRL.</p> </li> </ul> </li> <li> <p> <b>Signature Algorithm</b>: Algorithm used by your private CA to sign the CRL.</p> </li> <li> <p> <b>Signature Value</b>: Signature computed over the CRL.</p> </li> </ul> <p>Certificate revocation lists created by ACM PCA are DER-encoded. You can use the following OpenSSL command to list a CRL.</p> <p> <code>openssl crl -inform DER -text -in <i>crl_path</i> -noout</code> </p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CrlConfiguration { /// <p>Name inserted into the certificate <b>CRL Distribution Points</b> extension that enables the use of an alias for the CRL distribution point. Use this value if you don't want the name of your S3 bucket to be public.</p> #[serde(rename = "CustomCname")] #[serde(skip_serializing_if = "Option::is_none")] pub custom_cname: Option<String>, /// <p>Boolean value that specifies whether certificate revocation lists (CRLs) are enabled. You can use this value to enable certificate revocation for a new CA when you call the <a>CreateCertificateAuthority</a> operation or for an existing CA when you call the <a>UpdateCertificateAuthority</a> operation. </p> #[serde(rename = "Enabled")] pub enabled: bool, /// <p>Number of days until a certificate expires.</p> #[serde(rename = "ExpirationInDays")] #[serde(skip_serializing_if = "Option::is_none")] pub expiration_in_days: Option<i64>, /// <p>Name of the S3 bucket that contains the CRL. If you do not provide a value for the <b>CustomCname</b> argument, the name of your S3 bucket is placed into the <b>CRL Distribution Points</b> extension of the issued certificate. You can change the name of your bucket by calling the <a>UpdateCertificateAuthority</a> operation. You must specify a bucket policy that allows ACM PCA to write the CRL to your bucket.</p> #[serde(rename = "S3BucketName")] #[serde(skip_serializing_if = "Option::is_none")] pub s3_bucket_name: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteCertificateAuthorityRequest { /// <p>The Amazon Resource Name (ARN) that was returned when you called <a>CreateCertificateAuthority</a>. This must have the following form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>. </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>The number of days to make a CA restorable after it has been deleted. This can be anywhere from 7 to 30 days, with 30 being the default.</p> #[serde(rename = "PermanentDeletionTimeInDays")] #[serde(skip_serializing_if = "Option::is_none")] pub permanent_deletion_time_in_days: Option<i64>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeletePermissionRequest { /// <p>The Amazon Resource Number (ARN) of the private CA that issued the permissions. You can find the CA's ARN by calling the <a>ListCertificateAuthorities</a> operation. This must have the following form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>. </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>The AWS service or identity that will have its CA permissions revoked. At this time, the only valid service principal is <code>acm.amazonaws.com</code> </p> #[serde(rename = "Principal")] pub principal: String, /// <p>The AWS account that calls this operation.</p> #[serde(rename = "SourceAccount")] #[serde(skip_serializing_if = "Option::is_none")] pub source_account: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeCertificateAuthorityAuditReportRequest { /// <p>The report ID returned by calling the <a>CreateCertificateAuthorityAuditReport</a> operation.</p> #[serde(rename = "AuditReportId")] pub audit_report_id: String, /// <p>The Amazon Resource Name (ARN) of the private CA. This must be of the form:</p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>. </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeCertificateAuthorityAuditReportResponse { /// <p>Specifies whether report creation is in progress, has succeeded, or has failed.</p> #[serde(rename = "AuditReportStatus")] #[serde(skip_serializing_if = "Option::is_none")] pub audit_report_status: Option<String>, /// <p>The date and time at which the report was created.</p> #[serde(rename = "CreatedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option<f64>, /// <p>Name of the S3 bucket that contains the report.</p> #[serde(rename = "S3BucketName")] #[serde(skip_serializing_if = "Option::is_none")] pub s3_bucket_name: Option<String>, /// <p>S3 <b>key</b> that uniquely identifies the report file in your S3 bucket.</p> #[serde(rename = "S3Key")] #[serde(skip_serializing_if = "Option::is_none")] pub s3_key: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeCertificateAuthorityRequest { /// <p>The Amazon Resource Name (ARN) that was returned when you called <a>CreateCertificateAuthority</a>. This must be of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>. </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeCertificateAuthorityResponse { /// <p>A <a>CertificateAuthority</a> structure that contains information about your private CA.</p> #[serde(rename = "CertificateAuthority")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate_authority: Option<CertificateAuthority>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetCertificateAuthorityCertificateRequest { /// <p>The Amazon Resource Name (ARN) of your private CA. This is of the form:</p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>. </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GetCertificateAuthorityCertificateResponse { /// <p>Base64-encoded certificate authority (CA) certificate.</p> #[serde(rename = "Certificate")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate: Option<String>, /// <p>Base64-encoded certificate chain that includes any intermediate certificates and chains up to root on-premises certificate that you used to sign your private CA certificate. The chain does not include your private CA certificate. </p> #[serde(rename = "CertificateChain")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate_chain: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetCertificateAuthorityCsrRequest { /// <p>The Amazon Resource Name (ARN) that was returned when you called the <a>CreateCertificateAuthority</a> operation. This must be of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GetCertificateAuthorityCsrResponse { /// <p>The base64 PEM-encoded certificate signing request (CSR) for your private CA certificate.</p> #[serde(rename = "Csr")] #[serde(skip_serializing_if = "Option::is_none")] pub csr: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetCertificateRequest { /// <p>The ARN of the issued certificate. The ARN contains the certificate serial number and must be in the following form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>/certificate/<i>286535153982981100925020015808220737245</i> </code> </p> #[serde(rename = "CertificateArn")] pub certificate_arn: String, /// <p>The Amazon Resource Name (ARN) that was returned when you called <a>CreateCertificateAuthority</a>. This must be of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>. </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GetCertificateResponse { /// <p>The base64 PEM-encoded certificate specified by the <code>CertificateArn</code> parameter.</p> #[serde(rename = "Certificate")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate: Option<String>, /// <p>The base64 PEM-encoded certificate chain that chains up to the on-premises root CA certificate that you used to sign your private CA certificate. </p> #[serde(rename = "CertificateChain")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate_chain: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ImportCertificateAuthorityCertificateRequest { /// <p>The PEM-encoded certificate for your private CA. This must be signed by using your on-premises CA.</p> #[serde(rename = "Certificate")] #[serde( deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob", serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob", default )] pub certificate: bytes::Bytes, /// <p>The Amazon Resource Name (ARN) that was returned when you called <a>CreateCertificateAuthority</a>. This must be of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>A PEM-encoded file that contains all of your certificates, other than the certificate you're importing, chaining up to your root CA. Your on-premises root certificate is the last in the chain, and each certificate in the chain signs the one preceding. </p> #[serde(rename = "CertificateChain")] #[serde( deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob", serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob", default )] pub certificate_chain: bytes::Bytes, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct IssueCertificateRequest { /// <p>The Amazon Resource Name (ARN) that was returned when you called <a>CreateCertificateAuthority</a>. This must be of the form:</p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>The certificate signing request (CSR) for the certificate you want to issue. You can use the following OpenSSL command to create the CSR and a 2048 bit RSA private key. </p> <p> <code>openssl req -new -newkey rsa:2048 -days 365 -keyout private/test_cert_priv_key.pem -out csr/test_cert_.csr</code> </p> <p>If you have a configuration file, you can use the following OpenSSL command. The <code>usr_cert</code> block in the configuration file contains your X509 version 3 extensions. </p> <p> <code>openssl req -new -config openssl_rsa.cnf -extensions usr_cert -newkey rsa:2048 -days -365 -keyout private/test_cert_priv_key.pem -out csr/test_cert_.csr</code> </p> #[serde(rename = "Csr")] #[serde( deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob", serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob", default )] pub csr: bytes::Bytes, /// <p>Custom string that can be used to distinguish between calls to the <b>IssueCertificate</b> operation. Idempotency tokens time out after one hour. Therefore, if you call <b>IssueCertificate</b> multiple times with the same idempotency token within 5 minutes, ACM PCA recognizes that you are requesting only one certificate and will issue only one. If you change the idempotency token for each call, PCA recognizes that you are requesting multiple certificates.</p> #[serde(rename = "IdempotencyToken")] #[serde(skip_serializing_if = "Option::is_none")] pub idempotency_token: Option<String>, /// <p>The name of the algorithm that will be used to sign the certificate to be issued.</p> #[serde(rename = "SigningAlgorithm")] pub signing_algorithm: String, /// <p>The type of the validity period.</p> #[serde(rename = "Validity")] pub validity: Validity, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct IssueCertificateResponse { /// <p>The Amazon Resource Name (ARN) of the issued certificate and the certificate serial number. This is of the form:</p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>/certificate/<i>286535153982981100925020015808220737245</i> </code> </p> #[serde(rename = "CertificateArn")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate_arn: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListCertificateAuthoritiesRequest { /// <p>Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the <code>NextToken</code> element is sent in the response. Use this <code>NextToken</code> value in a subsequent request to retrieve additional items.</p> #[serde(rename = "MaxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p>Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the <code>NextToken</code> parameter from the response you just received.</p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListCertificateAuthoritiesResponse { /// <p>Summary information about each certificate authority you have created.</p> #[serde(rename = "CertificateAuthorities")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate_authorities: Option<Vec<CertificateAuthority>>, /// <p>When the list is truncated, this value is present and should be used for the <code>NextToken</code> parameter in a subsequent pagination request.</p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListPermissionsRequest { /// <p>The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the <a>ListCertificateAuthorities</a> operation. This must be of the form: <code>arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012</code> You can get a private CA's ARN by running the <a>ListCertificateAuthorities</a> operation.</p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the <b>NextToken</b> element is sent in the response. Use this <b>NextToken</b> value in a subsequent request to retrieve additional items.</p> #[serde(rename = "MaxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p>When paginating results, use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of <b>NextToken</b> from the response you just received.</p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListPermissionsResponse { /// <p>When the list is truncated, this value is present and should be used for the <b>NextToken</b> parameter in a subsequent pagination request. </p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>Summary information about each permission assigned by the specified private CA, including the action enabled, the policy provided, and the time of creation.</p> #[serde(rename = "Permissions")] #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option<Vec<Permission>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListTagsRequest { /// <p>The Amazon Resource Name (ARN) that was returned when you called the <a>CreateCertificateAuthority</a> operation. This must be of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the <b>NextToken</b> element is sent in the response. Use this <b>NextToken</b> value in a subsequent request to retrieve additional items.</p> #[serde(rename = "MaxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p>Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of <b>NextToken</b> from the response you just received.</p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListTagsResponse { /// <p>When the list is truncated, this value is present and should be used for the <b>NextToken</b> parameter in a subsequent pagination request. </p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The tags associated with your private CA.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, } /// <p>Permissions designate which private CA operations can be performed by an AWS service or entity. In order for ACM to automatically renew private certificates, you must give the ACM service principal all available permissions (<code>IssueCertificate</code>, <code>GetCertificate</code>, and <code>ListPermissions</code>). Permissions can be assigned with the <a>CreatePermission</a> operation, removed with the <a>DeletePermission</a> operation, and listed with the <a>ListPermissions</a> operation.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Permission { /// <p>The private CA operations that can be performed by the designated AWS service.</p> #[serde(rename = "Actions")] #[serde(skip_serializing_if = "Option::is_none")] pub actions: Option<Vec<String>>, /// <p>The Amazon Resource Number (ARN) of the private CA from which the permission was issued.</p> #[serde(rename = "CertificateAuthorityArn")] #[serde(skip_serializing_if = "Option::is_none")] pub certificate_authority_arn: Option<String>, /// <p>The time at which the permission was created.</p> #[serde(rename = "CreatedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option<f64>, /// <p>The name of the policy that is associated with the permission.</p> #[serde(rename = "Policy")] #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option<String>, /// <p>The AWS service or entity that holds the permission. At this time, the only valid principal is <code>acm.amazonaws.com</code>.</p> #[serde(rename = "Principal")] #[serde(skip_serializing_if = "Option::is_none")] pub principal: Option<String>, /// <p>The ID of the account that assigned the permission.</p> #[serde(rename = "SourceAccount")] #[serde(skip_serializing_if = "Option::is_none")] pub source_account: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct RestoreCertificateAuthorityRequest { /// <p>The Amazon Resource Name (ARN) that was returned when you called the <a>CreateCertificateAuthority</a> operation. This must be of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, } /// <p>Certificate revocation information used by the <a>CreateCertificateAuthority</a> and <a>UpdateCertificateAuthority</a> operations. Your private certificate authority (CA) can create and maintain a certificate revocation list (CRL). A CRL contains information about certificates revoked by your CA. For more information, see <a>RevokeCertificate</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RevocationConfiguration { /// <p>Configuration of the certificate revocation list (CRL), if any, maintained by your private CA.</p> #[serde(rename = "CrlConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub crl_configuration: Option<CrlConfiguration>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct RevokeCertificateRequest { /// <p>Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of the form:</p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>Serial number of the certificate to be revoked. This must be in hexadecimal format. You can retrieve the serial number by calling <a>GetCertificate</a> with the Amazon Resource Name (ARN) of the certificate you want and the ARN of your private CA. The <b>GetCertificate</b> operation retrieves the certificate in the PEM format. You can use the following OpenSSL command to list the certificate in text format and copy the hexadecimal serial number. </p> <p> <code>openssl x509 -in <i>file_path</i> -text -noout</code> </p> <p>You can also copy the serial number from the console or use the <a href="https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html">DescribeCertificate</a> operation in the <i>AWS Certificate Manager API Reference</i>. </p> #[serde(rename = "CertificateSerial")] pub certificate_serial: String, /// <p>Specifies why you revoked the certificate.</p> #[serde(rename = "RevocationReason")] pub revocation_reason: String, } /// <p>Tags are labels that you can use to identify and organize your private CAs. Each tag consists of a key and an optional value. You can associate up to 50 tags with a private CA. To add one or more tags to a private CA, call the <a>TagCertificateAuthority</a> operation. To remove a tag, call the <a>UntagCertificateAuthority</a> operation. </p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Tag { /// <p>Key (name) of the tag.</p> #[serde(rename = "Key")] pub key: String, /// <p>Value of the tag.</p> #[serde(rename = "Value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct TagCertificateAuthorityRequest { /// <p>The Amazon Resource Name (ARN) that was returned when you called <a>CreateCertificateAuthority</a>. This must be of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>List of tags to be associated with the CA.</p> #[serde(rename = "Tags")] pub tags: Vec<Tag>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UntagCertificateAuthorityRequest { /// <p>The Amazon Resource Name (ARN) that was returned when you called <a>CreateCertificateAuthority</a>. This must be of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>List of tags to be removed from the CA.</p> #[serde(rename = "Tags")] pub tags: Vec<Tag>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UpdateCertificateAuthorityRequest { /// <p>Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of the form:</p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p> #[serde(rename = "CertificateAuthorityArn")] pub certificate_authority_arn: String, /// <p>Revocation information for your private CA.</p> #[serde(rename = "RevocationConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub revocation_configuration: Option<RevocationConfiguration>, /// <p>Status of your private CA.</p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, } /// <p>Length of time for which the certificate issued by your private certificate authority (CA), or by the private CA itself, is valid in days, months, or years. You can issue a certificate by calling the <a>IssueCertificate</a> operation.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct Validity { /// <p>Specifies whether the <code>Value</code> parameter represents days, months, or years.</p> #[serde(rename = "Type")] pub type_: String, /// <p>Time period.</p> #[serde(rename = "Value")] pub value: i64, } /// Errors returned by CreateCertificateAuthority #[derive(Debug, PartialEq)] pub enum CreateCertificateAuthorityError { /// <p>One or more of the specified arguments was not valid.</p> InvalidArgs(String), /// <p>The S3 bucket policy is not valid. The policy must give ACM PCA rights to read from and write to the bucket and find the bucket location.</p> InvalidPolicy(String), /// <p>The tag associated with the CA is not valid. The invalid argument is contained in the message field.</p> InvalidTag(String), /// <p>An ACM PCA limit has been exceeded. See the exception message returned to determine the limit that was exceeded.</p> LimitExceeded(String), } impl CreateCertificateAuthorityError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<CreateCertificateAuthorityError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgsException" => { return RusotoError::Service(CreateCertificateAuthorityError::InvalidArgs( err.msg, )) } "InvalidPolicyException" => { return RusotoError::Service(CreateCertificateAuthorityError::InvalidPolicy( err.msg, )) } "InvalidTagException" => { return RusotoError::Service(CreateCertificateAuthorityError::InvalidTag( err.msg, )) } "LimitExceededException" => { return RusotoError::Service(CreateCertificateAuthorityError::LimitExceeded( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CreateCertificateAuthorityError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CreateCertificateAuthorityError { fn description(&self) -> &str { match *self { CreateCertificateAuthorityError::InvalidArgs(ref cause) => cause, CreateCertificateAuthorityError::InvalidPolicy(ref cause) => cause, CreateCertificateAuthorityError::InvalidTag(ref cause) => cause, CreateCertificateAuthorityError::LimitExceeded(ref cause) => cause, } } } /// Errors returned by CreateCertificateAuthorityAuditReport #[derive(Debug, PartialEq)] pub enum CreateCertificateAuthorityAuditReportError { /// <p>One or more of the specified arguments was not valid.</p> InvalidArgs(String), /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>The request has failed for an unspecified reason.</p> RequestFailed(String), /// <p>Your request is already in progress.</p> RequestInProgress(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl CreateCertificateAuthorityAuditReportError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<CreateCertificateAuthorityAuditReportError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgsException" => { return RusotoError::Service( CreateCertificateAuthorityAuditReportError::InvalidArgs(err.msg), ) } "InvalidArnException" => { return RusotoError::Service( CreateCertificateAuthorityAuditReportError::InvalidArn(err.msg), ) } "InvalidStateException" => { return RusotoError::Service( CreateCertificateAuthorityAuditReportError::InvalidState(err.msg), ) } "RequestFailedException" => { return RusotoError::Service( CreateCertificateAuthorityAuditReportError::RequestFailed(err.msg), ) } "RequestInProgressException" => { return RusotoError::Service( CreateCertificateAuthorityAuditReportError::RequestInProgress(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service( CreateCertificateAuthorityAuditReportError::ResourceNotFound(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CreateCertificateAuthorityAuditReportError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CreateCertificateAuthorityAuditReportError { fn description(&self) -> &str { match *self { CreateCertificateAuthorityAuditReportError::InvalidArgs(ref cause) => cause, CreateCertificateAuthorityAuditReportError::InvalidArn(ref cause) => cause, CreateCertificateAuthorityAuditReportError::InvalidState(ref cause) => cause, CreateCertificateAuthorityAuditReportError::RequestFailed(ref cause) => cause, CreateCertificateAuthorityAuditReportError::RequestInProgress(ref cause) => cause, CreateCertificateAuthorityAuditReportError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by CreatePermission #[derive(Debug, PartialEq)] pub enum CreatePermissionError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>An ACM PCA limit has been exceeded. See the exception message returned to determine the limit that was exceeded.</p> LimitExceeded(String), /// <p>The designated permission has already been given to the user.</p> PermissionAlreadyExists(String), /// <p>The request has failed for an unspecified reason.</p> RequestFailed(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl CreatePermissionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePermissionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(CreatePermissionError::InvalidArn(err.msg)) } "InvalidStateException" => { return RusotoError::Service(CreatePermissionError::InvalidState(err.msg)) } "LimitExceededException" => { return RusotoError::Service(CreatePermissionError::LimitExceeded(err.msg)) } "PermissionAlreadyExistsException" => { return RusotoError::Service(CreatePermissionError::PermissionAlreadyExists( err.msg, )) } "RequestFailedException" => { return RusotoError::Service(CreatePermissionError::RequestFailed(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(CreatePermissionError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CreatePermissionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CreatePermissionError { fn description(&self) -> &str { match *self { CreatePermissionError::InvalidArn(ref cause) => cause, CreatePermissionError::InvalidState(ref cause) => cause, CreatePermissionError::LimitExceeded(ref cause) => cause, CreatePermissionError::PermissionAlreadyExists(ref cause) => cause, CreatePermissionError::RequestFailed(ref cause) => cause, CreatePermissionError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DeleteCertificateAuthority #[derive(Debug, PartialEq)] pub enum DeleteCertificateAuthorityError { /// <p>A previous update to your private CA is still ongoing.</p> ConcurrentModification(String), /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl DeleteCertificateAuthorityError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteCertificateAuthorityError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ConcurrentModificationException" => { return RusotoError::Service( DeleteCertificateAuthorityError::ConcurrentModification(err.msg), ) } "InvalidArnException" => { return RusotoError::Service(DeleteCertificateAuthorityError::InvalidArn( err.msg, )) } "InvalidStateException" => { return RusotoError::Service(DeleteCertificateAuthorityError::InvalidState( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(DeleteCertificateAuthorityError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteCertificateAuthorityError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteCertificateAuthorityError { fn description(&self) -> &str { match *self { DeleteCertificateAuthorityError::ConcurrentModification(ref cause) => cause, DeleteCertificateAuthorityError::InvalidArn(ref cause) => cause, DeleteCertificateAuthorityError::InvalidState(ref cause) => cause, DeleteCertificateAuthorityError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DeletePermission #[derive(Debug, PartialEq)] pub enum DeletePermissionError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>The request has failed for an unspecified reason.</p> RequestFailed(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl DeletePermissionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePermissionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(DeletePermissionError::InvalidArn(err.msg)) } "InvalidStateException" => { return RusotoError::Service(DeletePermissionError::InvalidState(err.msg)) } "RequestFailedException" => { return RusotoError::Service(DeletePermissionError::RequestFailed(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(DeletePermissionError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeletePermissionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeletePermissionError { fn description(&self) -> &str { match *self { DeletePermissionError::InvalidArn(ref cause) => cause, DeletePermissionError::InvalidState(ref cause) => cause, DeletePermissionError::RequestFailed(ref cause) => cause, DeletePermissionError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DescribeCertificateAuthority #[derive(Debug, PartialEq)] pub enum DescribeCertificateAuthorityError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl DescribeCertificateAuthorityError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<DescribeCertificateAuthorityError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(DescribeCertificateAuthorityError::InvalidArn( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service( DescribeCertificateAuthorityError::ResourceNotFound(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeCertificateAuthorityError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeCertificateAuthorityError { fn description(&self) -> &str { match *self { DescribeCertificateAuthorityError::InvalidArn(ref cause) => cause, DescribeCertificateAuthorityError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DescribeCertificateAuthorityAuditReport #[derive(Debug, PartialEq)] pub enum DescribeCertificateAuthorityAuditReportError { /// <p>One or more of the specified arguments was not valid.</p> InvalidArgs(String), /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl DescribeCertificateAuthorityAuditReportError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<DescribeCertificateAuthorityAuditReportError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgsException" => { return RusotoError::Service( DescribeCertificateAuthorityAuditReportError::InvalidArgs(err.msg), ) } "InvalidArnException" => { return RusotoError::Service( DescribeCertificateAuthorityAuditReportError::InvalidArn(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service( DescribeCertificateAuthorityAuditReportError::ResourceNotFound(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeCertificateAuthorityAuditReportError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeCertificateAuthorityAuditReportError { fn description(&self) -> &str { match *self { DescribeCertificateAuthorityAuditReportError::InvalidArgs(ref cause) => cause, DescribeCertificateAuthorityAuditReportError::InvalidArn(ref cause) => cause, DescribeCertificateAuthorityAuditReportError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by GetCertificate #[derive(Debug, PartialEq)] pub enum GetCertificateError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>The request has failed for an unspecified reason.</p> RequestFailed(String), /// <p>Your request is already in progress.</p> RequestInProgress(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl GetCertificateError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCertificateError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(GetCertificateError::InvalidArn(err.msg)) } "InvalidStateException" => { return RusotoError::Service(GetCertificateError::InvalidState(err.msg)) } "RequestFailedException" => { return RusotoError::Service(GetCertificateError::RequestFailed(err.msg)) } "RequestInProgressException" => { return RusotoError::Service(GetCertificateError::RequestInProgress(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(GetCertificateError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetCertificateError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetCertificateError { fn description(&self) -> &str { match *self { GetCertificateError::InvalidArn(ref cause) => cause, GetCertificateError::InvalidState(ref cause) => cause, GetCertificateError::RequestFailed(ref cause) => cause, GetCertificateError::RequestInProgress(ref cause) => cause, GetCertificateError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by GetCertificateAuthorityCertificate #[derive(Debug, PartialEq)] pub enum GetCertificateAuthorityCertificateError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl GetCertificateAuthorityCertificateError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<GetCertificateAuthorityCertificateError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service( GetCertificateAuthorityCertificateError::InvalidArn(err.msg), ) } "InvalidStateException" => { return RusotoError::Service( GetCertificateAuthorityCertificateError::InvalidState(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service( GetCertificateAuthorityCertificateError::ResourceNotFound(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetCertificateAuthorityCertificateError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetCertificateAuthorityCertificateError { fn description(&self) -> &str { match *self { GetCertificateAuthorityCertificateError::InvalidArn(ref cause) => cause, GetCertificateAuthorityCertificateError::InvalidState(ref cause) => cause, GetCertificateAuthorityCertificateError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by GetCertificateAuthorityCsr #[derive(Debug, PartialEq)] pub enum GetCertificateAuthorityCsrError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>The request has failed for an unspecified reason.</p> RequestFailed(String), /// <p>Your request is already in progress.</p> RequestInProgress(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl GetCertificateAuthorityCsrError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<GetCertificateAuthorityCsrError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(GetCertificateAuthorityCsrError::InvalidArn( err.msg, )) } "InvalidStateException" => { return RusotoError::Service(GetCertificateAuthorityCsrError::InvalidState( err.msg, )) } "RequestFailedException" => { return RusotoError::Service(GetCertificateAuthorityCsrError::RequestFailed( err.msg, )) } "RequestInProgressException" => { return RusotoError::Service( GetCertificateAuthorityCsrError::RequestInProgress(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service(GetCertificateAuthorityCsrError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetCertificateAuthorityCsrError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetCertificateAuthorityCsrError { fn description(&self) -> &str { match *self { GetCertificateAuthorityCsrError::InvalidArn(ref cause) => cause, GetCertificateAuthorityCsrError::InvalidState(ref cause) => cause, GetCertificateAuthorityCsrError::RequestFailed(ref cause) => cause, GetCertificateAuthorityCsrError::RequestInProgress(ref cause) => cause, GetCertificateAuthorityCsrError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by ImportCertificateAuthorityCertificate #[derive(Debug, PartialEq)] pub enum ImportCertificateAuthorityCertificateError { /// <p>The certificate authority certificate you are importing does not comply with conditions specified in the certificate that signed it.</p> CertificateMismatch(String), /// <p>A previous update to your private CA is still ongoing.</p> ConcurrentModification(String), /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>One or more fields in the certificate are invalid.</p> MalformedCertificate(String), /// <p>The request has failed for an unspecified reason.</p> RequestFailed(String), /// <p>Your request is already in progress.</p> RequestInProgress(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl ImportCertificateAuthorityCertificateError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<ImportCertificateAuthorityCertificateError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "CertificateMismatchException" => { return RusotoError::Service( ImportCertificateAuthorityCertificateError::CertificateMismatch(err.msg), ) } "ConcurrentModificationException" => { return RusotoError::Service( ImportCertificateAuthorityCertificateError::ConcurrentModification(err.msg), ) } "InvalidArnException" => { return RusotoError::Service( ImportCertificateAuthorityCertificateError::InvalidArn(err.msg), ) } "InvalidStateException" => { return RusotoError::Service( ImportCertificateAuthorityCertificateError::InvalidState(err.msg), ) } "MalformedCertificateException" => { return RusotoError::Service( ImportCertificateAuthorityCertificateError::MalformedCertificate(err.msg), ) } "RequestFailedException" => { return RusotoError::Service( ImportCertificateAuthorityCertificateError::RequestFailed(err.msg), ) } "RequestInProgressException" => { return RusotoError::Service( ImportCertificateAuthorityCertificateError::RequestInProgress(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service( ImportCertificateAuthorityCertificateError::ResourceNotFound(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ImportCertificateAuthorityCertificateError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ImportCertificateAuthorityCertificateError { fn description(&self) -> &str { match *self { ImportCertificateAuthorityCertificateError::CertificateMismatch(ref cause) => cause, ImportCertificateAuthorityCertificateError::ConcurrentModification(ref cause) => cause, ImportCertificateAuthorityCertificateError::InvalidArn(ref cause) => cause, ImportCertificateAuthorityCertificateError::InvalidState(ref cause) => cause, ImportCertificateAuthorityCertificateError::MalformedCertificate(ref cause) => cause, ImportCertificateAuthorityCertificateError::RequestFailed(ref cause) => cause, ImportCertificateAuthorityCertificateError::RequestInProgress(ref cause) => cause, ImportCertificateAuthorityCertificateError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by IssueCertificate #[derive(Debug, PartialEq)] pub enum IssueCertificateError { /// <p>One or more of the specified arguments was not valid.</p> InvalidArgs(String), /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>An ACM PCA limit has been exceeded. See the exception message returned to determine the limit that was exceeded.</p> LimitExceeded(String), /// <p>The certificate signing request is invalid.</p> MalformedCSR(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl IssueCertificateError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<IssueCertificateError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgsException" => { return RusotoError::Service(IssueCertificateError::InvalidArgs(err.msg)) } "InvalidArnException" => { return RusotoError::Service(IssueCertificateError::InvalidArn(err.msg)) } "InvalidStateException" => { return RusotoError::Service(IssueCertificateError::InvalidState(err.msg)) } "LimitExceededException" => { return RusotoError::Service(IssueCertificateError::LimitExceeded(err.msg)) } "MalformedCSRException" => { return RusotoError::Service(IssueCertificateError::MalformedCSR(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(IssueCertificateError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for IssueCertificateError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for IssueCertificateError { fn description(&self) -> &str { match *self { IssueCertificateError::InvalidArgs(ref cause) => cause, IssueCertificateError::InvalidArn(ref cause) => cause, IssueCertificateError::InvalidState(ref cause) => cause, IssueCertificateError::LimitExceeded(ref cause) => cause, IssueCertificateError::MalformedCSR(ref cause) => cause, IssueCertificateError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by ListCertificateAuthorities #[derive(Debug, PartialEq)] pub enum ListCertificateAuthoritiesError { /// <p>The token specified in the <code>NextToken</code> argument is not valid. Use the token returned from your previous call to <a>ListCertificateAuthorities</a>.</p> InvalidNextToken(String), } impl ListCertificateAuthoritiesError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<ListCertificateAuthoritiesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidNextTokenException" => { return RusotoError::Service(ListCertificateAuthoritiesError::InvalidNextToken( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListCertificateAuthoritiesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListCertificateAuthoritiesError { fn description(&self) -> &str { match *self { ListCertificateAuthoritiesError::InvalidNextToken(ref cause) => cause, } } } /// Errors returned by ListPermissions #[derive(Debug, PartialEq)] pub enum ListPermissionsError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The token specified in the <code>NextToken</code> argument is not valid. Use the token returned from your previous call to <a>ListCertificateAuthorities</a>.</p> InvalidNextToken(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>The request has failed for an unspecified reason.</p> RequestFailed(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl ListPermissionsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPermissionsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(ListPermissionsError::InvalidArn(err.msg)) } "InvalidNextTokenException" => { return RusotoError::Service(ListPermissionsError::InvalidNextToken(err.msg)) } "InvalidStateException" => { return RusotoError::Service(ListPermissionsError::InvalidState(err.msg)) } "RequestFailedException" => { return RusotoError::Service(ListPermissionsError::RequestFailed(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(ListPermissionsError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListPermissionsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListPermissionsError { fn description(&self) -> &str { match *self { ListPermissionsError::InvalidArn(ref cause) => cause, ListPermissionsError::InvalidNextToken(ref cause) => cause, ListPermissionsError::InvalidState(ref cause) => cause, ListPermissionsError::RequestFailed(ref cause) => cause, ListPermissionsError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by ListTags #[derive(Debug, PartialEq)] pub enum ListTagsError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl ListTagsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(ListTagsError::InvalidArn(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(ListTagsError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListTagsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListTagsError { fn description(&self) -> &str { match *self { ListTagsError::InvalidArn(ref cause) => cause, ListTagsError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by RestoreCertificateAuthority #[derive(Debug, PartialEq)] pub enum RestoreCertificateAuthorityError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl RestoreCertificateAuthorityError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<RestoreCertificateAuthorityError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(RestoreCertificateAuthorityError::InvalidArn( err.msg, )) } "InvalidStateException" => { return RusotoError::Service(RestoreCertificateAuthorityError::InvalidState( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service( RestoreCertificateAuthorityError::ResourceNotFound(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RestoreCertificateAuthorityError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RestoreCertificateAuthorityError { fn description(&self) -> &str { match *self { RestoreCertificateAuthorityError::InvalidArn(ref cause) => cause, RestoreCertificateAuthorityError::InvalidState(ref cause) => cause, RestoreCertificateAuthorityError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by RevokeCertificate #[derive(Debug, PartialEq)] pub enum RevokeCertificateError { /// <p>A previous update to your private CA is still ongoing.</p> ConcurrentModification(String), /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>An ACM PCA limit has been exceeded. See the exception message returned to determine the limit that was exceeded.</p> LimitExceeded(String), /// <p>Your request has already been completed.</p> RequestAlreadyProcessed(String), /// <p>The request has failed for an unspecified reason.</p> RequestFailed(String), /// <p>Your request is already in progress.</p> RequestInProgress(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl RevokeCertificateError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RevokeCertificateError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ConcurrentModificationException" => { return RusotoError::Service(RevokeCertificateError::ConcurrentModification( err.msg, )) } "InvalidArnException" => { return RusotoError::Service(RevokeCertificateError::InvalidArn(err.msg)) } "InvalidStateException" => { return RusotoError::Service(RevokeCertificateError::InvalidState(err.msg)) } "LimitExceededException" => { return RusotoError::Service(RevokeCertificateError::LimitExceeded(err.msg)) } "RequestAlreadyProcessedException" => { return RusotoError::Service(RevokeCertificateError::RequestAlreadyProcessed( err.msg, )) } "RequestFailedException" => { return RusotoError::Service(RevokeCertificateError::RequestFailed(err.msg)) } "RequestInProgressException" => { return RusotoError::Service(RevokeCertificateError::RequestInProgress(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(RevokeCertificateError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RevokeCertificateError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RevokeCertificateError { fn description(&self) -> &str { match *self { RevokeCertificateError::ConcurrentModification(ref cause) => cause, RevokeCertificateError::InvalidArn(ref cause) => cause, RevokeCertificateError::InvalidState(ref cause) => cause, RevokeCertificateError::LimitExceeded(ref cause) => cause, RevokeCertificateError::RequestAlreadyProcessed(ref cause) => cause, RevokeCertificateError::RequestFailed(ref cause) => cause, RevokeCertificateError::RequestInProgress(ref cause) => cause, RevokeCertificateError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by TagCertificateAuthority #[derive(Debug, PartialEq)] pub enum TagCertificateAuthorityError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>The tag associated with the CA is not valid. The invalid argument is contained in the message field.</p> InvalidTag(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), /// <p>You can associate up to 50 tags with a private CA. Exception information is contained in the exception message field.</p> TooManyTags(String), } impl TagCertificateAuthorityError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagCertificateAuthorityError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(TagCertificateAuthorityError::InvalidArn(err.msg)) } "InvalidStateException" => { return RusotoError::Service(TagCertificateAuthorityError::InvalidState( err.msg, )) } "InvalidTagException" => { return RusotoError::Service(TagCertificateAuthorityError::InvalidTag(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(TagCertificateAuthorityError::ResourceNotFound( err.msg, )) } "TooManyTagsException" => { return RusotoError::Service(TagCertificateAuthorityError::TooManyTags(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for TagCertificateAuthorityError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for TagCertificateAuthorityError { fn description(&self) -> &str { match *self { TagCertificateAuthorityError::InvalidArn(ref cause) => cause, TagCertificateAuthorityError::InvalidState(ref cause) => cause, TagCertificateAuthorityError::InvalidTag(ref cause) => cause, TagCertificateAuthorityError::ResourceNotFound(ref cause) => cause, TagCertificateAuthorityError::TooManyTags(ref cause) => cause, } } } /// Errors returned by UntagCertificateAuthority #[derive(Debug, PartialEq)] pub enum UntagCertificateAuthorityError { /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>The tag associated with the CA is not valid. The invalid argument is contained in the message field.</p> InvalidTag(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl UntagCertificateAuthorityError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagCertificateAuthorityError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArnException" => { return RusotoError::Service(UntagCertificateAuthorityError::InvalidArn( err.msg, )) } "InvalidStateException" => { return RusotoError::Service(UntagCertificateAuthorityError::InvalidState( err.msg, )) } "InvalidTagException" => { return RusotoError::Service(UntagCertificateAuthorityError::InvalidTag( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(UntagCertificateAuthorityError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UntagCertificateAuthorityError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UntagCertificateAuthorityError { fn description(&self) -> &str { match *self { UntagCertificateAuthorityError::InvalidArn(ref cause) => cause, UntagCertificateAuthorityError::InvalidState(ref cause) => cause, UntagCertificateAuthorityError::InvalidTag(ref cause) => cause, UntagCertificateAuthorityError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by UpdateCertificateAuthority #[derive(Debug, PartialEq)] pub enum UpdateCertificateAuthorityError { /// <p>A previous update to your private CA is still ongoing.</p> ConcurrentModification(String), /// <p>One or more of the specified arguments was not valid.</p> InvalidArgs(String), /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p> InvalidArn(String), /// <p>The S3 bucket policy is not valid. The policy must give ACM PCA rights to read from and write to the bucket and find the bucket location.</p> InvalidPolicy(String), /// <p>The private CA is in a state during which a report or certificate cannot be generated.</p> InvalidState(String), /// <p>A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.</p> ResourceNotFound(String), } impl UpdateCertificateAuthorityError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<UpdateCertificateAuthorityError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ConcurrentModificationException" => { return RusotoError::Service( UpdateCertificateAuthorityError::ConcurrentModification(err.msg), ) } "InvalidArgsException" => { return RusotoError::Service(UpdateCertificateAuthorityError::InvalidArgs( err.msg, )) } "InvalidArnException" => { return RusotoError::Service(UpdateCertificateAuthorityError::InvalidArn( err.msg, )) } "InvalidPolicyException" => { return RusotoError::Service(UpdateCertificateAuthorityError::InvalidPolicy( err.msg, )) } "InvalidStateException" => { return RusotoError::Service(UpdateCertificateAuthorityError::InvalidState( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(UpdateCertificateAuthorityError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UpdateCertificateAuthorityError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UpdateCertificateAuthorityError { fn description(&self) -> &str { match *self { UpdateCertificateAuthorityError::ConcurrentModification(ref cause) => cause, UpdateCertificateAuthorityError::InvalidArgs(ref cause) => cause, UpdateCertificateAuthorityError::InvalidArn(ref cause) => cause, UpdateCertificateAuthorityError::InvalidPolicy(ref cause) => cause, UpdateCertificateAuthorityError::InvalidState(ref cause) => cause, UpdateCertificateAuthorityError::ResourceNotFound(ref cause) => cause, } } } /// Trait representing the capabilities of the ACM-PCA API. ACM-PCA clients implement this trait. pub trait AcmPca { /// <p>Creates a private subordinate certificate authority (CA). You must specify the CA configuration, the revocation configuration, the CA type, and an optional idempotency token. The CA configuration specifies the name of the algorithm and key size to be used to create the CA private key, the type of signing algorithm that the CA uses to sign, and X.500 subject information. The CRL (certificate revocation list) configuration specifies the CRL expiration period in days (the validity period of the CRL), the Amazon S3 bucket that will contain the CRL, and a CNAME alias for the S3 bucket that is included in certificates issued by the CA. If successful, this operation returns the Amazon Resource Name (ARN) of the CA.</p> fn create_certificate_authority( &self, input: CreateCertificateAuthorityRequest, ) -> RusotoFuture<CreateCertificateAuthorityResponse, CreateCertificateAuthorityError>; /// <p>Creates an audit report that lists every time that your CA private key is used. The report is saved in the Amazon S3 bucket that you specify on input. The <a>IssueCertificate</a> and <a>RevokeCertificate</a> operations use the private key. You can generate a new report every 30 minutes.</p> fn create_certificate_authority_audit_report( &self, input: CreateCertificateAuthorityAuditReportRequest, ) -> RusotoFuture< CreateCertificateAuthorityAuditReportResponse, CreateCertificateAuthorityAuditReportError, >; /// <p>Assigns permissions from a private CA to a designated AWS service. Services are specified by their service principals and can be given permission to create and retrieve certificates on a private CA. Services can also be given permission to list the active permissions that the private CA has granted. For ACM to automatically renew your private CA's certificates, you must assign all possible permissions from the CA to the ACM service principal.</p> <p>At this time, you can only assign permissions to ACM (<code>acm.amazonaws.com</code>). Permissions can be revoked with the <a>DeletePermission</a> operation and listed with the <a>ListPermissions</a> operation.</p> fn create_permission( &self, input: CreatePermissionRequest, ) -> RusotoFuture<(), CreatePermissionError>; /// <p>Deletes a private certificate authority (CA). You must provide the ARN (Amazon Resource Name) of the private CA that you want to delete. You can find the ARN by calling the <a>ListCertificateAuthorities</a> operation. Before you can delete a CA, you must disable it. Call the <a>UpdateCertificateAuthority</a> operation and set the <b>CertificateAuthorityStatus</b> parameter to <code>DISABLED</code>. </p> <p>Additionally, you can delete a CA if you are waiting for it to be created (the <b>Status</b> field of the <a>CertificateAuthority</a> is <code>CREATING</code>). You can also delete it if the CA has been created but you haven't yet imported the signed certificate (the <b>Status</b> is <code>PENDING_CERTIFICATE</code>) into ACM PCA. </p> <p>If the CA is in one of the previously mentioned states and you call <a>DeleteCertificateAuthority</a>, the CA's status changes to <code>DELETED</code>. However, the CA won't be permanently deleted until the restoration period has passed. By default, if you do not set the <code>PermanentDeletionTimeInDays</code> parameter, the CA remains restorable for 30 days. You can set the parameter from 7 to 30 days. The <a>DescribeCertificateAuthority</a> operation returns the time remaining in the restoration window of a Private CA in the <code>DELETED</code> state. To restore an eligible CA, call the <a>RestoreCertificateAuthority</a> operation.</p> fn delete_certificate_authority( &self, input: DeleteCertificateAuthorityRequest, ) -> RusotoFuture<(), DeleteCertificateAuthorityError>; /// <p>Revokes permissions that a private CA assigned to a designated AWS service. Permissions can be created with the <a>CreatePermission</a> operation and listed with the <a>ListPermissions</a> operation. </p> fn delete_permission( &self, input: DeletePermissionRequest, ) -> RusotoFuture<(), DeletePermissionError>; /// <p><p>Lists information about your private certificate authority (CA). You specify the private CA on input by its ARN (Amazon Resource Name). The output contains the status of your CA. This can be any of the following: </p> <ul> <li> <p> <code>CREATING</code> - ACM PCA is creating your private certificate authority.</p> </li> <li> <p> <code>PENDING_CERTIFICATE</code> - The certificate is pending. You must use your on-premises root or subordinate CA to sign your private CA CSR and then import it into PCA. </p> </li> <li> <p> <code>ACTIVE</code> - Your private CA is active.</p> </li> <li> <p> <code>DISABLED</code> - Your private CA has been disabled.</p> </li> <li> <p> <code>EXPIRED</code> - Your private CA certificate has expired.</p> </li> <li> <p> <code>FAILED</code> - Your private CA has failed. Your CA can fail because of problems such a network outage or backend AWS failure or other errors. A failed CA can never return to the pending state. You must create a new CA. </p> </li> <li> <p> <code>DELETED</code> - Your private CA is within the restoration period, after which it is permanently deleted. The length of time remaining in the CA's restoration period is also included in this operation's output.</p> </li> </ul></p> fn describe_certificate_authority( &self, input: DescribeCertificateAuthorityRequest, ) -> RusotoFuture<DescribeCertificateAuthorityResponse, DescribeCertificateAuthorityError>; /// <p>Lists information about a specific audit report created by calling the <a>CreateCertificateAuthorityAuditReport</a> operation. Audit information is created every time the certificate authority (CA) private key is used. The private key is used when you call the <a>IssueCertificate</a> operation or the <a>RevokeCertificate</a> operation. </p> fn describe_certificate_authority_audit_report( &self, input: DescribeCertificateAuthorityAuditReportRequest, ) -> RusotoFuture< DescribeCertificateAuthorityAuditReportResponse, DescribeCertificateAuthorityAuditReportError, >; /// <p>Retrieves a certificate from your private CA. The ARN of the certificate is returned when you call the <a>IssueCertificate</a> operation. You must specify both the ARN of your private CA and the ARN of the issued certificate when calling the <b>GetCertificate</b> operation. You can retrieve the certificate if it is in the <b>ISSUED</b> state. You can call the <a>CreateCertificateAuthorityAuditReport</a> operation to create a report that contains information about all of the certificates issued and revoked by your private CA. </p> fn get_certificate( &self, input: GetCertificateRequest, ) -> RusotoFuture<GetCertificateResponse, GetCertificateError>; /// <p>Retrieves the certificate and certificate chain for your private certificate authority (CA). Both the certificate and the chain are base64 PEM-encoded. The chain does not include the CA certificate. Each certificate in the chain signs the one before it. </p> fn get_certificate_authority_certificate( &self, input: GetCertificateAuthorityCertificateRequest, ) -> RusotoFuture< GetCertificateAuthorityCertificateResponse, GetCertificateAuthorityCertificateError, >; /// <p>Retrieves the certificate signing request (CSR) for your private certificate authority (CA). The CSR is created when you call the <a>CreateCertificateAuthority</a> operation. Take the CSR to your on-premises X.509 infrastructure and sign it by using your root or a subordinate CA. Then import the signed certificate back into ACM PCA by calling the <a>ImportCertificateAuthorityCertificate</a> operation. The CSR is returned as a base64 PEM-encoded string. </p> fn get_certificate_authority_csr( &self, input: GetCertificateAuthorityCsrRequest, ) -> RusotoFuture<GetCertificateAuthorityCsrResponse, GetCertificateAuthorityCsrError>; /// <p><p>Imports your signed private CA certificate into ACM PCA. Before you can call this operation, you must create the private certificate authority by calling the <a>CreateCertificateAuthority</a> operation. You must then generate a certificate signing request (CSR) by calling the <a>GetCertificateAuthorityCsr</a> operation. Take the CSR to your on-premises CA and use the root certificate or a subordinate certificate to sign it. Create a certificate chain and copy the signed certificate and the certificate chain to your working directory. </p> <note> <p>Your certificate chain must not include the private CA certificate that you are importing.</p> </note> <note> <p>Your on-premises CA certificate must be the last certificate in your chain. The subordinate certificate, if any, that your root CA signed must be next to last. The subordinate certificate signed by the preceding subordinate CA must come next, and so on until your chain is built. </p> </note> <note> <p>The chain must be PEM-encoded.</p> </note></p> fn import_certificate_authority_certificate( &self, input: ImportCertificateAuthorityCertificateRequest, ) -> RusotoFuture<(), ImportCertificateAuthorityCertificateError>; /// <p><p>Uses your private certificate authority (CA) to issue a client certificate. This operation returns the Amazon Resource Name (ARN) of the certificate. You can retrieve the certificate by calling the <a>GetCertificate</a> operation and specifying the ARN. </p> <note> <p>You cannot use the ACM <b>ListCertificateAuthorities</b> operation to retrieve the ARNs of the certificates that you issue by using ACM PCA.</p> </note></p> fn issue_certificate( &self, input: IssueCertificateRequest, ) -> RusotoFuture<IssueCertificateResponse, IssueCertificateError>; /// <p>Lists the private certificate authorities that you created by using the <a>CreateCertificateAuthority</a> operation.</p> fn list_certificate_authorities( &self, input: ListCertificateAuthoritiesRequest, ) -> RusotoFuture<ListCertificateAuthoritiesResponse, ListCertificateAuthoritiesError>; /// <p>Lists all the permissions, if any, that have been assigned by a private CA. Permissions can be granted with the <a>CreatePermission</a> operation and revoked with the <a>DeletePermission</a> operation.</p> fn list_permissions( &self, input: ListPermissionsRequest, ) -> RusotoFuture<ListPermissionsResponse, ListPermissionsError>; /// <p>Lists the tags, if any, that are associated with your private CA. Tags are labels that you can use to identify and organize your CAs. Each tag consists of a key and an optional value. Call the <a>TagCertificateAuthority</a> operation to add one or more tags to your CA. Call the <a>UntagCertificateAuthority</a> operation to remove tags. </p> fn list_tags(&self, input: ListTagsRequest) -> RusotoFuture<ListTagsResponse, ListTagsError>; /// <p>Restores a certificate authority (CA) that is in the <code>DELETED</code> state. You can restore a CA during the period that you defined in the <b>PermanentDeletionTimeInDays</b> parameter of the <a>DeleteCertificateAuthority</a> operation. Currently, you can specify 7 to 30 days. If you did not specify a <b>PermanentDeletionTimeInDays</b> value, by default you can restore the CA at any time in a 30 day period. You can check the time remaining in the restoration period of a private CA in the <code>DELETED</code> state by calling the <a>DescribeCertificateAuthority</a> or <a>ListCertificateAuthorities</a> operations. The status of a restored CA is set to its pre-deletion status when the <b>RestoreCertificateAuthority</b> operation returns. To change its status to <code>ACTIVE</code>, call the <a>UpdateCertificateAuthority</a> operation. If the private CA was in the <code>PENDING_CERTIFICATE</code> state at deletion, you must use the <a>ImportCertificateAuthorityCertificate</a> operation to import a certificate authority into the private CA before it can be activated. You cannot restore a CA after the restoration period has ended.</p> fn restore_certificate_authority( &self, input: RestoreCertificateAuthorityRequest, ) -> RusotoFuture<(), RestoreCertificateAuthorityError>; /// <p>Revokes a certificate that you issued by calling the <a>IssueCertificate</a> operation. If you enable a certificate revocation list (CRL) when you create or update your private CA, information about the revoked certificates will be included in the CRL. ACM PCA writes the CRL to an S3 bucket that you specify. For more information about revocation, see the <a>CrlConfiguration</a> structure. ACM PCA also writes revocation information to the audit report. For more information, see <a>CreateCertificateAuthorityAuditReport</a>. </p> fn revoke_certificate( &self, input: RevokeCertificateRequest, ) -> RusotoFuture<(), RevokeCertificateError>; /// <p>Adds one or more tags to your private CA. Tags are labels that you can use to identify and organize your AWS resources. Each tag consists of a key and an optional value. You specify the private CA on input by its Amazon Resource Name (ARN). You specify the tag by using a key-value pair. You can apply a tag to just one private CA if you want to identify a specific characteristic of that CA, or you can apply the same tag to multiple private CAs if you want to filter for a common relationship among those CAs. To remove one or more tags, use the <a>UntagCertificateAuthority</a> operation. Call the <a>ListTags</a> operation to see what tags are associated with your CA. </p> fn tag_certificate_authority( &self, input: TagCertificateAuthorityRequest, ) -> RusotoFuture<(), TagCertificateAuthorityError>; /// <p>Remove one or more tags from your private CA. A tag consists of a key-value pair. If you do not specify the value portion of the tag when calling this operation, the tag will be removed regardless of value. If you specify a value, the tag is removed only if it is associated with the specified value. To add tags to a private CA, use the <a>TagCertificateAuthority</a>. Call the <a>ListTags</a> operation to see what tags are associated with your CA. </p> fn untag_certificate_authority( &self, input: UntagCertificateAuthorityRequest, ) -> RusotoFuture<(), UntagCertificateAuthorityError>; /// <p>Updates the status or configuration of a private certificate authority (CA). Your private CA must be in the <code>ACTIVE</code> or <code>DISABLED</code> state before you can update it. You can disable a private CA that is in the <code>ACTIVE</code> state or make a CA that is in the <code>DISABLED</code> state active again.</p> fn update_certificate_authority( &self, input: UpdateCertificateAuthorityRequest, ) -> RusotoFuture<(), UpdateCertificateAuthorityError>; } /// A client for the ACM-PCA API. #[derive(Clone)] pub struct AcmPcaClient { client: Client, region: region::Region, } impl AcmPcaClient { /// Creates a client backed by the default tokio event loop. /// /// The client will use the default credentials provider and tls client. pub fn new(region: region::Region) -> AcmPcaClient { AcmPcaClient { client: Client::shared(), region, } } pub fn new_with<P, D>( request_dispatcher: D, credentials_provider: P, region: region::Region, ) -> AcmPcaClient where P: ProvideAwsCredentials + Send + Sync + 'static, P::Future: Send, D: DispatchSignedRequest + Send + Sync + 'static, D::Future: Send, { AcmPcaClient { client: Client::new_with(credentials_provider, request_dispatcher), region, } } } impl AcmPca for AcmPcaClient { /// <p>Creates a private subordinate certificate authority (CA). You must specify the CA configuration, the revocation configuration, the CA type, and an optional idempotency token. The CA configuration specifies the name of the algorithm and key size to be used to create the CA private key, the type of signing algorithm that the CA uses to sign, and X.500 subject information. The CRL (certificate revocation list) configuration specifies the CRL expiration period in days (the validity period of the CRL), the Amazon S3 bucket that will contain the CRL, and a CNAME alias for the S3 bucket that is included in certificates issued by the CA. If successful, this operation returns the Amazon Resource Name (ARN) of the CA.</p> fn create_certificate_authority( &self, input: CreateCertificateAuthorityRequest, ) -> RusotoFuture<CreateCertificateAuthorityResponse, CreateCertificateAuthorityError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.CreateCertificateAuthority"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<CreateCertificateAuthorityResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(CreateCertificateAuthorityError::from_response(response)) })) } }) } /// <p>Creates an audit report that lists every time that your CA private key is used. The report is saved in the Amazon S3 bucket that you specify on input. The <a>IssueCertificate</a> and <a>RevokeCertificate</a> operations use the private key. You can generate a new report every 30 minutes.</p> fn create_certificate_authority_audit_report( &self, input: CreateCertificateAuthorityAuditReportRequest, ) -> RusotoFuture< CreateCertificateAuthorityAuditReportResponse, CreateCertificateAuthorityAuditReportError, > { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "ACMPrivateCA.CreateCertificateAuthorityAuditReport", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<CreateCertificateAuthorityAuditReportResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(CreateCertificateAuthorityAuditReportError::from_response( response, )) })) } }) } /// <p>Assigns permissions from a private CA to a designated AWS service. Services are specified by their service principals and can be given permission to create and retrieve certificates on a private CA. Services can also be given permission to list the active permissions that the private CA has granted. For ACM to automatically renew your private CA's certificates, you must assign all possible permissions from the CA to the ACM service principal.</p> <p>At this time, you can only assign permissions to ACM (<code>acm.amazonaws.com</code>). Permissions can be revoked with the <a>DeletePermission</a> operation and listed with the <a>ListPermissions</a> operation.</p> fn create_permission( &self, input: CreatePermissionRequest, ) -> RusotoFuture<(), CreatePermissionError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.CreatePermission"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(CreatePermissionError::from_response(response))), ) } }) } /// <p>Deletes a private certificate authority (CA). You must provide the ARN (Amazon Resource Name) of the private CA that you want to delete. You can find the ARN by calling the <a>ListCertificateAuthorities</a> operation. Before you can delete a CA, you must disable it. Call the <a>UpdateCertificateAuthority</a> operation and set the <b>CertificateAuthorityStatus</b> parameter to <code>DISABLED</code>. </p> <p>Additionally, you can delete a CA if you are waiting for it to be created (the <b>Status</b> field of the <a>CertificateAuthority</a> is <code>CREATING</code>). You can also delete it if the CA has been created but you haven't yet imported the signed certificate (the <b>Status</b> is <code>PENDING_CERTIFICATE</code>) into ACM PCA. </p> <p>If the CA is in one of the previously mentioned states and you call <a>DeleteCertificateAuthority</a>, the CA's status changes to <code>DELETED</code>. However, the CA won't be permanently deleted until the restoration period has passed. By default, if you do not set the <code>PermanentDeletionTimeInDays</code> parameter, the CA remains restorable for 30 days. You can set the parameter from 7 to 30 days. The <a>DescribeCertificateAuthority</a> operation returns the time remaining in the restoration window of a Private CA in the <code>DELETED</code> state. To restore an eligible CA, call the <a>RestoreCertificateAuthority</a> operation.</p> fn delete_certificate_authority( &self, input: DeleteCertificateAuthorityRequest, ) -> RusotoFuture<(), DeleteCertificateAuthorityError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.DeleteCertificateAuthority"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DeleteCertificateAuthorityError::from_response(response)) })) } }) } /// <p>Revokes permissions that a private CA assigned to a designated AWS service. Permissions can be created with the <a>CreatePermission</a> operation and listed with the <a>ListPermissions</a> operation. </p> fn delete_permission( &self, input: DeletePermissionRequest, ) -> RusotoFuture<(), DeletePermissionError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.DeletePermission"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DeletePermissionError::from_response(response))), ) } }) } /// <p><p>Lists information about your private certificate authority (CA). You specify the private CA on input by its ARN (Amazon Resource Name). The output contains the status of your CA. This can be any of the following: </p> <ul> <li> <p> <code>CREATING</code> - ACM PCA is creating your private certificate authority.</p> </li> <li> <p> <code>PENDING_CERTIFICATE</code> - The certificate is pending. You must use your on-premises root or subordinate CA to sign your private CA CSR and then import it into PCA. </p> </li> <li> <p> <code>ACTIVE</code> - Your private CA is active.</p> </li> <li> <p> <code>DISABLED</code> - Your private CA has been disabled.</p> </li> <li> <p> <code>EXPIRED</code> - Your private CA certificate has expired.</p> </li> <li> <p> <code>FAILED</code> - Your private CA has failed. Your CA can fail because of problems such a network outage or backend AWS failure or other errors. A failed CA can never return to the pending state. You must create a new CA. </p> </li> <li> <p> <code>DELETED</code> - Your private CA is within the restoration period, after which it is permanently deleted. The length of time remaining in the CA's restoration period is also included in this operation's output.</p> </li> </ul></p> fn describe_certificate_authority( &self, input: DescribeCertificateAuthorityRequest, ) -> RusotoFuture<DescribeCertificateAuthorityResponse, DescribeCertificateAuthorityError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.DescribeCertificateAuthority"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<DescribeCertificateAuthorityResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DescribeCertificateAuthorityError::from_response(response)) })) } }) } /// <p>Lists information about a specific audit report created by calling the <a>CreateCertificateAuthorityAuditReport</a> operation. Audit information is created every time the certificate authority (CA) private key is used. The private key is used when you call the <a>IssueCertificate</a> operation or the <a>RevokeCertificate</a> operation. </p> fn describe_certificate_authority_audit_report( &self, input: DescribeCertificateAuthorityAuditReportRequest, ) -> RusotoFuture< DescribeCertificateAuthorityAuditReportResponse, DescribeCertificateAuthorityAuditReportError, > { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "ACMPrivateCA.DescribeCertificateAuthorityAuditReport", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<DescribeCertificateAuthorityAuditReportResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DescribeCertificateAuthorityAuditReportError::from_response( response, )) })) } }) } /// <p>Retrieves a certificate from your private CA. The ARN of the certificate is returned when you call the <a>IssueCertificate</a> operation. You must specify both the ARN of your private CA and the ARN of the issued certificate when calling the <b>GetCertificate</b> operation. You can retrieve the certificate if it is in the <b>ISSUED</b> state. You can call the <a>CreateCertificateAuthorityAuditReport</a> operation to create a report that contains information about all of the certificates issued and revoked by your private CA. </p> fn get_certificate( &self, input: GetCertificateRequest, ) -> RusotoFuture<GetCertificateResponse, GetCertificateError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.GetCertificate"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<GetCertificateResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(GetCertificateError::from_response(response))), ) } }) } /// <p>Retrieves the certificate and certificate chain for your private certificate authority (CA). Both the certificate and the chain are base64 PEM-encoded. The chain does not include the CA certificate. Each certificate in the chain signs the one before it. </p> fn get_certificate_authority_certificate( &self, input: GetCertificateAuthorityCertificateRequest, ) -> RusotoFuture< GetCertificateAuthorityCertificateResponse, GetCertificateAuthorityCertificateError, > { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "ACMPrivateCA.GetCertificateAuthorityCertificate", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<GetCertificateAuthorityCertificateResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(GetCertificateAuthorityCertificateError::from_response( response, )) })) } }) } /// <p>Retrieves the certificate signing request (CSR) for your private certificate authority (CA). The CSR is created when you call the <a>CreateCertificateAuthority</a> operation. Take the CSR to your on-premises X.509 infrastructure and sign it by using your root or a subordinate CA. Then import the signed certificate back into ACM PCA by calling the <a>ImportCertificateAuthorityCertificate</a> operation. The CSR is returned as a base64 PEM-encoded string. </p> fn get_certificate_authority_csr( &self, input: GetCertificateAuthorityCsrRequest, ) -> RusotoFuture<GetCertificateAuthorityCsrResponse, GetCertificateAuthorityCsrError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.GetCertificateAuthorityCsr"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<GetCertificateAuthorityCsrResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(GetCertificateAuthorityCsrError::from_response(response)) })) } }) } /// <p><p>Imports your signed private CA certificate into ACM PCA. Before you can call this operation, you must create the private certificate authority by calling the <a>CreateCertificateAuthority</a> operation. You must then generate a certificate signing request (CSR) by calling the <a>GetCertificateAuthorityCsr</a> operation. Take the CSR to your on-premises CA and use the root certificate or a subordinate certificate to sign it. Create a certificate chain and copy the signed certificate and the certificate chain to your working directory. </p> <note> <p>Your certificate chain must not include the private CA certificate that you are importing.</p> </note> <note> <p>Your on-premises CA certificate must be the last certificate in your chain. The subordinate certificate, if any, that your root CA signed must be next to last. The subordinate certificate signed by the preceding subordinate CA must come next, and so on until your chain is built. </p> </note> <note> <p>The chain must be PEM-encoded.</p> </note></p> fn import_certificate_authority_certificate( &self, input: ImportCertificateAuthorityCertificateRequest, ) -> RusotoFuture<(), ImportCertificateAuthorityCertificateError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "ACMPrivateCA.ImportCertificateAuthorityCertificate", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(ImportCertificateAuthorityCertificateError::from_response( response, )) })) } }) } /// <p><p>Uses your private certificate authority (CA) to issue a client certificate. This operation returns the Amazon Resource Name (ARN) of the certificate. You can retrieve the certificate by calling the <a>GetCertificate</a> operation and specifying the ARN. </p> <note> <p>You cannot use the ACM <b>ListCertificateAuthorities</b> operation to retrieve the ARNs of the certificates that you issue by using ACM PCA.</p> </note></p> fn issue_certificate( &self, input: IssueCertificateRequest, ) -> RusotoFuture<IssueCertificateResponse, IssueCertificateError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.IssueCertificate"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<IssueCertificateResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(IssueCertificateError::from_response(response))), ) } }) } /// <p>Lists the private certificate authorities that you created by using the <a>CreateCertificateAuthority</a> operation.</p> fn list_certificate_authorities( &self, input: ListCertificateAuthoritiesRequest, ) -> RusotoFuture<ListCertificateAuthoritiesResponse, ListCertificateAuthoritiesError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.ListCertificateAuthorities"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<ListCertificateAuthoritiesResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(ListCertificateAuthoritiesError::from_response(response)) })) } }) } /// <p>Lists all the permissions, if any, that have been assigned by a private CA. Permissions can be granted with the <a>CreatePermission</a> operation and revoked with the <a>DeletePermission</a> operation.</p> fn list_permissions( &self, input: ListPermissionsRequest, ) -> RusotoFuture<ListPermissionsResponse, ListPermissionsError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.ListPermissions"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<ListPermissionsResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListPermissionsError::from_response(response))), ) } }) } /// <p>Lists the tags, if any, that are associated with your private CA. Tags are labels that you can use to identify and organize your CAs. Each tag consists of a key and an optional value. Call the <a>TagCertificateAuthority</a> operation to add one or more tags to your CA. Call the <a>UntagCertificateAuthority</a> operation to remove tags. </p> fn list_tags(&self, input: ListTagsRequest) -> RusotoFuture<ListTagsResponse, ListTagsError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.ListTags"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<ListTagsResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListTagsError::from_response(response))), ) } }) } /// <p>Restores a certificate authority (CA) that is in the <code>DELETED</code> state. You can restore a CA during the period that you defined in the <b>PermanentDeletionTimeInDays</b> parameter of the <a>DeleteCertificateAuthority</a> operation. Currently, you can specify 7 to 30 days. If you did not specify a <b>PermanentDeletionTimeInDays</b> value, by default you can restore the CA at any time in a 30 day period. You can check the time remaining in the restoration period of a private CA in the <code>DELETED</code> state by calling the <a>DescribeCertificateAuthority</a> or <a>ListCertificateAuthorities</a> operations. The status of a restored CA is set to its pre-deletion status when the <b>RestoreCertificateAuthority</b> operation returns. To change its status to <code>ACTIVE</code>, call the <a>UpdateCertificateAuthority</a> operation. If the private CA was in the <code>PENDING_CERTIFICATE</code> state at deletion, you must use the <a>ImportCertificateAuthorityCertificate</a> operation to import a certificate authority into the private CA before it can be activated. You cannot restore a CA after the restoration period has ended.</p> fn restore_certificate_authority( &self, input: RestoreCertificateAuthorityRequest, ) -> RusotoFuture<(), RestoreCertificateAuthorityError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.RestoreCertificateAuthority"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(RestoreCertificateAuthorityError::from_response(response)) })) } }) } /// <p>Revokes a certificate that you issued by calling the <a>IssueCertificate</a> operation. If you enable a certificate revocation list (CRL) when you create or update your private CA, information about the revoked certificates will be included in the CRL. ACM PCA writes the CRL to an S3 bucket that you specify. For more information about revocation, see the <a>CrlConfiguration</a> structure. ACM PCA also writes revocation information to the audit report. For more information, see <a>CreateCertificateAuthorityAuditReport</a>. </p> fn revoke_certificate( &self, input: RevokeCertificateRequest, ) -> RusotoFuture<(), RevokeCertificateError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.RevokeCertificate"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(RevokeCertificateError::from_response(response))), ) } }) } /// <p>Adds one or more tags to your private CA. Tags are labels that you can use to identify and organize your AWS resources. Each tag consists of a key and an optional value. You specify the private CA on input by its Amazon Resource Name (ARN). You specify the tag by using a key-value pair. You can apply a tag to just one private CA if you want to identify a specific characteristic of that CA, or you can apply the same tag to multiple private CAs if you want to filter for a common relationship among those CAs. To remove one or more tags, use the <a>UntagCertificateAuthority</a> operation. Call the <a>ListTags</a> operation to see what tags are associated with your CA. </p> fn tag_certificate_authority( &self, input: TagCertificateAuthorityRequest, ) -> RusotoFuture<(), TagCertificateAuthorityError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.TagCertificateAuthority"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(TagCertificateAuthorityError::from_response(response)) })) } }) } /// <p>Remove one or more tags from your private CA. A tag consists of a key-value pair. If you do not specify the value portion of the tag when calling this operation, the tag will be removed regardless of value. If you specify a value, the tag is removed only if it is associated with the specified value. To add tags to a private CA, use the <a>TagCertificateAuthority</a>. Call the <a>ListTags</a> operation to see what tags are associated with your CA. </p> fn untag_certificate_authority( &self, input: UntagCertificateAuthorityRequest, ) -> RusotoFuture<(), UntagCertificateAuthorityError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.UntagCertificateAuthority"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(UntagCertificateAuthorityError::from_response(response)) })) } }) } /// <p>Updates the status or configuration of a private certificate authority (CA). Your private CA must be in the <code>ACTIVE</code> or <code>DISABLED</code> state before you can update it. You can disable a private CA that is in the <code>ACTIVE</code> state or make a CA that is in the <code>DISABLED</code> state active again.</p> fn update_certificate_authority( &self, input: UpdateCertificateAuthorityRequest, ) -> RusotoFuture<(), UpdateCertificateAuthorityError> { let mut request = SignedRequest::new("POST", "acm-pca", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ACMPrivateCA.UpdateCertificateAuthority"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(UpdateCertificateAuthorityError::from_response(response)) })) } }) } }