vaultrs/api/auth/aws/requests.rs
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
use super::responses::{
CreateRoleTagResponse, ListCertificateConfigurationsResponse, ListDenyListTagsResponse,
ListIdentityAccessListEntriesResponse, ListRolesResponse, ListStsRolesResponse,
ReadCertificateConfigurationResponse, ReadClientConfigurationResponse,
ReadIdentityAccessListInformationResponse, ReadIdentityAccessListTidySettingsResponse,
ReadIdentityConfigurationResponse, ReadRoleResponse, ReadRoleTagDenyListResponse,
ReadRoleTagDenyListTidySettingsResponse, ReadStsRoleResponse, RotateRootCredentialsResponse,
};
use rustify_derive::Endpoint;
use serde::Serialize;
/// ## Configure Client
/// Configures the credentials required to perform API calls to AWS as well as custom endpoints to talk to AWS APIs.
///
/// * Path: /auth/{self.mount}/config/client
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#configure-client>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/client",
method = "POST",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ConfigureClientRequest {
#[endpoint(skip)]
pub mount: String,
pub max_retries: Option<i64>,
pub access_key: Option<String>,
pub secret_key: Option<String>,
pub endpoint: Option<String>,
pub iam_endpoint: Option<String>,
pub sts_endpoint: Option<String>,
pub sts_region: Option<String>,
pub iam_server_id_header_value: Option<String>,
pub allowed_sts_header_values: Option<String>,
}
/// ## Read Client Configuration
/// Returns the previously configured AWS access credentials.
///
/// * Path: /auth/{self.mount}/config/client
/// * Method: GET
/// * Response: [ReadClientConfigurationResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#read-config>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/client",
response = "ReadClientConfigurationResponse",
builder = "true"
)]
#[builder(setter(into))]
pub struct ReadClientConfigurationRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Delete Client Configuration
/// Deletes the previously configured AWS access credentials.
///
/// * Path: /auth/{self.mount}/config/client
/// * Method: DELETE
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#delete-config>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/client",
method = "DELETE",
builder = "true"
)]
#[builder(setter(into))]
pub struct DeleteClientConfigurationRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Rotate Root Credentials
/// When you have configured Vault with static credentials, you can use this endpoint to have Vault rotate the access key it used.
///
/// * Path: /auth/{self.mount}/config/rotate-root
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#rotate-root-credentials>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/rotate-root",
method = "POST",
response = "RotateRootCredentialsResponse",
builder = "true"
)]
#[builder(setter(into))]
pub struct RotateRootCredentialsRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Configure Identity Integration
/// This configures the way that Vault interacts with the Identity store.
///
/// * Path: /auth/{self.mount}/config/identity
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#configure-identity-integration>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/identity",
method = "POST",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ConfigureIdentityRequest {
#[endpoint(skip)]
pub mount: String,
pub iam_alias: Option<String>,
pub iam_metadata: Option<Vec<String>>,
pub ec2_alias: Option<String>,
pub ec2_metadata: Option<Vec<String>>,
}
/// ## Read Identity Integration Configuration
/// Returns the previously configured Identity integration configuration
///
/// * Path: /auth/{self.mount}/config/identity
/// * Method: GET
/// * Response: [ReadIdentityConfigurationResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#read-identity-integration-configuration>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/identity",
response = "ReadIdentityConfigurationResponse",
builder = "true"
)]
#[builder(setter(into))]
pub struct ReadIdentityConfigurationRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Create Certificate Configuration
/// Registers an AWS public key to be used to verify the instance identity documents.
///
/// * Path: /auth/{self.mount}/config/certificate/{self.cert_name}
/// * Method: GET
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#create-certificate-configuration>
#[derive(Builder, Debug, Default, Endpoint, Serialize)]
#[endpoint(
path = "/auth/{self.mount}/config/certificate/{self.cert_name}",
method = "POST",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct CreateCertificateConfigurationRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub cert_name: String,
pub aws_public_cert: String,
#[serde(rename = "type")]
pub cert_type: Option<String>,
}
/// ## Read Certificate Configuration
/// Returns the previously configured AWS public key.
///
/// * Path: /auth/{self.mount}/config/certificate/{self.cert_name}
/// * Method: GET
/// * Response: [ReadCertificateConfigurationResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#read-certificate-configuration>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/certificate/{self.cert_name}",
response = "ReadCertificateConfigurationResponse",
builder = "true"
)]
#[builder(setter(into))]
pub struct ReadCertificateConfigurationRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub cert_name: String,
}
/// ## Delete Certificate Configuration
/// Removes the previously configured AWS public key.
///
/// * Path: /auth/{self.mount}/config/certificate/{self.cert_name}
/// * Method: DELETE
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#delete-certificate-configuration>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/certificate/{self.cert_name}",
method = "DELETE",
builder = "true"
)]
#[builder(setter(into))]
pub struct DeleteCertificateConfigurationRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub cert_name: String,
}
/// ## List Certificate Configurations
/// Lists all the AWS public certificates that are registered with the method.
///
/// * Path: /auth/{self.mount}/config/certificates
/// * Method: LIST
/// * Response: [ListCertificateConfigurationsResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#list-certificate-configuration>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/certificates",
method = "LIST",
response = "ListCertificateConfigurationsResponse",
builder = "true"
)]
#[builder(setter(into))]
pub struct ListCertificateConfigurationsRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Create STS Role
/// Allows the explicit association of STS roles to satellite AWS accounts (i.e. those which are
/// not the account in which the Vault server is running.)
///
/// * Path: /auth/{self.mount}/config/sts/{self.account_id}
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#create-sts-role>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/sts/{self.account_id}",
method = "POST",
builder = "true"
)]
#[builder(setter(into))]
pub struct CreateStsRoleRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub account_id: String,
pub sts_role: String,
}
/// ## Read STS Role
/// Returns the previously configured STS role.
///
/// * Path: /auth/{self.mount}/config/sts/{self.account_id}
/// * Method: GET
/// * Response: [ReadStsRoleResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#read-sts-role>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/sts/{self.account_id}",
response = "ReadStsRoleResponse",
builder = "true"
)]
#[builder(setter(into))]
pub struct ReadStsRoleRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub account_id: String,
}
/// ## List STS Roles
/// Lists all the AWS Account IDs for which an STS role is registered.
///
/// * Path: /auth/{self.mount}/config/sts
/// * Method: LIST
/// * Response: [ListStsRolesResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#list-sts-roles>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/sts",
method = "LIST",
response = "ListStsRolesResponse",
builder = "true"
)]
#[builder(setter(into))]
pub struct ListStsRolesRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Delete STS Role
/// Deletes a previously configured AWS account/STS role association.
///
/// * Path: /auth/{self.mount}/config/sts/{self.account_id}
/// * Method: DELETE
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#delete-sts-role>
#[derive(Builder, Debug, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/sts/{self.account_id}",
method = "DELETE",
builder = "true"
)]
#[builder(setter(into))]
pub struct DeleteStsRoleRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub account_id: String,
}
/// ## Configure Identity Access List Tidy Operation
/// Configures the periodic tidying operation of the access listed identity entries.
///
/// * Path: /auth/{self.mount}/config/tidy/identity-accesslist
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#configure-identity-access-list-tidy-operation>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/tidy/identity-accesslist",
method = "POST",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ConfigureIdentityAccessListTidyOperationRequest {
#[endpoint(skip)]
pub mount: String,
pub safety_buffer: Option<String>,
pub disable_periodic_tidy: Option<bool>,
}
/// ## Read Identity Access List Tidy Settings
/// Returns the previously configured periodic access list tidying settings.
///
/// * Path: /auth/{self.mount}/config/tidy/identity-accesslist
/// * Method: GET
/// * Response: ReadIdentityAccessListTidySettingsResponse
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#read-identity-access-list-tidy-settings>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/tidy/identity-accesslist",
response = "ReadIdentityAccessListTidySettingsResponse",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ReadIdentityAccessListTidySettingsRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Delete Identity Access List Tidy Settings
/// Deletes the previously configured periodic access list tidying settings.
///
/// * Path: /auth/{self.mount}/config/tidy/identity-accesslist
/// * Method: DELETE
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#delete-identity-access-list-tidy-settings>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/tidy/identity-accesslist",
method = "DELETE",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct DeleteIdentityAccessListTidySettingsRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Configure Role Tag Deny List Tidy Operation
/// Configures the periodic tidying operation of the deny listed role tag entries.
///
/// * Path: /auth/{self.mount}/config/tidy/roletag-denylist
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#configure-role-tag-deny-list-tidy-operation>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/tidy/roletag-denylist",
method = "POST",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ConfigureRoleTagDenyListTidyOperationRequest {
#[endpoint(skip)]
pub mount: String,
pub safety_buffer: Option<String>,
pub disable_periodic_tidy: Option<bool>,
}
/// ## Read Role Tag Deny List Tidy Settings
/// Returns the previously configured periodic deny list tidying settings.
///
/// * Path: /auth/{self.mount}/config/tidy/roletag-denylist
/// * Method: GET
/// * Response: ReadRoleTagDebyListTidySettingsResponse
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#read-role-tag-deny-list-tidy-settings>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/tidy/roletag-denylist",
response = "ReadRoleTagDenyListTidySettingsResponse",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ReadRoleTagDenyListTidySettingsRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Delete Role Tag Deny List Tidy Settings
/// Deletes the previously configured periodic deny list tidying settings.
///
/// * Path: /auth/{self.mount}/config/tidy/roletag-denylist
/// * Method: DELETE
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#delete-role-tag-deny-list-tidy-settings>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/config/tidy/roletag-denylist",
method = "DELETE",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct DeleteRoleTagDenyListTidySettingsRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Create Role
/// Registers a role in the method
///
/// * Path: /auth/{self.mount}/role/{self.role}
/// * Method: POST
/// * Response: [N/A]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#create-role>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/role/{self.role}",
method = "POST",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct CreateRoleRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub role: String,
pub auth_type: Option<String>,
pub bound_ami_id: Option<Vec<String>>,
pub bound_account_id: Option<Vec<String>>,
pub bound_region: Option<Vec<String>>,
pub bound_vpc_id: Option<Vec<String>>,
pub bound_subnet_id: Option<Vec<String>>,
pub bound_iam_role_arn: Option<Vec<String>>,
pub bound_iam_instance_profile_arn: Option<Vec<String>>,
pub bound_ec2_instance_id: Option<Vec<String>>,
pub role_tag: Option<String>,
pub bound_iam_principal_arn: Option<Vec<String>>,
pub inferred_entity_type: Option<String>,
pub inferred_aws_region: Option<String>,
pub resolve_aws_unique_ids: Option<bool>,
pub allow_instance_migration: Option<bool>,
pub disallow_reauthentication: Option<bool>,
pub token_ttl: Option<i64>,
pub token_max_ttl: Option<i64>,
pub token_policies: Option<Vec<String>>,
pub token_bound_cidrs: Option<Vec<String>>,
pub token_explicit_max_ttl: Option<i64>,
pub token_no_default_policy: Option<bool>,
pub token_num_uses: Option<i64>,
pub token_period: Option<i64>,
pub token_type: Option<String>,
}
/// ## Read Role
/// Returns the previously registered role configuration
///
/// * Path: /auth/{self.mount}/role/{self.role}
/// * Method: GET
/// * Response: [ReadRoleResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#read-role>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/role/{self.role}",
response = "ReadRoleResponse",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ReadRoleRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub role: String,
}
/// ## List Roles
/// Lists all the roles that are registered with the method
///
/// * Path: /auth/{self.mount}/roles
/// * Method: LIST
/// * Response: [ListRolesResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#list-roles>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/roles",
method = "LIST",
response = "ListRolesResponse",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ListRolesRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Delete Role
/// Deletes the previously registered role
///
/// * Path: /auth/{self.mount}/role/{self.role}
/// * Method: DELETE
/// * Response: [N/A]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#delete-role>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/role/{self.role}",
method = "DELETE",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct DeleteRoleRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub role: String,
}
/// ## Create Role Tags
/// Creates a role tag on the role, which help in restricting the capabilities
/// that are set on the role
///
/// * Path: /auth/{self.mount}/role/{self.role}/tag
/// * Method: POST
/// * Response: [CreateRoleTagResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#create-role-tags>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/role/{self.role}/tag",
method = "POST",
response = "CreateRoleTagResponse",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct CreateRoleTagRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub role: String,
pub policies: Option<Vec<String>>,
pub max_ttl: Option<String>,
pub instance_id: Option<String>,
pub allow_instance_migration: Option<bool>,
pub disallow_reauthentication: Option<bool>,
}
/// ## Login(IAM method)
/// This endpoint verifies the pkcs7 signature of the signed GetCallerIdentity request.
///
/// * Path: /auth/{self.mount}/login
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#login>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(path = "/auth/{self.mount}/login", method = "POST", builder = "true")]
#[builder(setter(into, strip_option), default)]
pub struct IamLoginRequest {
#[endpoint(skip)]
pub mount: String,
pub role: Option<String>,
pub iam_http_request_method: String,
pub iam_request_url: String,
pub iam_request_body: String,
pub iam_request_headers: String,
}
/// ## Login(EC2 method)
/// This endpoint verifies the pkcs7 signature of the instance identity document.
///
/// * Path: /auth/{self.mount}/login
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#login>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(path = "/auth/{self.mount}/login", method = "POST", builder = "true")]
#[builder(setter(into, strip_option), default)]
pub struct Ec2LoginRequest {
#[endpoint(skip)]
pub mount: String,
pub role: Option<String>,
pub nonce: Option<String>,
pub identity: String,
pub signature: String,
pub pkcs7: String,
}
/// ## Place Role Tags in Deny List
/// Places a valid role tag in a deny list
///
/// * Path: /auth/{self.mount}/roletag-denylist/{self.tag_value}
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#place-role-tags-in-deny-list>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/roletag-denylist/{self.tag_value}",
method = "POST",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct PlaceRoleTagsInDenyListRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub tag_value: String,
}
/// ## Read Role Tag Deny List Information
/// Returns the deny list entry of a previously deny listed role tag.
///
/// * Path: /auth/{self.mount}/roletag-denylist/{self.role_tag}
/// * Method: GET
/// * Response: [ReadRoleTagDenyListResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#read-role-tag-deny-list-information>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/roletag-denylist/{self.tag_value}",
response = "ReadRoleTagDenyListResponse",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ReadRoleTagDenyListRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub tag_value: String,
}
/// ## List Deny List Tags
/// Lists all the role tags that are deny listed
///
/// * Path: /auth/{self.mount}/roletag-denylist
/// * Method: LIST
/// * Response: [ListDenyListTagsResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#list-deny-list-tags>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/roletag-denylist",
method = "LIST",
response = "ListDenyListTagsResponse",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ListDenyListTagsRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Delete Deny List Tags
/// Deletes a deny listed role tag
///
/// * Path: /auth/{self.mount}/roletag-denylist/{self.role_tag}
/// * Method: DELETE
/// * Response: [N/A]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#delete-deny-list-tags>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/roletag-denylist/{self.tag_value}",
method = "DELETE",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct DeleteDenyListTagsRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub tag_value: String,
}
/// ## Tidy Deny List Tags
///
/// Cleans up the entries in the deny listed based on expiration time on the entry and safety_buffer.
/// * Path: /auth/{self.mount}/tidy/roletag-denylist
/// * Method: POST
/// * Response: N/A
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#tidy-deny-list-tags>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/tidy/roletag-denylist",
method = "POST",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct TidyDenyListTagsRequest {
#[endpoint(skip)]
pub mount: String,
pub safety_buffer: Option<String>,
}
/// ## Read Identity Access List Information
/// Returns an entry in the identity access list.
///
/// * Path: /auth/{self.mount}/identity-accesslist/{self.instance_id}
/// * Method: GET
/// * Response: [ReadIdentityAccessListInformationResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#tidy-deny-list-tags>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/identity-accesslist/{self.instance_id}",
response = "ReadIdentityAccessListInformationResponse",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ReadIdentityAccessListInformationRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub instance_id: String,
}
/// ## List Identity Access List Entries
/// Lists all the instance IDs that are in the access list of successful logins
///
/// * Path: /auth/{self.mount}/identity-accesslist
/// * Method: LIST
/// * Response: [ListIdentityAccessListEntriesResponse]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#list-identity-access-list-entries>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/identity-accesslist",
method = "LIST",
response = "ListIdentityAccessListEntriesResponse",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct ListIdentityAccessListEntriesRequest {
#[endpoint(skip)]
pub mount: String,
}
/// ## Delete Identity Access List Entries
/// Deletes a cache of the successful login from an instance
///
/// * Path: /auth/{self.mount}/identity-accesslist/{self.instance_id}
/// * Method: DELETE
/// * Response: [N/A]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#delete-identity-access-list-entries>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/identity-accesslist/{self.instance_id}",
method = "DELETE",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct DeleteIdentityAccessListEntriesRequest {
#[endpoint(skip)]
pub mount: String,
#[endpoint(skip)]
pub instance_id: String,
}
/// ## Tidy Identity Access List Entries
/// Cleans up the entries in the access list based on expiration time andsafety_buffer
///
/// * Path: /auth/{self.mount}/tidy/identity-accesslist
/// * Method: POST
/// * Response: [N/A]
/// * Reference: <https://developer.hashicorp.com/vault/api-docs/auth/aws#tidy-identity-access-list-entries>
#[derive(Builder, Debug, Default, Endpoint)]
#[endpoint(
path = "/auth/{self.mount}/tidy/identity-accesslist",
method = "POST",
builder = "true"
)]
#[builder(setter(into, strip_option), default)]
pub struct TidyIdentityAccessListEntriesRequest {
#[endpoint(skip)]
pub mount: String,
pub safety_buffer: Option<String>,
}