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;
#[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>,
}
#[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,
}
#[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,
}
#[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,
}
#[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>>,
}
#[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,
}
#[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>,
}
#[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,
}
#[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,
}
#[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,
}
#[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,
}
#[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,
}
#[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,
}
#[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,
}
#[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>,
}
#[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,
}
#[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,
}
#[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>,
}
#[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,
}
#[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,
}
#[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>,
}
#[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,
}
#[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,
}
#[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,
}
#[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>,
}
#[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,
}
#[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,
}
#[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,
}
#[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,
}
#[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,
}
#[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,
}
#[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>,
}
#[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,
}
#[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,
}
#[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,
}
#[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>,
}