Enum aws_sdk_config::model::ResourceType
source · #[non_exhaustive]
pub enum ResourceType {
Show 165 variants
Certificate,
AccessAnalyzerAnalyzer,
RestApi,
Stage,
Api,
StageV2,
AppConfigApplication,
AppSyncGraphQlApi,
AthenaDataCatalog,
AthenaWorkGroup,
AutoScalingGroup,
LaunchConfiguration,
ScalingPolicy,
ScheduledAction,
BackupPlan,
BackupSelection,
BackupVault,
BackupRecoveryPoint,
BatchComputeEnvironment,
BatchJobQueue,
Stack,
Distribution,
StreamingDistribution,
Trail,
Alarm,
Project,
CodeDeployApplication,
CodeDeployDeploymentConfig,
CodeDeployDeploymentGroup,
Pipeline,
ConformancePackCompliance,
ResourceCompliance,
DmsCertificate,
DmsEventSubscription,
DmsReplicationSubnetGroup,
DataSyncLocationEfs,
DataSyncLocationFSxLustre,
DataSyncLocationNfs,
DataSyncLocationS3,
DataSyncLocationSmb,
DataSyncTask,
DetectiveGraph,
Table,
CustomerGateway,
Eip,
EgressOnlyInternetGateway,
FlowLog,
Host,
Instance,
InternetGateway,
LaunchTemplate,
NatGateway,
NetworkAcl,
NetworkInsightsAccessScopeAnalysis,
NetworkInterface,
RegisteredHaInstance,
RouteTable,
SecurityGroup,
Subnet,
TransitGateway,
TransitGatewayAttachment,
TransitGatewayRouteTable,
Vpc,
VpcEndpoint,
VpcEndpointService,
VpcPeeringConnection,
VpnConnection,
VpnGateway,
Volume,
EcrPublicRepository,
EcrRepository,
EcsCluster,
EcsService,
EcsTaskDefinition,
EfsAccessPoint,
EfsFileSystem,
EksCluster,
EksFargateProfile,
EmrSecurityConfiguration,
Application,
ApplicationVersion,
Environment,
LoadBalancer,
ListenerV2,
LoadBalancerV2,
Domain,
GlobalAcceleratorAccelerator,
GlobalAcceleratorEndpointGroup,
GlobalAcceleratorListener,
GlueJob,
GuardDutyDetector,
GuardDutyIpSet,
GuardDutyThreatIntelSet,
Group,
Policy,
Role,
User,
Key,
KinesisStream,
KinesisStreamConsumer,
Function,
MskCluster,
NetworkFirewallFirewall,
NetworkFirewallFirewallPolicy,
NetworkFirewallRuleGroup,
OpenSearchDomain,
QldbLedger,
DbCluster,
DbClusterSnapshot,
DbInstance,
DbSecurityGroup,
DbSnapshot,
DbSubnetGroup,
EventSubscription,
Cluster,
ClusterParameterGroup,
ClusterSecurityGroup,
ClusterSnapshot,
ClusterSubnetGroup,
RedshiftEventSubscription,
Route53HostedZone,
Route53ResolverResolverEndpoint,
Route53ResolverResolverRule,
Route53ResolverResolverRuleAssociation,
AccountPublicAccessBlock,
Bucket,
SesConfigurationSet,
SesContactList,
Topic,
Queue,
AssociationCompliance,
FileData,
ManagedInstanceInventory,
PatchCompliance,
SageMakerCodeRepository,
SageMakerModel,
SageMakerNotebookInstanceLifecycleConfig,
SageMakerWorkteam,
Secret,
CloudFormationProduct,
CloudFormationProvisionedProduct,
Portfolio,
ServiceDiscoveryPublicDnsNamespace,
ServiceDiscoveryService,
Protection,
RegionalProtection,
StepFunctionsActivity,
StepFunctionsStateMachine,
RateBasedRule,
Rule,
RuleGroup,
WebAcl,
RegionalRateBasedRule,
RegionalRule,
RegionalRuleGroup,
RegionalWebAcl,
IpSetV2,
ManagedRuleSetV2,
RegexPatternSetV2,
RuleGroupV2,
WebAclv2,
WorkSpacesConnectionAlias,
WorkSpacesWorkspace,
EncryptionConfig,
Unknown(UnknownVariantValue),
}Expand description
When writing a match expression against ResourceType, it is important to ensure
your code is forward-compatible. That is, if a match arm handles a case for a
feature that is supported by the service but has not been represented as an enum
variant in a current version of SDK, your code should continue to work when you
upgrade SDK to a future version in which the enum does include a variant for that
feature.
Here is an example of how you can make a match expression forward-compatible:
# let resourcetype = unimplemented!();
match resourcetype {
ResourceType::Certificate => { /* ... */ },
ResourceType::AccessAnalyzerAnalyzer => { /* ... */ },
ResourceType::RestApi => { /* ... */ },
ResourceType::Stage => { /* ... */ },
ResourceType::Api => { /* ... */ },
ResourceType::StageV2 => { /* ... */ },
ResourceType::AppConfigApplication => { /* ... */ },
ResourceType::AppSyncGraphQlApi => { /* ... */ },
ResourceType::AthenaDataCatalog => { /* ... */ },
ResourceType::AthenaWorkGroup => { /* ... */ },
ResourceType::AutoScalingGroup => { /* ... */ },
ResourceType::LaunchConfiguration => { /* ... */ },
ResourceType::ScalingPolicy => { /* ... */ },
ResourceType::ScheduledAction => { /* ... */ },
ResourceType::BackupPlan => { /* ... */ },
ResourceType::BackupSelection => { /* ... */ },
ResourceType::BackupVault => { /* ... */ },
ResourceType::BackupRecoveryPoint => { /* ... */ },
ResourceType::BatchComputeEnvironment => { /* ... */ },
ResourceType::BatchJobQueue => { /* ... */ },
ResourceType::Stack => { /* ... */ },
ResourceType::Distribution => { /* ... */ },
ResourceType::StreamingDistribution => { /* ... */ },
ResourceType::Trail => { /* ... */ },
ResourceType::Alarm => { /* ... */ },
ResourceType::Project => { /* ... */ },
ResourceType::CodeDeployApplication => { /* ... */ },
ResourceType::CodeDeployDeploymentConfig => { /* ... */ },
ResourceType::CodeDeployDeploymentGroup => { /* ... */ },
ResourceType::Pipeline => { /* ... */ },
ResourceType::ConformancePackCompliance => { /* ... */ },
ResourceType::ResourceCompliance => { /* ... */ },
ResourceType::DmsCertificate => { /* ... */ },
ResourceType::DmsEventSubscription => { /* ... */ },
ResourceType::DmsReplicationSubnetGroup => { /* ... */ },
ResourceType::DataSyncLocationEfs => { /* ... */ },
ResourceType::DataSyncLocationFSxLustre => { /* ... */ },
ResourceType::DataSyncLocationNfs => { /* ... */ },
ResourceType::DataSyncLocationS3 => { /* ... */ },
ResourceType::DataSyncLocationSmb => { /* ... */ },
ResourceType::DataSyncTask => { /* ... */ },
ResourceType::DetectiveGraph => { /* ... */ },
ResourceType::Table => { /* ... */ },
ResourceType::CustomerGateway => { /* ... */ },
ResourceType::Eip => { /* ... */ },
ResourceType::EgressOnlyInternetGateway => { /* ... */ },
ResourceType::FlowLog => { /* ... */ },
ResourceType::Host => { /* ... */ },
ResourceType::Instance => { /* ... */ },
ResourceType::InternetGateway => { /* ... */ },
ResourceType::LaunchTemplate => { /* ... */ },
ResourceType::NatGateway => { /* ... */ },
ResourceType::NetworkAcl => { /* ... */ },
ResourceType::NetworkInsightsAccessScopeAnalysis => { /* ... */ },
ResourceType::NetworkInterface => { /* ... */ },
ResourceType::RegisteredHaInstance => { /* ... */ },
ResourceType::RouteTable => { /* ... */ },
ResourceType::SecurityGroup => { /* ... */ },
ResourceType::Subnet => { /* ... */ },
ResourceType::TransitGateway => { /* ... */ },
ResourceType::TransitGatewayAttachment => { /* ... */ },
ResourceType::TransitGatewayRouteTable => { /* ... */ },
ResourceType::Vpc => { /* ... */ },
ResourceType::VpcEndpoint => { /* ... */ },
ResourceType::VpcEndpointService => { /* ... */ },
ResourceType::VpcPeeringConnection => { /* ... */ },
ResourceType::VpnConnection => { /* ... */ },
ResourceType::VpnGateway => { /* ... */ },
ResourceType::Volume => { /* ... */ },
ResourceType::EcrPublicRepository => { /* ... */ },
ResourceType::EcrRepository => { /* ... */ },
ResourceType::EcsCluster => { /* ... */ },
ResourceType::EcsService => { /* ... */ },
ResourceType::EcsTaskDefinition => { /* ... */ },
ResourceType::EfsAccessPoint => { /* ... */ },
ResourceType::EfsFileSystem => { /* ... */ },
ResourceType::EksCluster => { /* ... */ },
ResourceType::EksFargateProfile => { /* ... */ },
ResourceType::EmrSecurityConfiguration => { /* ... */ },
ResourceType::Application => { /* ... */ },
ResourceType::ApplicationVersion => { /* ... */ },
ResourceType::Environment => { /* ... */ },
ResourceType::LoadBalancer => { /* ... */ },
ResourceType::ListenerV2 => { /* ... */ },
ResourceType::LoadBalancerV2 => { /* ... */ },
ResourceType::Domain => { /* ... */ },
ResourceType::GlobalAcceleratorAccelerator => { /* ... */ },
ResourceType::GlobalAcceleratorEndpointGroup => { /* ... */ },
ResourceType::GlobalAcceleratorListener => { /* ... */ },
ResourceType::GlueJob => { /* ... */ },
ResourceType::GuardDutyDetector => { /* ... */ },
ResourceType::GuardDutyIpSet => { /* ... */ },
ResourceType::GuardDutyThreatIntelSet => { /* ... */ },
ResourceType::Group => { /* ... */ },
ResourceType::Policy => { /* ... */ },
ResourceType::Role => { /* ... */ },
ResourceType::User => { /* ... */ },
ResourceType::Key => { /* ... */ },
ResourceType::KinesisStream => { /* ... */ },
ResourceType::KinesisStreamConsumer => { /* ... */ },
ResourceType::Function => { /* ... */ },
ResourceType::MskCluster => { /* ... */ },
ResourceType::NetworkFirewallFirewall => { /* ... */ },
ResourceType::NetworkFirewallFirewallPolicy => { /* ... */ },
ResourceType::NetworkFirewallRuleGroup => { /* ... */ },
ResourceType::OpenSearchDomain => { /* ... */ },
ResourceType::QldbLedger => { /* ... */ },
ResourceType::DbCluster => { /* ... */ },
ResourceType::DbClusterSnapshot => { /* ... */ },
ResourceType::DbInstance => { /* ... */ },
ResourceType::DbSecurityGroup => { /* ... */ },
ResourceType::DbSnapshot => { /* ... */ },
ResourceType::DbSubnetGroup => { /* ... */ },
ResourceType::EventSubscription => { /* ... */ },
ResourceType::Cluster => { /* ... */ },
ResourceType::ClusterParameterGroup => { /* ... */ },
ResourceType::ClusterSecurityGroup => { /* ... */ },
ResourceType::ClusterSnapshot => { /* ... */ },
ResourceType::ClusterSubnetGroup => { /* ... */ },
ResourceType::RedshiftEventSubscription => { /* ... */ },
ResourceType::Route53HostedZone => { /* ... */ },
ResourceType::Route53ResolverResolverEndpoint => { /* ... */ },
ResourceType::Route53ResolverResolverRule => { /* ... */ },
ResourceType::Route53ResolverResolverRuleAssociation => { /* ... */ },
ResourceType::AccountPublicAccessBlock => { /* ... */ },
ResourceType::Bucket => { /* ... */ },
ResourceType::SesConfigurationSet => { /* ... */ },
ResourceType::SesContactList => { /* ... */ },
ResourceType::Topic => { /* ... */ },
ResourceType::Queue => { /* ... */ },
ResourceType::AssociationCompliance => { /* ... */ },
ResourceType::FileData => { /* ... */ },
ResourceType::ManagedInstanceInventory => { /* ... */ },
ResourceType::PatchCompliance => { /* ... */ },
ResourceType::SageMakerCodeRepository => { /* ... */ },
ResourceType::SageMakerModel => { /* ... */ },
ResourceType::SageMakerNotebookInstanceLifecycleConfig => { /* ... */ },
ResourceType::SageMakerWorkteam => { /* ... */ },
ResourceType::Secret => { /* ... */ },
ResourceType::CloudFormationProduct => { /* ... */ },
ResourceType::CloudFormationProvisionedProduct => { /* ... */ },
ResourceType::Portfolio => { /* ... */ },
ResourceType::ServiceDiscoveryPublicDnsNamespace => { /* ... */ },
ResourceType::ServiceDiscoveryService => { /* ... */ },
ResourceType::Protection => { /* ... */ },
ResourceType::RegionalProtection => { /* ... */ },
ResourceType::StepFunctionsActivity => { /* ... */ },
ResourceType::StepFunctionsStateMachine => { /* ... */ },
ResourceType::RateBasedRule => { /* ... */ },
ResourceType::Rule => { /* ... */ },
ResourceType::RuleGroup => { /* ... */ },
ResourceType::WebAcl => { /* ... */ },
ResourceType::RegionalRateBasedRule => { /* ... */ },
ResourceType::RegionalRule => { /* ... */ },
ResourceType::RegionalRuleGroup => { /* ... */ },
ResourceType::RegionalWebAcl => { /* ... */ },
ResourceType::IpSetV2 => { /* ... */ },
ResourceType::ManagedRuleSetV2 => { /* ... */ },
ResourceType::RegexPatternSetV2 => { /* ... */ },
ResourceType::RuleGroupV2 => { /* ... */ },
ResourceType::WebAclv2 => { /* ... */ },
ResourceType::WorkSpacesConnectionAlias => { /* ... */ },
ResourceType::WorkSpacesWorkspace => { /* ... */ },
ResourceType::EncryptionConfig => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when resourcetype represents
NewFeature, the execution path will lead to the second last match arm,
even though the enum does not contain a variant ResourceType::NewFeature
in the current version of SDK. The reason is that the variable other,
created by the @ operator, is bound to
ResourceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))
and calling as_str on it yields "NewFeature".
This match expression is forward-compatible when executed with a newer
version of SDK where the variant ResourceType::NewFeature is defined.
Specifically, when resourcetype represents NewFeature,
the execution path will hit the second last match arm as before by virtue of
calling as_str on ResourceType::NewFeature also yielding "NewFeature".
Explicitly matching on the Unknown variant should
be avoided for two reasons:
- The inner data
UnknownVariantValueis opaque, and no further information can be extracted. - It might inadvertently shadow other intended match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Certificate
AccessAnalyzerAnalyzer
RestApi
Stage
Api
StageV2
AppConfigApplication
AppSyncGraphQlApi
AthenaDataCatalog
AthenaWorkGroup
AutoScalingGroup
LaunchConfiguration
ScalingPolicy
ScheduledAction
BackupPlan
BackupSelection
BackupVault
BackupRecoveryPoint
BatchComputeEnvironment
BatchJobQueue
Stack
Distribution
StreamingDistribution
Trail
Alarm
Project
CodeDeployApplication
CodeDeployDeploymentConfig
CodeDeployDeploymentGroup
Pipeline
ConformancePackCompliance
ResourceCompliance
DmsCertificate
DmsEventSubscription
DmsReplicationSubnetGroup
DataSyncLocationEfs
DataSyncLocationFSxLustre
DataSyncLocationNfs
DataSyncLocationS3
DataSyncLocationSmb
DataSyncTask
DetectiveGraph
Table
CustomerGateway
Eip
EgressOnlyInternetGateway
FlowLog
Host
Instance
InternetGateway
LaunchTemplate
NatGateway
NetworkAcl
NetworkInsightsAccessScopeAnalysis
NetworkInterface
RegisteredHaInstance
RouteTable
SecurityGroup
Subnet
TransitGateway
TransitGatewayAttachment
TransitGatewayRouteTable
Vpc
VpcEndpoint
VpcEndpointService
VpcPeeringConnection
VpnConnection
VpnGateway
Volume
EcrPublicRepository
EcrRepository
EcsCluster
EcsService
EcsTaskDefinition
EfsAccessPoint
EfsFileSystem
EksCluster
EksFargateProfile
EmrSecurityConfiguration
Application
ApplicationVersion
Environment
LoadBalancer
ListenerV2
LoadBalancerV2
Domain
GlobalAcceleratorAccelerator
GlobalAcceleratorEndpointGroup
GlobalAcceleratorListener
GlueJob
GuardDutyDetector
GuardDutyIpSet
GuardDutyThreatIntelSet
Group
Policy
Role
User
Key
KinesisStream
KinesisStreamConsumer
Function
MskCluster
NetworkFirewallFirewall
NetworkFirewallFirewallPolicy
NetworkFirewallRuleGroup
OpenSearchDomain
QldbLedger
DbCluster
DbClusterSnapshot
DbInstance
DbSecurityGroup
DbSnapshot
DbSubnetGroup
EventSubscription
Cluster
ClusterParameterGroup
ClusterSecurityGroup
ClusterSnapshot
ClusterSubnetGroup
RedshiftEventSubscription
Route53HostedZone
Route53ResolverResolverEndpoint
Route53ResolverResolverRule
Route53ResolverResolverRuleAssociation
AccountPublicAccessBlock
Bucket
SesConfigurationSet
SesContactList
Topic
Queue
AssociationCompliance
FileData
ManagedInstanceInventory
PatchCompliance
SageMakerCodeRepository
SageMakerModel
SageMakerNotebookInstanceLifecycleConfig
SageMakerWorkteam
Secret
CloudFormationProduct
CloudFormationProvisionedProduct
Portfolio
ServiceDiscoveryPublicDnsNamespace
ServiceDiscoveryService
Protection
RegionalProtection
StepFunctionsActivity
StepFunctionsStateMachine
RateBasedRule
Rule
RuleGroup
WebAcl
RegionalRateBasedRule
RegionalRule
RegionalRuleGroup
RegionalWebAcl
IpSetV2
ManagedRuleSetV2
RegexPatternSetV2
RuleGroupV2
WebAclv2
WorkSpacesConnectionAlias
WorkSpacesWorkspace
EncryptionConfig
Unknown(UnknownVariantValue)
Unknown contains new variants that have been added since this code was generated.
Implementations§
Trait Implementations§
source§impl AsRef<str> for ResourceType
impl AsRef<str> for ResourceType
source§impl Clone for ResourceType
impl Clone for ResourceType
source§fn clone(&self) -> ResourceType
fn clone(&self) -> ResourceType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ResourceType
impl Debug for ResourceType
source§impl From<&str> for ResourceType
impl From<&str> for ResourceType
source§impl FromStr for ResourceType
impl FromStr for ResourceType
source§impl Hash for ResourceType
impl Hash for ResourceType
source§impl Ord for ResourceType
impl Ord for ResourceType
source§fn cmp(&self, other: &ResourceType) -> Ordering
fn cmp(&self, other: &ResourceType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<ResourceType> for ResourceType
impl PartialEq<ResourceType> for ResourceType
source§fn eq(&self, other: &ResourceType) -> bool
fn eq(&self, other: &ResourceType) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd<ResourceType> for ResourceType
impl PartialOrd<ResourceType> for ResourceType
source§fn partial_cmp(&self, other: &ResourceType) -> Option<Ordering>
fn partial_cmp(&self, other: &ResourceType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moreimpl Eq for ResourceType
impl StructuralEq for ResourceType
impl StructuralPartialEq for ResourceType
Auto Trait Implementations§
impl RefUnwindSafe for ResourceType
impl Send for ResourceType
impl Sync for ResourceType
impl Unpin for ResourceType
impl UnwindSafe for ResourceType
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.