1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639
|
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package kms provides a client for AWS Key Management Service.
package kms
import (
"time"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opCancelKeyDeletion = "CancelKeyDeletion"
// CancelKeyDeletionRequest generates a request for the CancelKeyDeletion operation.
func (c *KMS) CancelKeyDeletionRequest(input *CancelKeyDeletionInput) (req *request.Request, output *CancelKeyDeletionOutput) {
op := &request.Operation{
Name: opCancelKeyDeletion,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CancelKeyDeletionInput{}
}
req = c.newRequest(op, input, output)
output = &CancelKeyDeletionOutput{}
req.Data = output
return
}
// Cancels the deletion of a customer master key (CMK). When this operation
// is successful, the CMK is set to the Disabled state. To enable a CMK, use
// EnableKey.
//
// For more information about scheduling and canceling deletion of a CMK, go
// to Deleting Customer Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html)
// in the AWS Key Management Service Developer Guide.
func (c *KMS) CancelKeyDeletion(input *CancelKeyDeletionInput) (*CancelKeyDeletionOutput, error) {
req, out := c.CancelKeyDeletionRequest(input)
err := req.Send()
return out, err
}
const opCreateAlias = "CreateAlias"
// CreateAliasRequest generates a request for the CreateAlias operation.
func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *CreateAliasOutput) {
op := &request.Operation{
Name: opCreateAlias,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateAliasInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &CreateAliasOutput{}
req.Data = output
return
}
// Creates a display name for a customer master key. An alias can be used to
// identify a key and should be unique. The console enforces a one-to-one mapping
// between the alias and a key. An alias name can contain only alphanumeric
// characters, forward slashes (/), underscores (_), and dashes (-). An alias
// must start with the word "alias" followed by a forward slash (alias/). An
// alias that begins with "aws" after the forward slash (alias/aws...) is reserved
// by Amazon Web Services (AWS).
//
// The alias and the key it is mapped to must be in the same AWS account and
// the same region.
//
// To map an alias to a different key, call UpdateAlias.
func (c *KMS) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) {
req, out := c.CreateAliasRequest(input)
err := req.Send()
return out, err
}
const opCreateGrant = "CreateGrant"
// CreateGrantRequest generates a request for the CreateGrant operation.
func (c *KMS) CreateGrantRequest(input *CreateGrantInput) (req *request.Request, output *CreateGrantOutput) {
op := &request.Operation{
Name: opCreateGrant,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateGrantInput{}
}
req = c.newRequest(op, input, output)
output = &CreateGrantOutput{}
req.Data = output
return
}
// Adds a grant to a key to specify who can use the key and under what conditions.
// Grants are alternate permission mechanisms to key policies.
//
// For more information about grants, see Grants (http://docs.aws.amazon.com/kms/latest/developerguide/grants.html)
// in the AWS Key Management Service Developer Guide.
func (c *KMS) CreateGrant(input *CreateGrantInput) (*CreateGrantOutput, error) {
req, out := c.CreateGrantRequest(input)
err := req.Send()
return out, err
}
const opCreateKey = "CreateKey"
// CreateKeyRequest generates a request for the CreateKey operation.
func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, output *CreateKeyOutput) {
op := &request.Operation{
Name: opCreateKey,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateKeyInput{}
}
req = c.newRequest(op, input, output)
output = &CreateKeyOutput{}
req.Data = output
return
}
// Creates a customer master key. Customer master keys can be used to encrypt
// small amounts of data (less than 4K) directly, but they are most commonly
// used to encrypt or envelope data keys that are then used to encrypt customer
// data. For more information about data keys, see GenerateDataKey and GenerateDataKeyWithoutPlaintext.
func (c *KMS) CreateKey(input *CreateKeyInput) (*CreateKeyOutput, error) {
req, out := c.CreateKeyRequest(input)
err := req.Send()
return out, err
}
const opDecrypt = "Decrypt"
// DecryptRequest generates a request for the Decrypt operation.
func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output *DecryptOutput) {
op := &request.Operation{
Name: opDecrypt,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DecryptInput{}
}
req = c.newRequest(op, input, output)
output = &DecryptOutput{}
req.Data = output
return
}
// Decrypts ciphertext. Ciphertext is plaintext that has been previously encrypted
// by using any of the following functions: GenerateDataKey GenerateDataKeyWithoutPlaintext
// Encrypt
//
// Note that if a caller has been granted access permissions to all keys (through,
// for example, IAM user policies that grant Decrypt permission on all resources),
// then ciphertext encrypted by using keys in other accounts where the key grants
// access to the caller can be decrypted. To remedy this, we recommend that
// you do not grant Decrypt access in an IAM user policy. Instead grant Decrypt
// access only in key policies. If you must grant Decrypt access in an IAM user
// policy, you should scope the resource to specific keys or to specific trusted
// accounts.
func (c *KMS) Decrypt(input *DecryptInput) (*DecryptOutput, error) {
req, out := c.DecryptRequest(input)
err := req.Send()
return out, err
}
const opDeleteAlias = "DeleteAlias"
// DeleteAliasRequest generates a request for the DeleteAlias operation.
func (c *KMS) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) {
op := &request.Operation{
Name: opDeleteAlias,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteAliasInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteAliasOutput{}
req.Data = output
return
}
// Deletes the specified alias. To map an alias to a different key, call UpdateAlias.
func (c *KMS) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) {
req, out := c.DeleteAliasRequest(input)
err := req.Send()
return out, err
}
const opDescribeKey = "DescribeKey"
// DescribeKeyRequest generates a request for the DescribeKey operation.
func (c *KMS) DescribeKeyRequest(input *DescribeKeyInput) (req *request.Request, output *DescribeKeyOutput) {
op := &request.Operation{
Name: opDescribeKey,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeKeyInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeKeyOutput{}
req.Data = output
return
}
// Provides detailed information about the specified customer master key.
func (c *KMS) DescribeKey(input *DescribeKeyInput) (*DescribeKeyOutput, error) {
req, out := c.DescribeKeyRequest(input)
err := req.Send()
return out, err
}
const opDisableKey = "DisableKey"
// DisableKeyRequest generates a request for the DisableKey operation.
func (c *KMS) DisableKeyRequest(input *DisableKeyInput) (req *request.Request, output *DisableKeyOutput) {
op := &request.Operation{
Name: opDisableKey,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisableKeyInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DisableKeyOutput{}
req.Data = output
return
}
// Sets the state of a master key to disabled, thereby preventing its use for
// cryptographic operations. For more information about how key state affects
// the use of a master key, go to How Key State Affects the Use of a Customer
// Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
// in the AWS Key Management Service Developer Guide.
func (c *KMS) DisableKey(input *DisableKeyInput) (*DisableKeyOutput, error) {
req, out := c.DisableKeyRequest(input)
err := req.Send()
return out, err
}
const opDisableKeyRotation = "DisableKeyRotation"
// DisableKeyRotationRequest generates a request for the DisableKeyRotation operation.
func (c *KMS) DisableKeyRotationRequest(input *DisableKeyRotationInput) (req *request.Request, output *DisableKeyRotationOutput) {
op := &request.Operation{
Name: opDisableKeyRotation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisableKeyRotationInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DisableKeyRotationOutput{}
req.Data = output
return
}
// Disables rotation of the specified key.
func (c *KMS) DisableKeyRotation(input *DisableKeyRotationInput) (*DisableKeyRotationOutput, error) {
req, out := c.DisableKeyRotationRequest(input)
err := req.Send()
return out, err
}
const opEnableKey = "EnableKey"
// EnableKeyRequest generates a request for the EnableKey operation.
func (c *KMS) EnableKeyRequest(input *EnableKeyInput) (req *request.Request, output *EnableKeyOutput) {
op := &request.Operation{
Name: opEnableKey,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &EnableKeyInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &EnableKeyOutput{}
req.Data = output
return
}
// Marks a key as enabled, thereby permitting its use.
func (c *KMS) EnableKey(input *EnableKeyInput) (*EnableKeyOutput, error) {
req, out := c.EnableKeyRequest(input)
err := req.Send()
return out, err
}
const opEnableKeyRotation = "EnableKeyRotation"
// EnableKeyRotationRequest generates a request for the EnableKeyRotation operation.
func (c *KMS) EnableKeyRotationRequest(input *EnableKeyRotationInput) (req *request.Request, output *EnableKeyRotationOutput) {
op := &request.Operation{
Name: opEnableKeyRotation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &EnableKeyRotationInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &EnableKeyRotationOutput{}
req.Data = output
return
}
// Enables rotation of the specified customer master key.
func (c *KMS) EnableKeyRotation(input *EnableKeyRotationInput) (*EnableKeyRotationOutput, error) {
req, out := c.EnableKeyRotationRequest(input)
err := req.Send()
return out, err
}
const opEncrypt = "Encrypt"
// EncryptRequest generates a request for the Encrypt operation.
func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output *EncryptOutput) {
op := &request.Operation{
Name: opEncrypt,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &EncryptInput{}
}
req = c.newRequest(op, input, output)
output = &EncryptOutput{}
req.Data = output
return
}
// Encrypts plaintext into ciphertext by using a customer master key. The Encrypt
// function has two primary use cases: You can encrypt up to 4 KB of arbitrary
// data such as an RSA key, a database password, or other sensitive customer
// information. If you are moving encrypted data from one region to another,
// you can use this API to encrypt in the new region the plaintext data key
// that was used to encrypt the data in the original region. This provides you
// with an encrypted copy of the data key that can be decrypted in the new region
// and used there to decrypt the encrypted data.
//
// Unless you are moving encrypted data from one region to another, you don't
// use this function to encrypt a generated data key within a region. You retrieve
// data keys already encrypted by calling the GenerateDataKey or GenerateDataKeyWithoutPlaintext
// function. Data keys don't need to be encrypted again by calling Encrypt.
//
// If you want to encrypt data locally in your application, you can use the
// GenerateDataKey function to return a plaintext data encryption key and a
// copy of the key encrypted under the customer master key (CMK) of your choosing.
func (c *KMS) Encrypt(input *EncryptInput) (*EncryptOutput, error) {
req, out := c.EncryptRequest(input)
err := req.Send()
return out, err
}
const opGenerateDataKey = "GenerateDataKey"
// GenerateDataKeyRequest generates a request for the GenerateDataKey operation.
func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request.Request, output *GenerateDataKeyOutput) {
op := &request.Operation{
Name: opGenerateDataKey,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GenerateDataKeyInput{}
}
req = c.newRequest(op, input, output)
output = &GenerateDataKeyOutput{}
req.Data = output
return
}
// Generates a data key that you can use in your application to locally encrypt
// data. This call returns a plaintext version of the key in the Plaintext field
// of the response object and an encrypted copy of the key in the CiphertextBlob
// field. The key is encrypted by using the master key specified by the KeyId
// field. To decrypt the encrypted key, pass it to the Decrypt API.
//
// We recommend that you use the following pattern to locally encrypt data:
// call the GenerateDataKey API, use the key returned in the Plaintext response
// field to locally encrypt data, and then erase the plaintext data key from
// memory. Store the encrypted data key (contained in the CiphertextBlob field)
// alongside of the locally encrypted data.
//
// You should not call the Encrypt function to re-encrypt your data keys within
// a region. GenerateDataKey always returns the data key encrypted and tied
// to the customer master key that will be used to decrypt it. There is no need
// to decrypt it twice. If you decide to use the optional EncryptionContext
// parameter, you must also store the context in full or at least store enough
// information along with the encrypted data to be able to reconstruct the context
// when submitting the ciphertext to the Decrypt API. It is a good practice
// to choose a context that you can reconstruct on the fly to better secure
// the ciphertext. For more information about how this parameter is used, see
// Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html).
//
// To decrypt data, pass the encrypted data key to the Decrypt API. Decrypt
// uses the associated master key to decrypt the encrypted data key and returns
// it as plaintext. Use the plaintext data key to locally decrypt your data
// and then erase the key from memory. You must specify the encryption context,
// if any, that you specified when you generated the key. The encryption context
// is logged by CloudTrail, and you can use this log to help track the use of
// particular data.
func (c *KMS) GenerateDataKey(input *GenerateDataKeyInput) (*GenerateDataKeyOutput, error) {
req, out := c.GenerateDataKeyRequest(input)
err := req.Send()
return out, err
}
const opGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext"
// GenerateDataKeyWithoutPlaintextRequest generates a request for the GenerateDataKeyWithoutPlaintext operation.
func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWithoutPlaintextInput) (req *request.Request, output *GenerateDataKeyWithoutPlaintextOutput) {
op := &request.Operation{
Name: opGenerateDataKeyWithoutPlaintext,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GenerateDataKeyWithoutPlaintextInput{}
}
req = c.newRequest(op, input, output)
output = &GenerateDataKeyWithoutPlaintextOutput{}
req.Data = output
return
}
// Returns a data key encrypted by a customer master key without the plaintext
// copy of that key. Otherwise, this API functions exactly like GenerateDataKey.
// You can use this API to, for example, satisfy an audit requirement that an
// encrypted key be made available without exposing the plaintext copy of that
// key.
func (c *KMS) GenerateDataKeyWithoutPlaintext(input *GenerateDataKeyWithoutPlaintextInput) (*GenerateDataKeyWithoutPlaintextOutput, error) {
req, out := c.GenerateDataKeyWithoutPlaintextRequest(input)
err := req.Send()
return out, err
}
const opGenerateRandom = "GenerateRandom"
// GenerateRandomRequest generates a request for the GenerateRandom operation.
func (c *KMS) GenerateRandomRequest(input *GenerateRandomInput) (req *request.Request, output *GenerateRandomOutput) {
op := &request.Operation{
Name: opGenerateRandom,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GenerateRandomInput{}
}
req = c.newRequest(op, input, output)
output = &GenerateRandomOutput{}
req.Data = output
return
}
// Generates an unpredictable byte string.
func (c *KMS) GenerateRandom(input *GenerateRandomInput) (*GenerateRandomOutput, error) {
req, out := c.GenerateRandomRequest(input)
err := req.Send()
return out, err
}
const opGetKeyPolicy = "GetKeyPolicy"
// GetKeyPolicyRequest generates a request for the GetKeyPolicy operation.
func (c *KMS) GetKeyPolicyRequest(input *GetKeyPolicyInput) (req *request.Request, output *GetKeyPolicyOutput) {
op := &request.Operation{
Name: opGetKeyPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetKeyPolicyInput{}
}
req = c.newRequest(op, input, output)
output = &GetKeyPolicyOutput{}
req.Data = output
return
}
// Retrieves a policy attached to the specified key.
func (c *KMS) GetKeyPolicy(input *GetKeyPolicyInput) (*GetKeyPolicyOutput, error) {
req, out := c.GetKeyPolicyRequest(input)
err := req.Send()
return out, err
}
const opGetKeyRotationStatus = "GetKeyRotationStatus"
// GetKeyRotationStatusRequest generates a request for the GetKeyRotationStatus operation.
func (c *KMS) GetKeyRotationStatusRequest(input *GetKeyRotationStatusInput) (req *request.Request, output *GetKeyRotationStatusOutput) {
op := &request.Operation{
Name: opGetKeyRotationStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetKeyRotationStatusInput{}
}
req = c.newRequest(op, input, output)
output = &GetKeyRotationStatusOutput{}
req.Data = output
return
}
// Retrieves a Boolean value that indicates whether key rotation is enabled
// for the specified key.
func (c *KMS) GetKeyRotationStatus(input *GetKeyRotationStatusInput) (*GetKeyRotationStatusOutput, error) {
req, out := c.GetKeyRotationStatusRequest(input)
err := req.Send()
return out, err
}
const opListAliases = "ListAliases"
// ListAliasesRequest generates a request for the ListAliases operation.
func (c *KMS) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) {
op := &request.Operation{
Name: opListAliases,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"NextMarker"},
LimitToken: "Limit",
TruncationToken: "Truncated",
},
}
if input == nil {
input = &ListAliasesInput{}
}
req = c.newRequest(op, input, output)
output = &ListAliasesOutput{}
req.Data = output
return
}
// Lists all of the key aliases in the account.
func (c *KMS) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) {
req, out := c.ListAliasesRequest(input)
err := req.Send()
return out, err
}
func (c *KMS) ListAliasesPages(input *ListAliasesInput, fn func(p *ListAliasesOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.ListAliasesRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*ListAliasesOutput), lastPage)
})
}
const opListGrants = "ListGrants"
// ListGrantsRequest generates a request for the ListGrants operation.
func (c *KMS) ListGrantsRequest(input *ListGrantsInput) (req *request.Request, output *ListGrantsResponse) {
op := &request.Operation{
Name: opListGrants,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"NextMarker"},
LimitToken: "Limit",
TruncationToken: "Truncated",
},
}
if input == nil {
input = &ListGrantsInput{}
}
req = c.newRequest(op, input, output)
output = &ListGrantsResponse{}
req.Data = output
return
}
// List the grants for a specified key.
func (c *KMS) ListGrants(input *ListGrantsInput) (*ListGrantsResponse, error) {
req, out := c.ListGrantsRequest(input)
err := req.Send()
return out, err
}
func (c *KMS) ListGrantsPages(input *ListGrantsInput, fn func(p *ListGrantsResponse, lastPage bool) (shouldContinue bool)) error {
page, _ := c.ListGrantsRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*ListGrantsResponse), lastPage)
})
}
const opListKeyPolicies = "ListKeyPolicies"
// ListKeyPoliciesRequest generates a request for the ListKeyPolicies operation.
func (c *KMS) ListKeyPoliciesRequest(input *ListKeyPoliciesInput) (req *request.Request, output *ListKeyPoliciesOutput) {
op := &request.Operation{
Name: opListKeyPolicies,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"NextMarker"},
LimitToken: "Limit",
TruncationToken: "Truncated",
},
}
if input == nil {
input = &ListKeyPoliciesInput{}
}
req = c.newRequest(op, input, output)
output = &ListKeyPoliciesOutput{}
req.Data = output
return
}
// Retrieves a list of policies attached to a key.
func (c *KMS) ListKeyPolicies(input *ListKeyPoliciesInput) (*ListKeyPoliciesOutput, error) {
req, out := c.ListKeyPoliciesRequest(input)
err := req.Send()
return out, err
}
func (c *KMS) ListKeyPoliciesPages(input *ListKeyPoliciesInput, fn func(p *ListKeyPoliciesOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.ListKeyPoliciesRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*ListKeyPoliciesOutput), lastPage)
})
}
const opListKeys = "ListKeys"
// ListKeysRequest generates a request for the ListKeys operation.
func (c *KMS) ListKeysRequest(input *ListKeysInput) (req *request.Request, output *ListKeysOutput) {
op := &request.Operation{
Name: opListKeys,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"NextMarker"},
LimitToken: "Limit",
TruncationToken: "Truncated",
},
}
if input == nil {
input = &ListKeysInput{}
}
req = c.newRequest(op, input, output)
output = &ListKeysOutput{}
req.Data = output
return
}
// Lists the customer master keys.
func (c *KMS) ListKeys(input *ListKeysInput) (*ListKeysOutput, error) {
req, out := c.ListKeysRequest(input)
err := req.Send()
return out, err
}
func (c *KMS) ListKeysPages(input *ListKeysInput, fn func(p *ListKeysOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.ListKeysRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*ListKeysOutput), lastPage)
})
}
const opListRetirableGrants = "ListRetirableGrants"
// ListRetirableGrantsRequest generates a request for the ListRetirableGrants operation.
func (c *KMS) ListRetirableGrantsRequest(input *ListRetirableGrantsInput) (req *request.Request, output *ListGrantsResponse) {
op := &request.Operation{
Name: opListRetirableGrants,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListRetirableGrantsInput{}
}
req = c.newRequest(op, input, output)
output = &ListGrantsResponse{}
req.Data = output
return
}
// Returns a list of all grants for which the grant's RetiringPrincipal matches
// the one specified.
//
// A typical use is to list all grants that you are able to retire. To retire
// a grant, use RetireGrant.
func (c *KMS) ListRetirableGrants(input *ListRetirableGrantsInput) (*ListGrantsResponse, error) {
req, out := c.ListRetirableGrantsRequest(input)
err := req.Send()
return out, err
}
const opPutKeyPolicy = "PutKeyPolicy"
// PutKeyPolicyRequest generates a request for the PutKeyPolicy operation.
func (c *KMS) PutKeyPolicyRequest(input *PutKeyPolicyInput) (req *request.Request, output *PutKeyPolicyOutput) {
op := &request.Operation{
Name: opPutKeyPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutKeyPolicyInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &PutKeyPolicyOutput{}
req.Data = output
return
}
// Attaches a policy to the specified key.
func (c *KMS) PutKeyPolicy(input *PutKeyPolicyInput) (*PutKeyPolicyOutput, error) {
req, out := c.PutKeyPolicyRequest(input)
err := req.Send()
return out, err
}
const opReEncrypt = "ReEncrypt"
// ReEncryptRequest generates a request for the ReEncrypt operation.
func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, output *ReEncryptOutput) {
op := &request.Operation{
Name: opReEncrypt,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ReEncryptInput{}
}
req = c.newRequest(op, input, output)
output = &ReEncryptOutput{}
req.Data = output
return
}
// Encrypts data on the server side with a new customer master key without exposing
// the plaintext of the data on the client side. The data is first decrypted
// and then encrypted. This operation can also be used to change the encryption
// context of a ciphertext.
//
// Unlike other actions, ReEncrypt is authorized twice - once as ReEncryptFrom
// on the source key and once as ReEncryptTo on the destination key. We therefore
// recommend that you include the "action":"kms:ReEncrypt*" statement in your
// key policies to permit re-encryption from or to the key. The statement is
// included automatically when you authorize use of the key through the console
// but must be included manually when you set a policy by using the PutKeyPolicy
// function.
func (c *KMS) ReEncrypt(input *ReEncryptInput) (*ReEncryptOutput, error) {
req, out := c.ReEncryptRequest(input)
err := req.Send()
return out, err
}
const opRetireGrant = "RetireGrant"
// RetireGrantRequest generates a request for the RetireGrant operation.
func (c *KMS) RetireGrantRequest(input *RetireGrantInput) (req *request.Request, output *RetireGrantOutput) {
op := &request.Operation{
Name: opRetireGrant,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RetireGrantInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &RetireGrantOutput{}
req.Data = output
return
}
// Retires a grant. You can retire a grant when you're done using it to clean
// up. You should revoke a grant when you intend to actively deny operations
// that depend on it. The following are permitted to call this API: The account
// that created the grant The RetiringPrincipal, if present The GranteePrincipal,
// if RetireGrant is a grantee operation The grant to retire must be identified
// by its grant token or by a combination of the key ARN and the grant ID. A
// grant token is a unique variable-length base64-encoded string. A grant ID
// is a 64 character unique identifier of a grant. Both are returned by the
// CreateGrant function.
func (c *KMS) RetireGrant(input *RetireGrantInput) (*RetireGrantOutput, error) {
req, out := c.RetireGrantRequest(input)
err := req.Send()
return out, err
}
const opRevokeGrant = "RevokeGrant"
// RevokeGrantRequest generates a request for the RevokeGrant operation.
func (c *KMS) RevokeGrantRequest(input *RevokeGrantInput) (req *request.Request, output *RevokeGrantOutput) {
op := &request.Operation{
Name: opRevokeGrant,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RevokeGrantInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &RevokeGrantOutput{}
req.Data = output
return
}
// Revokes a grant. You can revoke a grant to actively deny operations that
// depend on it.
func (c *KMS) RevokeGrant(input *RevokeGrantInput) (*RevokeGrantOutput, error) {
req, out := c.RevokeGrantRequest(input)
err := req.Send()
return out, err
}
const opScheduleKeyDeletion = "ScheduleKeyDeletion"
// ScheduleKeyDeletionRequest generates a request for the ScheduleKeyDeletion operation.
func (c *KMS) ScheduleKeyDeletionRequest(input *ScheduleKeyDeletionInput) (req *request.Request, output *ScheduleKeyDeletionOutput) {
op := &request.Operation{
Name: opScheduleKeyDeletion,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ScheduleKeyDeletionInput{}
}
req = c.newRequest(op, input, output)
output = &ScheduleKeyDeletionOutput{}
req.Data = output
return
}
// Schedules the deletion of a customer master key (CMK). You may provide a
// waiting period, specified in days, before deletion occurs. If you do not
// provide a waiting period, the default period of 30 days is used. When this
// operation is successful, the state of the CMK changes to PendingDeletion.
// Before the waiting period ends, you can use CancelKeyDeletion to cancel the
// deletion of the CMK. After the waiting period ends, AWS KMS deletes the CMK
// and all AWS KMS data associated with it, including all aliases that point
// to it.
//
// Deleting a CMK is a destructive and potentially dangerous operation. When
// a CMK is deleted, all data that was encrypted under the CMK is rendered unrecoverable.
// To restrict the use of a CMK without deleting it, use DisableKey.
//
// For more information about scheduling a CMK for deletion, go to Deleting
// Customer Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html)
// in the AWS Key Management Service Developer Guide.
func (c *KMS) ScheduleKeyDeletion(input *ScheduleKeyDeletionInput) (*ScheduleKeyDeletionOutput, error) {
req, out := c.ScheduleKeyDeletionRequest(input)
err := req.Send()
return out, err
}
const opUpdateAlias = "UpdateAlias"
// UpdateAliasRequest generates a request for the UpdateAlias operation.
func (c *KMS) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *UpdateAliasOutput) {
op := &request.Operation{
Name: opUpdateAlias,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateAliasInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &UpdateAliasOutput{}
req.Data = output
return
}
// Updates an alias to map it to a different key.
//
// An alias is not a property of a key. Therefore, an alias can be mapped to
// and unmapped from an existing key without changing the properties of the
// key.
//
// An alias name can contain only alphanumeric characters, forward slashes
// (/), underscores (_), and dashes (-). An alias must start with the word "alias"
// followed by a forward slash (alias/). An alias that begins with "aws" after
// the forward slash (alias/aws...) is reserved by Amazon Web Services (AWS).
//
// The alias and the key it is mapped to must be in the same AWS account and
// the same region.
func (c *KMS) UpdateAlias(input *UpdateAliasInput) (*UpdateAliasOutput, error) {
req, out := c.UpdateAliasRequest(input)
err := req.Send()
return out, err
}
const opUpdateKeyDescription = "UpdateKeyDescription"
// UpdateKeyDescriptionRequest generates a request for the UpdateKeyDescription operation.
func (c *KMS) UpdateKeyDescriptionRequest(input *UpdateKeyDescriptionInput) (req *request.Request, output *UpdateKeyDescriptionOutput) {
op := &request.Operation{
Name: opUpdateKeyDescription,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateKeyDescriptionInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &UpdateKeyDescriptionOutput{}
req.Data = output
return
}
// Updates the description of a key.
func (c *KMS) UpdateKeyDescription(input *UpdateKeyDescriptionInput) (*UpdateKeyDescriptionOutput, error) {
req, out := c.UpdateKeyDescriptionRequest(input)
err := req.Send()
return out, err
}
// Contains information about an alias.
type AliasListEntry struct {
_ struct{} `type:"structure"`
// String that contains the key ARN.
AliasArn *string `min:"20" type:"string"`
// String that contains the alias.
AliasName *string `min:"1" type:"string"`
// String that contains the key identifier pointed to by the alias.
TargetKeyId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s AliasListEntry) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AliasListEntry) GoString() string {
return s.String()
}
type CancelKeyDeletionInput struct {
_ struct{} `type:"structure"`
// The unique identifier for the customer master key (CMK) for which to cancel
// deletion.
//
// To specify this value, use the unique key ID or the Amazon Resource Name
// (ARN) of the CMK. Examples: Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
// Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
//
//
// To obtain the unique key ID and key ARN for a given CMK, use ListKeys or
// DescribeKey.
KeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s CancelKeyDeletionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CancelKeyDeletionInput) GoString() string {
return s.String()
}
type CancelKeyDeletionOutput struct {
_ struct{} `type:"structure"`
// The unique identifier of the master key for which deletion is canceled.
KeyId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s CancelKeyDeletionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CancelKeyDeletionOutput) GoString() string {
return s.String()
}
type CreateAliasInput struct {
_ struct{} `type:"structure"`
// String that contains the display name. The name must start with the word
// "alias" followed by a forward slash (alias/). Aliases that begin with "alias/AWS"
// are reserved.
AliasName *string `min:"1" type:"string" required:"true"`
// An identifier of the key for which you are creating the alias. This value
// cannot be another alias but can be a globally unique identifier or a fully
// specified ARN to a key. Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
TargetKeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s CreateAliasInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateAliasInput) GoString() string {
return s.String()
}
type CreateAliasOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s CreateAliasOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateAliasOutput) GoString() string {
return s.String()
}
type CreateGrantInput struct {
_ struct{} `type:"structure"`
// The conditions under which the operations permitted by the grant are allowed.
//
// You can use this value to allow the operations permitted by the grant only
// when a specified encryption context is present. For more information, see
// Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html)
// in the AWS Key Management Service Developer Guide.
Constraints *GrantConstraints `type:"structure"`
// A list of grant tokens.
//
// For more information, go to Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
// in the AWS Key Management Service Developer Guide.
GrantTokens []*string `type:"list"`
// The principal that is given permission to perform the operations that the
// grant permits.
//
// To specify the principal, use the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// of an AWS principal. Valid AWS principals include AWS accounts (root), IAM
// users, federated users, and assumed role users. For examples of the ARN syntax
// to use for specifying a principal, see AWS Identity and Access Management
// (IAM) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam)
// in the Example ARNs section of the AWS General Reference.
GranteePrincipal *string `min:"1" type:"string" required:"true"`
// The unique identifier for the customer master key (CMK) that the grant applies
// to.
//
// To specify this value, use the globally unique key ID or the Amazon Resource
// Name (ARN) of the key. Examples: Globally unique key ID: 12345678-1234-1234-1234-123456789012
// Key ARN: arn:aws:kms:us-west-2:123456789012:key/12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
// A friendly name for identifying the grant. Use this value to prevent unintended
// creation of duplicate grants when retrying this request.
//
// When this value is absent, all CreateGrant requests result in a new grant
// with a unique GrantId even if all the supplied parameters are identical.
// This can result in unintended duplicates when you retry the CreateGrant request.
//
// When this value is present, you can retry a CreateGrant request with identical
// parameters; if the grant already exists, the original GrantId is returned
// without creating a new grant. Note that the returned grant token is unique
// with every CreateGrant request, even when a duplicate GrantId is returned.
// All grant tokens obtained in this way can be used interchangeably.
Name *string `min:"1" type:"string"`
// A list of operations that the grant permits. The list can contain any combination
// of one or more of the following values: Decrypt Encrypt GenerateDataKey
// GenerateDataKeyWithoutPlaintext ReEncryptFrom ReEncryptTo CreateGrant RetireGrant
Operations []*string `type:"list"`
// The principal that is given permission to retire the grant by using RetireGrant
// operation.
//
// To specify the principal, use the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// of an AWS principal. Valid AWS principals include AWS accounts (root), IAM
// users, federated users, and assumed role users. For examples of the ARN syntax
// to use for specifying a principal, see AWS Identity and Access Management
// (IAM) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam)
// in the Example ARNs section of the AWS General Reference.
RetiringPrincipal *string `min:"1" type:"string"`
}
// String returns the string representation
func (s CreateGrantInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateGrantInput) GoString() string {
return s.String()
}
type CreateGrantOutput struct {
_ struct{} `type:"structure"`
// The unique identifier for the grant.
//
// You can use the GrantId in a subsequent RetireGrant or RevokeGrant operation.
GrantId *string `min:"1" type:"string"`
// The grant token.
//
// For more information about using grant tokens, see Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
// in the AWS Key Management Service Developer Guide.
GrantToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s CreateGrantOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateGrantOutput) GoString() string {
return s.String()
}
type CreateKeyInput struct {
_ struct{} `type:"structure"`
// Description of the key. We recommend that you choose a description that helps
// your customer decide whether the key is appropriate for a task.
Description *string `type:"string"`
// Specifies the intended use of the key. Currently this defaults to ENCRYPT/DECRYPT,
// and only symmetric encryption and decryption are supported.
KeyUsage *string `type:"string" enum:"KeyUsageType"`
// Policy to attach to the key. This is required and delegates back to the account.
// The key is the root of trust. The policy size limit is 32 KiB (32768 bytes).
Policy *string `min:"1" type:"string"`
}
// String returns the string representation
func (s CreateKeyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateKeyInput) GoString() string {
return s.String()
}
type CreateKeyOutput struct {
_ struct{} `type:"structure"`
// Metadata associated with the key.
KeyMetadata *KeyMetadata `type:"structure"`
}
// String returns the string representation
func (s CreateKeyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateKeyOutput) GoString() string {
return s.String()
}
type DecryptInput struct {
_ struct{} `type:"structure"`
// Ciphertext to be decrypted. The blob includes metadata.
//
// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
CiphertextBlob []byte `min:"1" type:"blob" required:"true"`
// The encryption context. If this was specified in the Encrypt function, it
// must be specified here or the decryption operation will fail. For more information,
// see Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html).
EncryptionContext map[string]*string `type:"map"`
// A list of grant tokens.
//
// For more information, go to Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
// in the AWS Key Management Service Developer Guide.
GrantTokens []*string `type:"list"`
}
// String returns the string representation
func (s DecryptInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DecryptInput) GoString() string {
return s.String()
}
type DecryptOutput struct {
_ struct{} `type:"structure"`
// ARN of the key used to perform the decryption. This value is returned if
// no errors are encountered during the operation.
KeyId *string `min:"1" type:"string"`
// Decrypted plaintext data. This value may not be returned if the customer
// master key is not available or if you didn't have permission to use it.
//
// Plaintext is automatically base64 encoded/decoded by the SDK.
Plaintext []byte `min:"1" type:"blob"`
}
// String returns the string representation
func (s DecryptOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DecryptOutput) GoString() string {
return s.String()
}
type DeleteAliasInput struct {
_ struct{} `type:"structure"`
// The alias to be deleted. The name must start with the word "alias" followed
// by a forward slash (alias/). Aliases that begin with "alias/AWS" are reserved.
AliasName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteAliasInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteAliasInput) GoString() string {
return s.String()
}
type DeleteAliasOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteAliasOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteAliasOutput) GoString() string {
return s.String()
}
type DescribeKeyInput struct {
_ struct{} `type:"structure"`
// A list of grant tokens.
//
// For more information, go to Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
// in the AWS Key Management Service Developer Guide.
GrantTokens []*string `type:"list"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier, a fully specified ARN to either an alias or a key, or
// an alias name prefixed by "alias/". Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias
// Name Example - alias/MyAliasName
KeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeKeyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeKeyInput) GoString() string {
return s.String()
}
type DescribeKeyOutput struct {
_ struct{} `type:"structure"`
// Metadata associated with the key.
KeyMetadata *KeyMetadata `type:"structure"`
}
// String returns the string representation
func (s DescribeKeyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeKeyOutput) GoString() string {
return s.String()
}
type DisableKeyInput struct {
_ struct{} `type:"structure"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier or the fully specified ARN to a key. Key ARN Example -
// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DisableKeyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisableKeyInput) GoString() string {
return s.String()
}
type DisableKeyOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DisableKeyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisableKeyOutput) GoString() string {
return s.String()
}
type DisableKeyRotationInput struct {
_ struct{} `type:"structure"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier or the fully specified ARN to a key. Key ARN Example -
// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DisableKeyRotationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisableKeyRotationInput) GoString() string {
return s.String()
}
type DisableKeyRotationOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DisableKeyRotationOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisableKeyRotationOutput) GoString() string {
return s.String()
}
type EnableKeyInput struct {
_ struct{} `type:"structure"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier or the fully specified ARN to a key. Key ARN Example -
// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s EnableKeyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EnableKeyInput) GoString() string {
return s.String()
}
type EnableKeyOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s EnableKeyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EnableKeyOutput) GoString() string {
return s.String()
}
type EnableKeyRotationInput struct {
_ struct{} `type:"structure"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier or the fully specified ARN to a key. Key ARN Example -
// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s EnableKeyRotationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EnableKeyRotationInput) GoString() string {
return s.String()
}
type EnableKeyRotationOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s EnableKeyRotationOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EnableKeyRotationOutput) GoString() string {
return s.String()
}
type EncryptInput struct {
_ struct{} `type:"structure"`
// Name/value pair that specifies the encryption context to be used for authenticated
// encryption. If used here, the same value must be supplied to the Decrypt
// API or decryption will fail. For more information, see Encryption Context
// (http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html).
EncryptionContext map[string]*string `type:"map"`
// A list of grant tokens.
//
// For more information, go to Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
// in the AWS Key Management Service Developer Guide.
GrantTokens []*string `type:"list"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier, a fully specified ARN to either an alias or a key, or
// an alias name prefixed by "alias/". Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias
// Name Example - alias/MyAliasName
KeyId *string `min:"1" type:"string" required:"true"`
// Data to be encrypted.
//
// Plaintext is automatically base64 encoded/decoded by the SDK.
Plaintext []byte `min:"1" type:"blob" required:"true"`
}
// String returns the string representation
func (s EncryptInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EncryptInput) GoString() string {
return s.String()
}
type EncryptOutput struct {
_ struct{} `type:"structure"`
// The encrypted plaintext. If you are using the CLI, the value is Base64 encoded.
// Otherwise, it is not encoded.
//
// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
CiphertextBlob []byte `min:"1" type:"blob"`
// The ID of the key used during encryption.
KeyId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s EncryptOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EncryptOutput) GoString() string {
return s.String()
}
type GenerateDataKeyInput struct {
_ struct{} `type:"structure"`
// Name/value pair that contains additional data to be authenticated during
// the encryption and decryption processes that use the key. This value is logged
// by AWS CloudTrail to provide context around the data encrypted by the key.
EncryptionContext map[string]*string `type:"map"`
// A list of grant tokens.
//
// For more information, go to Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
// in the AWS Key Management Service Developer Guide.
GrantTokens []*string `type:"list"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier, a fully specified ARN to either an alias or a key, or
// an alias name prefixed by "alias/". Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias
// Name Example - alias/MyAliasName
KeyId *string `min:"1" type:"string" required:"true"`
// Value that identifies the encryption algorithm and key size to generate a
// data key for. Currently this can be AES_128 or AES_256.
KeySpec *string `type:"string" enum:"DataKeySpec"`
// Integer that contains the number of bytes to generate. Common values are
// 128, 256, 512, and 1024. 1024 is the current limit. We recommend that you
// use the KeySpec parameter instead.
NumberOfBytes *int64 `min:"1" type:"integer"`
}
// String returns the string representation
func (s GenerateDataKeyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GenerateDataKeyInput) GoString() string {
return s.String()
}
type GenerateDataKeyOutput struct {
_ struct{} `type:"structure"`
// Ciphertext that contains the encrypted data key. You must store the blob
// and enough information to reconstruct the encryption context so that the
// data encrypted by using the key can later be decrypted. You must provide
// both the ciphertext blob and the encryption context to the Decrypt API to
// recover the plaintext data key and decrypt the object.
//
// If you are using the CLI, the value is Base64 encoded. Otherwise, it is
// not encoded.
//
// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
CiphertextBlob []byte `min:"1" type:"blob"`
// System generated unique identifier of the key to be used to decrypt the encrypted
// copy of the data key.
KeyId *string `min:"1" type:"string"`
// Plaintext that contains the data key. Use this for encryption and decryption
// and then remove it from memory as soon as possible.
//
// Plaintext is automatically base64 encoded/decoded by the SDK.
Plaintext []byte `min:"1" type:"blob"`
}
// String returns the string representation
func (s GenerateDataKeyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GenerateDataKeyOutput) GoString() string {
return s.String()
}
type GenerateDataKeyWithoutPlaintextInput struct {
_ struct{} `type:"structure"`
// Name:value pair that contains additional data to be authenticated during
// the encryption and decryption processes.
EncryptionContext map[string]*string `type:"map"`
// A list of grant tokens.
//
// For more information, go to Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
// in the AWS Key Management Service Developer Guide.
GrantTokens []*string `type:"list"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier, a fully specified ARN to either an alias or a key, or
// an alias name prefixed by "alias/". Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias
// Name Example - alias/MyAliasName
KeyId *string `min:"1" type:"string" required:"true"`
// Value that identifies the encryption algorithm and key size. Currently this
// can be AES_128 or AES_256.
KeySpec *string `type:"string" enum:"DataKeySpec"`
// Integer that contains the number of bytes to generate. Common values are
// 128, 256, 512, 1024 and so on. We recommend that you use the KeySpec parameter
// instead.
NumberOfBytes *int64 `min:"1" type:"integer"`
}
// String returns the string representation
func (s GenerateDataKeyWithoutPlaintextInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GenerateDataKeyWithoutPlaintextInput) GoString() string {
return s.String()
}
type GenerateDataKeyWithoutPlaintextOutput struct {
_ struct{} `type:"structure"`
// Ciphertext that contains the wrapped data key. You must store the blob and
// encryption context so that the key can be used in a future decrypt operation.
//
// If you are using the CLI, the value is Base64 encoded. Otherwise, it is
// not encoded.
//
// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
CiphertextBlob []byte `min:"1" type:"blob"`
// System generated unique identifier of the key to be used to decrypt the encrypted
// copy of the data key.
KeyId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s GenerateDataKeyWithoutPlaintextOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GenerateDataKeyWithoutPlaintextOutput) GoString() string {
return s.String()
}
type GenerateRandomInput struct {
_ struct{} `type:"structure"`
// Integer that contains the number of bytes to generate. Common values are
// 128, 256, 512, 1024 and so on. The current limit is 1024 bytes.
NumberOfBytes *int64 `min:"1" type:"integer"`
}
// String returns the string representation
func (s GenerateRandomInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GenerateRandomInput) GoString() string {
return s.String()
}
type GenerateRandomOutput struct {
_ struct{} `type:"structure"`
// Plaintext that contains the unpredictable byte string.
//
// Plaintext is automatically base64 encoded/decoded by the SDK.
Plaintext []byte `min:"1" type:"blob"`
}
// String returns the string representation
func (s GenerateRandomOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GenerateRandomOutput) GoString() string {
return s.String()
}
type GetKeyPolicyInput struct {
_ struct{} `type:"structure"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier or the fully specified ARN to a key. Key ARN Example -
// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
// String that contains the name of the policy. Currently, this must be "default".
// Policy names can be discovered by calling ListKeyPolicies.
PolicyName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s GetKeyPolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetKeyPolicyInput) GoString() string {
return s.String()
}
type GetKeyPolicyOutput struct {
_ struct{} `type:"structure"`
// A policy document in JSON format.
Policy *string `min:"1" type:"string"`
}
// String returns the string representation
func (s GetKeyPolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetKeyPolicyOutput) GoString() string {
return s.String()
}
type GetKeyRotationStatusInput struct {
_ struct{} `type:"structure"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier or the fully specified ARN to a key. Key ARN Example -
// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s GetKeyRotationStatusInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetKeyRotationStatusInput) GoString() string {
return s.String()
}
type GetKeyRotationStatusOutput struct {
_ struct{} `type:"structure"`
// A Boolean value that specifies whether key rotation is enabled.
KeyRotationEnabled *bool `type:"boolean"`
}
// String returns the string representation
func (s GetKeyRotationStatusOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetKeyRotationStatusOutput) GoString() string {
return s.String()
}
// A structure for specifying the conditions under which the operations permitted
// by the grant are allowed.
//
// You can use this structure to allow the operations permitted by the grant
// only when a specified encryption context is present. For more information
// about encryption context, see Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html)
// in the AWS Key Management Service Developer Guide.
type GrantConstraints struct {
_ struct{} `type:"structure"`
// Contains a list of key-value pairs that must be present in the encryption
// context of a subsequent operation permitted by the grant. When a subsequent
// operation permitted by the grant includes an encryption context that matches
// this list, the grant allows the operation. Otherwise, the operation is not
// allowed.
EncryptionContextEquals map[string]*string `type:"map"`
// Contains a list of key-value pairs, a subset of which must be present in
// the encryption context of a subsequent operation permitted by the grant.
// When a subsequent operation permitted by the grant includes an encryption
// context that matches this list or is a subset of this list, the grant allows
// the operation. Otherwise, the operation is not allowed.
EncryptionContextSubset map[string]*string `type:"map"`
}
// String returns the string representation
func (s GrantConstraints) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GrantConstraints) GoString() string {
return s.String()
}
// Contains information about an entry in a list of grants.
type GrantListEntry struct {
_ struct{} `type:"structure"`
// The conditions under which the grant's operations are allowed.
Constraints *GrantConstraints `type:"structure"`
// The date and time when the grant was created.
CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
// The unique identifier for the grant.
GrantId *string `min:"1" type:"string"`
// The principal that receives the grant's permissions.
GranteePrincipal *string `min:"1" type:"string"`
// The AWS account under which the grant was issued.
IssuingAccount *string `min:"1" type:"string"`
// The unique identifier for the customer master key (CMK) to which the grant
// applies.
KeyId *string `min:"1" type:"string"`
// The friendly name that identifies the grant. If a name was provided in the
// CreateGrant request, that name is returned. Otherwise this value is null.
Name *string `min:"1" type:"string"`
// The list of operations permitted by the grant.
Operations []*string `type:"list"`
// The principal that can retire the grant.
RetiringPrincipal *string `min:"1" type:"string"`
}
// String returns the string representation
func (s GrantListEntry) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GrantListEntry) GoString() string {
return s.String()
}
// Contains information about each entry in the key list.
type KeyListEntry struct {
_ struct{} `type:"structure"`
// ARN of the key.
KeyArn *string `min:"20" type:"string"`
// Unique identifier of the key.
KeyId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s KeyListEntry) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s KeyListEntry) GoString() string {
return s.String()
}
// Contains metadata about a customer master key (CMK).
//
// This data type is used as a response element for the CreateKey and DescribeKey
// operations.
type KeyMetadata struct {
_ struct{} `type:"structure"`
// The twelve-digit account ID of the AWS account that owns the key.
AWSAccountId *string `type:"string"`
// The Amazon Resource Name (ARN) of the key. For examples, see AWS Key Management
// Service (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms)
// in the Example ARNs section of the AWS General Reference.
Arn *string `min:"20" type:"string"`
// The date and time when the key was created.
CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
// The date and time after which AWS KMS deletes the customer master key (CMK).
// This value is present only when KeyState is PendingDeletion, otherwise this
// value is null.
DeletionDate *time.Time `type:"timestamp" timestampFormat:"unix"`
// The friendly description of the key.
Description *string `type:"string"`
// Specifies whether the key is enabled. When KeyState is Enabled this value
// is true, otherwise it is false.
Enabled *bool `type:"boolean"`
// The globally unique identifier for the key.
KeyId *string `min:"1" type:"string" required:"true"`
// The state of the customer master key (CMK).
//
// For more information about how key state affects the use of a CMK, go to
// How Key State Affects the Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
// in the AWS Key Management Service Developer Guide.
KeyState *string `type:"string" enum:"KeyState"`
// The cryptographic operations for which you can use the key. Currently the
// only allowed value is ENCRYPT_DECRYPT, which means you can use the key for
// the Encrypt and Decrypt operations.
KeyUsage *string `type:"string" enum:"KeyUsageType"`
}
// String returns the string representation
func (s KeyMetadata) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s KeyMetadata) GoString() string {
return s.String()
}
type ListAliasesInput struct {
_ struct{} `type:"structure"`
// When paginating results, specify the maximum number of items to return in
// the response. If additional items exist beyond the number you specify, the
// Truncated element in the response is set to true.
//
// This value is optional. If you include a value, it must be between 1 and
// 100, inclusive. If you do not include a value, it defaults to 50.
Limit *int64 `min:"1" type:"integer"`
// Use this parameter only when paginating results and only in a subsequent
// request after you've received a response with truncated results. Set it to
// the value of NextMarker from the response you just received.
Marker *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListAliasesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListAliasesInput) GoString() string {
return s.String()
}
type ListAliasesOutput struct {
_ struct{} `type:"structure"`
// A list of key aliases in the user's account.
Aliases []*AliasListEntry `type:"list"`
// When Truncated is true, this value is present and contains the value to use
// for the Marker parameter in a subsequent pagination request.
NextMarker *string `min:"1" type:"string"`
// A flag that indicates whether there are more items in the list. If your results
// were truncated, you can use the Marker parameter to make a subsequent pagination
// request to retrieve more items in the list.
Truncated *bool `type:"boolean"`
}
// String returns the string representation
func (s ListAliasesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListAliasesOutput) GoString() string {
return s.String()
}
type ListGrantsInput struct {
_ struct{} `type:"structure"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier or the fully specified ARN to a key. Key ARN Example -
// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
// When paginating results, specify the maximum number of items to return in
// the response. If additional items exist beyond the number you specify, the
// Truncated element in the response is set to true.
//
// This value is optional. If you include a value, it must be between 1 and
// 100, inclusive. If you do not include a value, it defaults to 50.
Limit *int64 `min:"1" type:"integer"`
// Use this parameter only when paginating results and only in a subsequent
// request after you've received a response with truncated results. Set it to
// the value of NextMarker from the response you just received.
Marker *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListGrantsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListGrantsInput) GoString() string {
return s.String()
}
type ListGrantsResponse struct {
_ struct{} `type:"structure"`
// A list of grants.
Grants []*GrantListEntry `type:"list"`
// When Truncated is true, this value is present and contains the value to use
// for the Marker parameter in a subsequent pagination request.
NextMarker *string `min:"1" type:"string"`
// A flag that indicates whether there are more items in the list. If your results
// were truncated, you can use the Marker parameter to make a subsequent pagination
// request to retrieve more items in the list.
Truncated *bool `type:"boolean"`
}
// String returns the string representation
func (s ListGrantsResponse) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListGrantsResponse) GoString() string {
return s.String()
}
type ListKeyPoliciesInput struct {
_ struct{} `type:"structure"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier, a fully specified ARN to either an alias or a key, or
// an alias name prefixed by "alias/". Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias
// Name Example - alias/MyAliasName
KeyId *string `min:"1" type:"string" required:"true"`
// When paginating results, specify the maximum number of items to return in
// the response. If additional items exist beyond the number you specify, the
// Truncated element in the response is set to true.
//
// This value is optional. If you include a value, it must be between 1 and
// 1000, inclusive. If you do not include a value, it defaults to 100.
//
// Currently only 1 policy can be attached to a key.
Limit *int64 `min:"1" type:"integer"`
// Use this parameter only when paginating results and only in a subsequent
// request after you've received a response with truncated results. Set it to
// the value of NextMarker from the response you just received.
Marker *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListKeyPoliciesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListKeyPoliciesInput) GoString() string {
return s.String()
}
type ListKeyPoliciesOutput struct {
_ struct{} `type:"structure"`
// When Truncated is true, this value is present and contains the value to use
// for the Marker parameter in a subsequent pagination request.
NextMarker *string `min:"1" type:"string"`
// A list of policy names. Currently, there is only one policy and it is named
// "Default".
PolicyNames []*string `type:"list"`
// A flag that indicates whether there are more items in the list. If your results
// were truncated, you can use the Marker parameter to make a subsequent pagination
// request to retrieve more items in the list.
Truncated *bool `type:"boolean"`
}
// String returns the string representation
func (s ListKeyPoliciesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListKeyPoliciesOutput) GoString() string {
return s.String()
}
type ListKeysInput struct {
_ struct{} `type:"structure"`
// When paginating results, specify the maximum number of items to return in
// the response. If additional items exist beyond the number you specify, the
// Truncated element in the response is set to true.
//
// This value is optional. If you include a value, it must be between 1 and
// 1000, inclusive. If you do not include a value, it defaults to 100.
Limit *int64 `min:"1" type:"integer"`
// Use this parameter only when paginating results and only in a subsequent
// request after you've received a response with truncated results. Set it to
// the value of NextMarker from the response you just received.
Marker *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListKeysInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListKeysInput) GoString() string {
return s.String()
}
type ListKeysOutput struct {
_ struct{} `type:"structure"`
// A list of keys.
Keys []*KeyListEntry `type:"list"`
// When Truncated is true, this value is present and contains the value to use
// for the Marker parameter in a subsequent pagination request.
NextMarker *string `min:"1" type:"string"`
// A flag that indicates whether there are more items in the list. If your results
// were truncated, you can use the Marker parameter to make a subsequent pagination
// request to retrieve more items in the list.
Truncated *bool `type:"boolean"`
}
// String returns the string representation
func (s ListKeysOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListKeysOutput) GoString() string {
return s.String()
}
type ListRetirableGrantsInput struct {
_ struct{} `type:"structure"`
// When paginating results, specify the maximum number of items to return in
// the response. If additional items exist beyond the number you specify, the
// Truncated element in the response is set to true.
//
// This value is optional. If you include a value, it must be between 1 and
// 100, inclusive. If you do not include a value, it defaults to 50.
Limit *int64 `min:"1" type:"integer"`
// Use this parameter only when paginating results and only in a subsequent
// request after you've received a response with truncated results. Set it to
// the value of NextMarker from the response you just received.
Marker *string `min:"1" type:"string"`
// The retiring principal for which to list grants.
//
// To specify the retiring principal, use the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// of an AWS principal. Valid AWS principals include AWS accounts (root), IAM
// users, federated users, and assumed role users. For examples of the ARN syntax
// for specifying a principal, go to AWS Identity and Access Management (IAM)
// (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam)
// in the Example ARNs section of the Amazon Web Services General Reference.
RetiringPrincipal *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s ListRetirableGrantsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListRetirableGrantsInput) GoString() string {
return s.String()
}
type PutKeyPolicyInput struct {
_ struct{} `type:"structure"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier or the fully specified ARN to a key. Key ARN Example -
// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
// The policy to attach to the key. This is required and delegates back to the
// account. The key is the root of trust. The policy size limit is 32 KiB (32768
// bytes).
Policy *string `min:"1" type:"string" required:"true"`
// Name of the policy to be attached. Currently, the only supported name is
// "default".
PolicyName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s PutKeyPolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutKeyPolicyInput) GoString() string {
return s.String()
}
type PutKeyPolicyOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s PutKeyPolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutKeyPolicyOutput) GoString() string {
return s.String()
}
type ReEncryptInput struct {
_ struct{} `type:"structure"`
// Ciphertext of the data to re-encrypt.
//
// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
CiphertextBlob []byte `min:"1" type:"blob" required:"true"`
// Encryption context to be used when the data is re-encrypted.
DestinationEncryptionContext map[string]*string `type:"map"`
// A unique identifier for the customer master key used to re-encrypt the data.
// This value can be a globally unique identifier, a fully specified ARN to
// either an alias or a key, or an alias name prefixed by "alias/". Key ARN
// Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias
// Name Example - alias/MyAliasName
DestinationKeyId *string `min:"1" type:"string" required:"true"`
// A list of grant tokens.
//
// For more information, go to Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
// in the AWS Key Management Service Developer Guide.
GrantTokens []*string `type:"list"`
// Encryption context used to encrypt and decrypt the data specified in the
// CiphertextBlob parameter.
SourceEncryptionContext map[string]*string `type:"map"`
}
// String returns the string representation
func (s ReEncryptInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ReEncryptInput) GoString() string {
return s.String()
}
type ReEncryptOutput struct {
_ struct{} `type:"structure"`
// The re-encrypted data. If you are using the CLI, the value is Base64 encoded.
// Otherwise, it is not encoded.
//
// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
CiphertextBlob []byte `min:"1" type:"blob"`
// Unique identifier of the key used to re-encrypt the data.
KeyId *string `min:"1" type:"string"`
// Unique identifier of the key used to originally encrypt the data.
SourceKeyId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ReEncryptOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ReEncryptOutput) GoString() string {
return s.String()
}
type RetireGrantInput struct {
_ struct{} `type:"structure"`
// Unique identifier of the grant to be retired. The grant ID is returned by
// the CreateGrant function. Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123
GrantId *string `min:"1" type:"string"`
// Token that identifies the grant to be retired.
GrantToken *string `min:"1" type:"string"`
// A unique identifier for the customer master key associated with the grant.
// This value can be a globally unique identifier or a fully specified ARN of
// the key. Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s RetireGrantInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RetireGrantInput) GoString() string {
return s.String()
}
type RetireGrantOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s RetireGrantOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RetireGrantOutput) GoString() string {
return s.String()
}
type RevokeGrantInput struct {
_ struct{} `type:"structure"`
// Identifier of the grant to be revoked.
GrantId *string `min:"1" type:"string" required:"true"`
// A unique identifier for the customer master key associated with the grant.
// This value can be a globally unique identifier or the fully specified ARN
// to a key. Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s RevokeGrantInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RevokeGrantInput) GoString() string {
return s.String()
}
type RevokeGrantOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s RevokeGrantOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RevokeGrantOutput) GoString() string {
return s.String()
}
type ScheduleKeyDeletionInput struct {
_ struct{} `type:"structure"`
// The unique identifier for the customer master key (CMK) to delete.
//
// To specify this value, use the unique key ID or the Amazon Resource Name
// (ARN) of the CMK. Examples: Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
// Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
//
//
// To obtain the unique key ID and key ARN for a given CMK, use ListKeys or
// DescribeKey.
KeyId *string `min:"1" type:"string" required:"true"`
// The waiting period, specified in number of days. After the waiting period
// ends, AWS KMS deletes the customer master key (CMK).
//
// This value is optional. If you include a value, it must be between 7 and
// 30, inclusive. If you do not include a value, it defaults to 30.
PendingWindowInDays *int64 `min:"1" type:"integer"`
}
// String returns the string representation
func (s ScheduleKeyDeletionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ScheduleKeyDeletionInput) GoString() string {
return s.String()
}
type ScheduleKeyDeletionOutput struct {
_ struct{} `type:"structure"`
// The date and time after which AWS KMS deletes the customer master key (CMK).
DeletionDate *time.Time `type:"timestamp" timestampFormat:"unix"`
// The unique identifier of the customer master key (CMK) for which deletion
// is scheduled.
KeyId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ScheduleKeyDeletionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ScheduleKeyDeletionOutput) GoString() string {
return s.String()
}
type UpdateAliasInput struct {
_ struct{} `type:"structure"`
// String that contains the name of the alias to be modified. The name must
// start with the word "alias" followed by a forward slash (alias/). Aliases
// that begin with "alias/aws" are reserved.
AliasName *string `min:"1" type:"string" required:"true"`
// Unique identifier of the customer master key to be mapped to the alias. This
// value can be a globally unique identifier or the fully specified ARN of a
// key. Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
//
// You can call ListAliases to verify that the alias is mapped to the correct
// TargetKeyId.
TargetKeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s UpdateAliasInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateAliasInput) GoString() string {
return s.String()
}
type UpdateAliasOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s UpdateAliasOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateAliasOutput) GoString() string {
return s.String()
}
type UpdateKeyDescriptionInput struct {
_ struct{} `type:"structure"`
// New description for the key.
Description *string `type:"string" required:"true"`
// A unique identifier for the customer master key. This value can be a globally
// unique identifier or the fully specified ARN to a key. Key ARN Example -
// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
// Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
KeyId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s UpdateKeyDescriptionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateKeyDescriptionInput) GoString() string {
return s.String()
}
type UpdateKeyDescriptionOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s UpdateKeyDescriptionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateKeyDescriptionOutput) GoString() string {
return s.String()
}
const (
// @enum DataKeySpec
DataKeySpecAes256 = "AES_256"
// @enum DataKeySpec
DataKeySpecAes128 = "AES_128"
)
const (
// @enum GrantOperation
GrantOperationDecrypt = "Decrypt"
// @enum GrantOperation
GrantOperationEncrypt = "Encrypt"
// @enum GrantOperation
GrantOperationGenerateDataKey = "GenerateDataKey"
// @enum GrantOperation
GrantOperationGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext"
// @enum GrantOperation
GrantOperationReEncryptFrom = "ReEncryptFrom"
// @enum GrantOperation
GrantOperationReEncryptTo = "ReEncryptTo"
// @enum GrantOperation
GrantOperationCreateGrant = "CreateGrant"
// @enum GrantOperation
GrantOperationRetireGrant = "RetireGrant"
// @enum GrantOperation
GrantOperationDescribeKey = "DescribeKey"
)
const (
// @enum KeyState
KeyStateEnabled = "Enabled"
// @enum KeyState
KeyStateDisabled = "Disabled"
// @enum KeyState
KeyStatePendingDeletion = "PendingDeletion"
)
const (
// @enum KeyUsageType
KeyUsageTypeEncryptDecrypt = "ENCRYPT_DECRYPT"
)
|