pub struct Ec2State {Show 101 fields
pub account_id: String,
pub region: String,
pub tags: BTreeMap<String, Vec<Tag>>,
pub vpcs: BTreeMap<String, Vpc>,
pub dhcp_options: BTreeMap<String, DhcpOptions>,
pub subnets: BTreeMap<String, Subnet>,
pub subnet_cidr_reservations: BTreeMap<String, SubnetCidrReservation>,
pub security_groups: BTreeMap<String, SecurityGroup>,
pub route_tables: BTreeMap<String, RouteTable>,
pub internet_gateways: BTreeMap<String, InternetGateway>,
pub egress_only_igws: BTreeMap<String, InternetGateway>,
pub nat_gateways: BTreeMap<String, NatGateway>,
pub elastic_ips: BTreeMap<String, ElasticIp>,
pub key_pairs: BTreeMap<String, KeyPair>,
pub placement_groups: BTreeMap<String, PlacementGroup>,
pub network_interfaces: BTreeMap<String, NetworkInterface>,
pub eni_permissions: BTreeMap<String, NetworkInterfacePermission>,
pub instances: BTreeMap<String, Instance>,
pub volumes: BTreeMap<String, Volume>,
pub ebs_encryption_default: bool,
pub ebs_default_kms_key_id: Option<String>,
pub snapshots: BTreeMap<String, Snapshot>,
pub snapshot_block_public_access: String,
pub images: BTreeMap<String, Image>,
pub image_watermarks: BTreeMap<String, BTreeMap<String, String>>,
pub image_block_public_access: String,
pub allowed_images_settings: String,
pub allowed_image_criteria: Vec<Vec<String>>,
pub network_acls: BTreeMap<String, NetworkAcl>,
pub vpc_peerings: BTreeMap<String, VpcPeering>,
pub vpc_endpoints: BTreeMap<String, VpcEndpoint>,
pub endpoint_services: BTreeMap<String, EndpointService>,
pub connection_notifications: BTreeMap<String, ConnectionNotification>,
pub flow_logs: BTreeMap<String, FlowLog>,
pub launch_templates: BTreeMap<String, LaunchTemplate>,
pub spot_requests: BTreeMap<String, SpotRequest>,
pub spot_fleets: BTreeMap<String, SpotFleet>,
pub fleets: BTreeMap<String, Fleet>,
pub spot_datafeed: Option<(String, String)>,
pub capacity_reservations: BTreeMap<String, CapacityReservation>,
pub capacity_reservation_fleets: BTreeMap<String, String>,
pub reserved_instances: BTreeMap<String, ReservedInstances>,
pub reserved_instances_listings: BTreeMap<String, ReservedInstancesListing>,
pub reserved_instances_modifications: BTreeMap<String, ReservedInstancesModification>,
pub dedicated_hosts: BTreeMap<String, DedicatedHost>,
pub transit_gateways: BTreeMap<String, TransitGateway>,
pub tgw_attachments: BTreeMap<String, TgwAttachment>,
pub tgw_route_tables: BTreeMap<String, TgwRouteTable>,
pub tgw_routes: BTreeMap<String, Vec<TgwRoute>>,
pub tgw_rt_associations: BTreeMap<String, Vec<String>>,
pub tgw_rt_propagations: BTreeMap<String, Vec<String>>,
pub tgw_prefix_list_refs: BTreeMap<String, Vec<String>>,
pub tgw_peerings: BTreeMap<String, TgwPeering>,
pub tgw_connects: BTreeMap<String, (String, String)>,
pub tgw_connect_peers: BTreeMap<String, String>,
pub tgw_policy_tables: BTreeMap<String, String>,
pub tgw_policy_table_associations: BTreeMap<String, Vec<String>>,
pub tgw_announcements: BTreeMap<String, (String, String)>,
pub tgw_multicast_domains: BTreeMap<String, TgwMulticastDomain>,
pub tgw_metering_policies: BTreeMap<String, TgwMeteringPolicy>,
pub customer_gateways: BTreeMap<String, CustomerGateway>,
pub vpn_gateways: BTreeMap<String, VpnGateway>,
pub vpn_connections: BTreeMap<String, VpnConnection>,
pub vpn_concentrators: BTreeMap<String, VpnConcentrator>,
pub client_vpn_endpoints: BTreeMap<String, ClientVpnEndpoint>,
pub ipams: BTreeMap<String, Ipam>,
pub ipam_scopes: BTreeMap<String, IpamScope>,
pub ipam_pools: BTreeMap<String, IpamPool>,
pub ipam_pool_cidrs: BTreeMap<String, Vec<(String, String)>>,
pub ipam_pool_allocations: BTreeMap<String, Vec<(String, String)>>,
pub ipam_resource_discoveries: BTreeMap<String, IpamResourceDiscovery>,
pub ipam_rd_associations: BTreeMap<String, (String, String)>,
pub ipam_byoasns: BTreeMap<String, String>,
pub ipam_ext_tokens: BTreeMap<String, String>,
pub ipam_policies: BTreeMap<String, IpamPolicy>,
pub ipam_pl_resolvers: BTreeMap<String, IpamPrefixListResolver>,
pub ipam_pl_resolver_targets: BTreeMap<String, IpamPrefixListResolverTarget>,
pub ipam_policy_alloc_rules: BTreeMap<String, Vec<(String, String)>>,
pub ipam_enabled_policy: Option<String>,
pub va_instances: BTreeMap<String, VerifiedAccessInstance>,
pub va_trust_providers: BTreeMap<String, VerifiedAccessTrustProvider>,
pub va_groups: BTreeMap<String, VerifiedAccessGroup>,
pub va_endpoints: BTreeMap<String, VerifiedAccessEndpoint>,
pub va_group_policies: BTreeMap<String, String>,
pub va_endpoint_policies: BTreeMap<String, String>,
pub ni_paths: BTreeMap<String, NetworkInsightsPath>,
pub ni_analyses: BTreeMap<String, NetworkInsightsAnalysis>,
pub ni_access_scopes: BTreeMap<String, NetworkInsightsAccessScope>,
pub ni_scope_analyses: BTreeMap<String, NetworkInsightsAccessScopeAnalysis>,
pub carrier_gateways: BTreeMap<String, CarrierGateway>,
pub coip_pools: BTreeMap<String, CoipPool>,
pub coip_pool_cidrs: BTreeMap<String, Vec<String>>,
pub lg_route_tables: BTreeMap<String, LocalGatewayRouteTable>,
pub lg_routes: BTreeMap<String, Vec<String>>,
pub lg_rt_vpc_assocs: BTreeMap<String, LocalGatewayRouteTableVpcAssoc>,
pub lg_virtual_interfaces: BTreeMap<String, LocalGatewayVif>,
pub lg_vif_groups: BTreeMap<String, LocalGatewayVifGroup>,
pub lg_rt_vifg_assocs: BTreeMap<String, LocalGatewayRouteTableVifgAssoc>,
pub instance_connect_endpoints: BTreeMap<String, InstanceConnectEndpoint>,
pub fast_launch_images: HashSet<String>,
pub serial_console_access: bool,
}Expand description
Per-account, per-region EC2 state. Resource families are added to this struct as their batches land.
Fields§
§account_id: String§region: Stringresource-id -> tags. Shared by every Describe* tag: filter.
vpcs: BTreeMap<String, Vpc>§dhcp_options: BTreeMap<String, DhcpOptions>§subnets: BTreeMap<String, Subnet>§subnet_cidr_reservations: BTreeMap<String, SubnetCidrReservation>§security_groups: BTreeMap<String, SecurityGroup>§route_tables: BTreeMap<String, RouteTable>§internet_gateways: BTreeMap<String, InternetGateway>§egress_only_igws: BTreeMap<String, InternetGateway>§nat_gateways: BTreeMap<String, NatGateway>§elastic_ips: BTreeMap<String, ElasticIp>keyed by allocation id.
key_pairs: BTreeMap<String, KeyPair>keyed by key name.
placement_groups: BTreeMap<String, PlacementGroup>keyed by group name.
network_interfaces: BTreeMap<String, NetworkInterface>§eni_permissions: BTreeMap<String, NetworkInterfacePermission>keyed by permission id.
instances: BTreeMap<String, Instance>§volumes: BTreeMap<String, Volume>§ebs_encryption_default: boolAccount-level EBS default encryption toggle.
ebs_default_kms_key_id: Option<String>Account-level EBS default KMS key (None = alias/aws/ebs).
snapshots: BTreeMap<String, Snapshot>§snapshot_block_public_access: StringAccount-level snapshot block-public-access state.
images: BTreeMap<String, Image>§image_watermarks: BTreeMap<String, BTreeMap<String, String>>Watermarks attached to AMIs: image_id -> watermark_key -> watermark_name.
image_block_public_access: StringAccount-level image block-public-access state.
allowed_images_settings: StringAccount-level allowed-images settings state.
allowed_image_criteria: Vec<Vec<String>>Allowed-images imageCriterionSet: each criterion is its list of
ImageProviders, persisted by ReplaceImageCriteriaInAllowedImagesSettings
and reported by GetAllowedImagesSettings.
network_acls: BTreeMap<String, NetworkAcl>§vpc_peerings: BTreeMap<String, VpcPeering>§vpc_endpoints: BTreeMap<String, VpcEndpoint>§endpoint_services: BTreeMap<String, EndpointService>§connection_notifications: BTreeMap<String, ConnectionNotification>§flow_logs: BTreeMap<String, FlowLog>§launch_templates: BTreeMap<String, LaunchTemplate>§spot_requests: BTreeMap<String, SpotRequest>§spot_fleets: BTreeMap<String, SpotFleet>§fleets: BTreeMap<String, Fleet>§spot_datafeed: Option<(String, String)>Account-level spot datafeed subscription (bucket, prefix).
capacity_reservations: BTreeMap<String, CapacityReservation>§capacity_reservation_fleets: BTreeMap<String, String>Capacity reservation fleet ids (metadata-only).
reserved_instances: BTreeMap<String, ReservedInstances>§reserved_instances_listings: BTreeMap<String, ReservedInstancesListing>§reserved_instances_modifications: BTreeMap<String, ReservedInstancesModification>§dedicated_hosts: BTreeMap<String, DedicatedHost>§transit_gateways: BTreeMap<String, TransitGateway>§tgw_attachments: BTreeMap<String, TgwAttachment>§tgw_route_tables: BTreeMap<String, TgwRouteTable>§tgw_routes: BTreeMap<String, Vec<TgwRoute>>route-table-id -> static routes.
tgw_rt_associations: BTreeMap<String, Vec<String>>route-table-id -> associated attachment ids.
tgw_rt_propagations: BTreeMap<String, Vec<String>>route-table-id -> propagated attachment ids.
tgw_prefix_list_refs: BTreeMap<String, Vec<String>>route-table-id -> prefix-list ids referenced.
tgw_peerings: BTreeMap<String, TgwPeering>§tgw_connects: BTreeMap<String, (String, String)>connect-attachment-id -> (transport attachment id, tgw id).
tgw_connect_peers: BTreeMap<String, String>connect-peer-id -> attachment id.
tgw_policy_tables: BTreeMap<String, String>policy-table-id -> tgw id.
tgw_policy_table_associations: BTreeMap<String, Vec<String>>policy-table-id -> associated attachment ids.
tgw_announcements: BTreeMap<String, (String, String)>announcement-id -> (route-table id, peering-attachment id).
tgw_multicast_domains: BTreeMap<String, TgwMulticastDomain>§tgw_metering_policies: BTreeMap<String, TgwMeteringPolicy>§customer_gateways: BTreeMap<String, CustomerGateway>§vpn_gateways: BTreeMap<String, VpnGateway>§vpn_connections: BTreeMap<String, VpnConnection>§vpn_concentrators: BTreeMap<String, VpnConcentrator>§client_vpn_endpoints: BTreeMap<String, ClientVpnEndpoint>§ipams: BTreeMap<String, Ipam>§ipam_scopes: BTreeMap<String, IpamScope>§ipam_pools: BTreeMap<String, IpamPool>§ipam_pool_cidrs: BTreeMap<String, Vec<(String, String)>>pool-id -> provisioned (cidr, cidr-id).
ipam_pool_allocations: BTreeMap<String, Vec<(String, String)>>pool-id -> allocations (cidr, allocation-id).
ipam_resource_discoveries: BTreeMap<String, IpamResourceDiscovery>§ipam_rd_associations: BTreeMap<String, (String, String)>association-id -> (discovery-id, ipam-id).
ipam_byoasns: BTreeMap<String, String>asn -> associated cidr.
ipam_ext_tokens: BTreeMap<String, String>external-token-id -> ipam-id.
ipam_policies: BTreeMap<String, IpamPolicy>§ipam_pl_resolvers: BTreeMap<String, IpamPrefixListResolver>§ipam_pl_resolver_targets: BTreeMap<String, IpamPrefixListResolverTarget>§ipam_policy_alloc_rules: BTreeMap<String, Vec<(String, String)>>policy-id -> (locale, resource-type) allocation-rule documents.
ipam_enabled_policy: Option<String>The single enabled IPAM policy id, if any.
va_instances: BTreeMap<String, VerifiedAccessInstance>§va_trust_providers: BTreeMap<String, VerifiedAccessTrustProvider>§va_groups: BTreeMap<String, VerifiedAccessGroup>§va_endpoints: BTreeMap<String, VerifiedAccessEndpoint>§va_group_policies: BTreeMap<String, String>group-id -> policy document.
va_endpoint_policies: BTreeMap<String, String>endpoint-id -> policy document.
ni_paths: BTreeMap<String, NetworkInsightsPath>§ni_analyses: BTreeMap<String, NetworkInsightsAnalysis>§ni_access_scopes: BTreeMap<String, NetworkInsightsAccessScope>§ni_scope_analyses: BTreeMap<String, NetworkInsightsAccessScopeAnalysis>§carrier_gateways: BTreeMap<String, CarrierGateway>§coip_pools: BTreeMap<String, CoipPool>§coip_pool_cidrs: BTreeMap<String, Vec<String>>coip-pool-id -> CIDRs.
lg_route_tables: BTreeMap<String, LocalGatewayRouteTable>§lg_routes: BTreeMap<String, Vec<String>>route-table-id -> destination CIDRs.
lg_rt_vpc_assocs: BTreeMap<String, LocalGatewayRouteTableVpcAssoc>§lg_virtual_interfaces: BTreeMap<String, LocalGatewayVif>§lg_vif_groups: BTreeMap<String, LocalGatewayVifGroup>§lg_rt_vifg_assocs: BTreeMap<String, LocalGatewayRouteTableVifgAssoc>§instance_connect_endpoints: BTreeMap<String, InstanceConnectEndpoint>§fast_launch_images: HashSet<String>Image ids with fast-launch enabled.
serial_console_access: boolImplementations§
Source§impl Ec2State
impl Ec2State
pub fn new(account_id: &str, region: &str) -> Self
Sourcepub fn ensure_public_images_seeded(&mut self)
pub fn ensure_public_images_seeded(&mut self)
Idempotently (re)seed the public AMI catalogue into this account. Used on
snapshot restore so accounts persisted by a binary that predated the
catalogue (#1964) still get it after an upgrade+restart — without it,
aws_ami { owners=["amazon"] } returns empty for legacy accounts. Seeds
have deterministic ids, so re-seeding an already-seeded account is a no-op.
Replace the tag set for resource_id with tags merged over any
existing tags (CreateTags is upsert-by-key, matching AWS).
Remove tags for resource_id. When a tag’s value is None, the key is
removed regardless of value; when Some, only a key+value match is
removed (AWS DeleteTags semantics).
Tags for resource_id, or an empty slice when none.
Trait Implementations§
Source§impl AccountState for Ec2State
impl AccountState for Ec2State
Source§fn new_for_account(account_id: &str, region: &str, _endpoint: &str) -> Self
fn new_for_account(account_id: &str, region: &str, _endpoint: &str) -> Self
Source§fn inherit_from(&mut self, _sibling: &Self)
fn inherit_from(&mut self, _sibling: &Self)
MultiAccountState::get_or_create,
with a reference to an existing sibling state. Services can override
this to propagate shared resources (e.g. body caches) to the new state.Source§impl<'de> Deserialize<'de> for Ec2State
impl<'de> Deserialize<'de> for Ec2State
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Ec2State
impl RefUnwindSafe for Ec2State
impl Send for Ec2State
impl Sync for Ec2State
impl Unpin for Ec2State
impl UnsafeUnpin for Ec2State
impl UnwindSafe for Ec2State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more