pub struct AcmService { /* private fields */ }Implementations§
Source§impl AcmService
impl AcmService
pub fn new(state: SharedAcmState) -> Self
Sourcepub fn with_pending_validation_delay(self, delay: Duration) -> Self
pub fn with_pending_validation_delay(self, delay: Duration) -> Self
Override the auto-issue delay. Used by unit tests so they don’t
have to wait wall-clock seconds for the tick to flip
PENDING_VALIDATION -> ISSUED.
Sourcepub fn approve_certificate(&self, arn_or_id: &str) -> bool
pub fn approve_certificate(&self, arn_or_id: &str) -> bool
Synchronously approve a PENDING_VALIDATION certificate.
Mirrors the admin endpoint
POST /_fakecloud/acm/certificates/{arn-or-id}/approve — equivalent
to the user clicking the approval link in the validation email
(or in the case of DNS, the validation record landing). Returns
false if no certificate matches arn_or_id across any
account. Already-issued certs are left alone (returns true)
so the endpoint is idempotent.
Sourcepub fn chain_info(&self, arn_or_id: &str) -> Option<Value>
pub fn chain_info(&self, arn_or_id: &str) -> Option<Value>
Return parsed-on-best-effort structural info about an imported
certificate + chain, surfaced via
/_fakecloud/acm/certificates/{arn-or-id}/chain-info so tests can
assert what fakecloud actually accepted at ImportCertificate.
We deliberately do not anchor the chain to a real root —
fakecloud is not a PKI. The returned JSON exposes the PEM block
counts and byte lengths so callers can confirm we received the
chain they expected, plus an external_ca_validated: false
marker that documents the emulator gap.
Sourcepub fn set_certificate_status(
&self,
arn_or_id: &str,
status: &str,
reason: Option<String>,
) -> bool
pub fn set_certificate_status( &self, arn_or_id: &str, status: &str, reason: Option<String>, ) -> bool
Flip a stored certificate’s status (and optionally a failure
reason). Returns false if no certificate matches arn_or_id
across any account. The admin endpoint POST /_fakecloud/acm/certificates/{arn-or-id}/status calls this so
tests can synchronously force a cert into ISSUED, FAILED, or
VALIDATION_TIMED_OUT without waiting on the auto-issue tick.
arn_or_id accepts either a full ACM ARN or just the
trailing UUID portion (everything after certificate/).
Trait Implementations§
Source§impl AwsService for AcmService
impl AwsService for AcmService
Source§fn service_name(&self) -> &str
fn service_name(&self) -> &str
Source§fn supported_actions(&self) -> &[&str]
fn supported_actions(&self) -> &[&str]
Source§fn handle<'life0, 'async_trait>(
&'life0 self,
req: AwsRequest,
) -> Pin<Box<dyn Future<Output = Result<AwsResponse, AwsServiceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
req: AwsRequest,
) -> Pin<Box<dyn Future<Output = Result<AwsResponse, AwsServiceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn iam_enforceable(&self) -> bool
fn iam_enforceable(&self) -> bool
FAKECLOUD_IAM=soft|strict). Read moreSource§fn iam_action_for(&self, _request: &AwsRequest) -> Option<IamAction>
fn iam_action_for(&self, _request: &AwsRequest) -> Option<IamAction>
Source§fn iam_condition_keys_for(
&self,
_request: &AwsRequest,
_action: &IamAction,
) -> BTreeMap<String, Vec<String>>
fn iam_condition_keys_for( &self, _request: &AwsRequest, _action: &IamAction, ) -> BTreeMap<String, Vec<String>>
resource_arn. Read morex-amz-tagging, TagResource). Read more