Skip to main content

RustackCloudFront

Struct RustackCloudFront 

Source
pub struct RustackCloudFront { /* private fields */ }
Expand description

Main provider.

Implementations§

Source§

impl RustackCloudFront

Source

pub fn new(config: CloudFrontConfig) -> Self

Build a new provider with managed policies pre-seeded.

Source

pub fn store(&self) -> &Arc<CloudFrontStore>

Shared store handle.

Source

pub fn config(&self) -> &CloudFrontConfig

Runtime configuration.

Source

pub fn create_distribution( self: &Arc<Self>, config: DistributionConfig, tags: TagSet, ) -> Result<Distribution, CloudFrontError>

CreateDistribution / CreateDistributionWithTags.

Source

pub fn get_distribution( &self, id: &str, ) -> Result<Distribution, CloudFrontError>

GetDistribution returns the full Distribution record.

Source

pub fn update_distribution( self: &Arc<Self>, id: &str, if_match: Option<&str>, new_config: DistributionConfig, ) -> Result<Distribution, CloudFrontError>

UpdateDistribution.

Source

pub fn delete_distribution( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteDistribution.

Source

pub fn list_distributions(&self) -> Vec<Distribution>

ListDistributions (unpaginated — Rustack scale makes this fine).

Source

pub fn copy_distribution( self: &Arc<Self>, primary_id: &str, caller_reference: &str, staging: bool, ) -> Result<Distribution, CloudFrontError>

CopyDistribution: clone an existing distribution under a new ID.

Source

pub fn create_invalidation( self: &Arc<Self>, distribution_id: &str, batch: InvalidationBatch, ) -> Result<Invalidation, CloudFrontError>

CreateInvalidation.

Source

pub fn get_invalidation( &self, distribution_id: &str, invalidation_id: &str, ) -> Result<Invalidation, CloudFrontError>

GetInvalidation.

Source

pub fn list_invalidations(&self, distribution_id: &str) -> Vec<Invalidation>

ListInvalidations for a distribution.

Source

pub fn create_oac( &self, cfg: OriginAccessControlConfig, ) -> Result<OriginAccessControl, CloudFrontError>

CreateOriginAccessControl.

Source

pub fn get_oac(&self, id: &str) -> Result<OriginAccessControl, CloudFrontError>

GetOriginAccessControl.

Source

pub fn update_oac( &self, id: &str, if_match: Option<&str>, cfg: OriginAccessControlConfig, ) -> Result<OriginAccessControl, CloudFrontError>

UpdateOriginAccessControl.

Source

pub fn delete_oac( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteOriginAccessControl.

Source

pub fn list_oacs(&self) -> Vec<OriginAccessControl>

ListOriginAccessControls.

Source

pub fn create_oai( &self, cfg: CloudFrontOriginAccessIdentityConfig, ) -> Result<CloudFrontOriginAccessIdentity, CloudFrontError>

CreateCloudFrontOriginAccessIdentity.

Source

pub fn get_oai( &self, id: &str, ) -> Result<CloudFrontOriginAccessIdentity, CloudFrontError>

GetCloudFrontOriginAccessIdentity.

Source

pub fn update_oai( &self, id: &str, if_match: Option<&str>, cfg: CloudFrontOriginAccessIdentityConfig, ) -> Result<CloudFrontOriginAccessIdentity, CloudFrontError>

UpdateCloudFrontOriginAccessIdentity.

Source

pub fn delete_oai( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteCloudFrontOriginAccessIdentity.

Source

pub fn list_oais(&self) -> Vec<CloudFrontOriginAccessIdentity>

ListCloudFrontOriginAccessIdentities.

Source

pub fn create_cache_policy( &self, cfg: CachePolicyConfig, ) -> Result<CachePolicy, CloudFrontError>

CreateCachePolicy.

Source

pub fn get_cache_policy(&self, id: &str) -> Result<CachePolicy, CloudFrontError>

GetCachePolicy.

Source

pub fn update_cache_policy( &self, id: &str, if_match: Option<&str>, cfg: CachePolicyConfig, ) -> Result<CachePolicy, CloudFrontError>

UpdateCachePolicy — managed policies are immutable.

Source

pub fn delete_cache_policy( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteCachePolicy.

Source

pub fn list_cache_policies(&self) -> Vec<CachePolicy>

ListCachePolicies.

Source

pub fn create_origin_request_policy( &self, cfg: OriginRequestPolicyConfig, ) -> Result<OriginRequestPolicy, CloudFrontError>

CreateOriginRequestPolicy.

Source

pub fn get_origin_request_policy( &self, id: &str, ) -> Result<OriginRequestPolicy, CloudFrontError>

GetOriginRequestPolicy.

Source

pub fn update_origin_request_policy( &self, id: &str, if_match: Option<&str>, cfg: OriginRequestPolicyConfig, ) -> Result<OriginRequestPolicy, CloudFrontError>

UpdateOriginRequestPolicy.

Source

pub fn delete_origin_request_policy( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteOriginRequestPolicy.

Source

pub fn list_origin_request_policies(&self) -> Vec<OriginRequestPolicy>

ListOriginRequestPolicies.

Source

pub fn create_response_headers_policy( &self, cfg: ResponseHeadersPolicyConfig, ) -> Result<ResponseHeadersPolicy, CloudFrontError>

CreateResponseHeadersPolicy.

Source

pub fn get_response_headers_policy( &self, id: &str, ) -> Result<ResponseHeadersPolicy, CloudFrontError>

GetResponseHeadersPolicy.

Source

pub fn update_response_headers_policy( &self, id: &str, if_match: Option<&str>, cfg: ResponseHeadersPolicyConfig, ) -> Result<ResponseHeadersPolicy, CloudFrontError>

UpdateResponseHeadersPolicy.

Source

pub fn delete_response_headers_policy( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteResponseHeadersPolicy.

Source

pub fn list_response_headers_policies(&self) -> Vec<ResponseHeadersPolicy>

ListResponseHeadersPolicies.

Source

pub fn create_key_group( &self, cfg: KeyGroupConfig, ) -> Result<KeyGroup, CloudFrontError>

CreateKeyGroup.

Source

pub fn get_key_group(&self, id: &str) -> Result<KeyGroup, CloudFrontError>

GetKeyGroup.

Source

pub fn update_key_group( &self, id: &str, if_match: Option<&str>, cfg: KeyGroupConfig, ) -> Result<KeyGroup, CloudFrontError>

UpdateKeyGroup.

Source

pub fn delete_key_group( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteKeyGroup.

Source

pub fn list_key_groups(&self) -> Vec<KeyGroup>

ListKeyGroups.

Source

pub fn create_public_key( &self, cfg: PublicKeyConfig, ) -> Result<PublicKey, CloudFrontError>

CreatePublicKey.

Source

pub fn get_public_key(&self, id: &str) -> Result<PublicKey, CloudFrontError>

GetPublicKey.

Source

pub fn update_public_key( &self, id: &str, if_match: Option<&str>, cfg: PublicKeyConfig, ) -> Result<PublicKey, CloudFrontError>

UpdatePublicKey.

Source

pub fn delete_public_key( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeletePublicKey.

Source

pub fn list_public_keys(&self) -> Vec<PublicKey>

ListPublicKeys.

Source

pub fn create_function( &self, name: String, cfg: FunctionConfig, code: Vec<u8>, ) -> Result<CloudFrontFunction, CloudFrontError>

CreateFunction.

Source

pub fn get_function( &self, name: &str, ) -> Result<CloudFrontFunction, CloudFrontError>

DescribeFunction / GetFunction (code is the distinction — same storage).

Source

pub fn update_function( &self, name: &str, if_match: Option<&str>, cfg: FunctionConfig, code: Vec<u8>, ) -> Result<CloudFrontFunction, CloudFrontError>

UpdateFunction.

Source

pub fn delete_function( &self, name: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteFunction.

Source

pub fn publish_function( &self, name: &str, if_match: Option<&str>, ) -> Result<CloudFrontFunction, CloudFrontError>

PublishFunction: flips stage from DEVELOPMENT to LIVE.

Source

pub fn test_function( &self, name: &str, event_object: &[u8], ) -> Result<(Vec<u8>, String), CloudFrontError>

TestFunction: returns canned success.

Source

pub fn list_functions(&self) -> Vec<CloudFrontFunction>

ListFunctions.

Source

pub fn create_fle_config( &self, cfg: FieldLevelEncryptionConfig, ) -> Result<FieldLevelEncryption, CloudFrontError>

CreateFieldLevelEncryptionConfig.

Source

pub fn get_fle_config( &self, id: &str, ) -> Result<FieldLevelEncryption, CloudFrontError>

GetFieldLevelEncryption / GetFieldLevelEncryptionConfig.

Source

pub fn update_fle_config( &self, id: &str, if_match: Option<&str>, cfg: FieldLevelEncryptionConfig, ) -> Result<FieldLevelEncryption, CloudFrontError>

UpdateFieldLevelEncryptionConfig.

Source

pub fn delete_fle_config( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteFieldLevelEncryptionConfig.

Source

pub fn list_fle_configs(&self) -> Vec<FieldLevelEncryption>

ListFieldLevelEncryptionConfigs.

Source

pub fn create_fle_profile( &self, cfg: FieldLevelEncryptionProfileConfig, ) -> Result<FieldLevelEncryptionProfile, CloudFrontError>

CreateFieldLevelEncryptionProfile.

Source

pub fn get_fle_profile( &self, id: &str, ) -> Result<FieldLevelEncryptionProfile, CloudFrontError>

GetFieldLevelEncryptionProfile.

Source

pub fn update_fle_profile( &self, id: &str, if_match: Option<&str>, cfg: FieldLevelEncryptionProfileConfig, ) -> Result<FieldLevelEncryptionProfile, CloudFrontError>

UpdateFieldLevelEncryptionProfile.

Source

pub fn delete_fle_profile( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteFieldLevelEncryptionProfile.

Source

pub fn list_fle_profiles(&self) -> Vec<FieldLevelEncryptionProfile>

ListFieldLevelEncryptionProfiles.

Source

pub fn create_monitoring_subscription( &self, distribution_id: &str, enabled: bool, ) -> Result<MonitoringSubscription, CloudFrontError>

CreateMonitoringSubscription.

Source

pub fn get_monitoring_subscription( &self, distribution_id: &str, ) -> Result<MonitoringSubscription, CloudFrontError>

GetMonitoringSubscription.

Source

pub fn delete_monitoring_subscription( &self, distribution_id: &str, ) -> Result<(), CloudFrontError>

DeleteMonitoringSubscription.

Source

pub fn create_kvs( &self, name: String, comment: String, ) -> Result<KeyValueStore, CloudFrontError>

CreateKeyValueStore.

Source

pub fn get_kvs(&self, id: &str) -> Result<KeyValueStore, CloudFrontError>

DescribeKeyValueStore.

Source

pub fn update_kvs( &self, id: &str, if_match: Option<&str>, comment: String, ) -> Result<KeyValueStore, CloudFrontError>

UpdateKeyValueStore.

Source

pub fn delete_kvs( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>

DeleteKeyValueStore.

Source

pub fn list_kvs(&self) -> Vec<KeyValueStore>

ListKeyValueStores.

Source

pub fn create_realtime_log_config( &self, cfg: RealtimeLogConfig, ) -> Result<RealtimeLogConfig, CloudFrontError>

CreateRealtimeLogConfig.

Source

pub fn get_realtime_log_config( &self, name: &str, ) -> Result<RealtimeLogConfig, CloudFrontError>

GetRealtimeLogConfig.

Source

pub fn update_realtime_log_config( &self, cfg: RealtimeLogConfig, ) -> Result<RealtimeLogConfig, CloudFrontError>

UpdateRealtimeLogConfig.

Source

pub fn delete_realtime_log_config( &self, name: &str, ) -> Result<(), CloudFrontError>

DeleteRealtimeLogConfig.

Source

pub fn list_realtime_log_configs(&self) -> Vec<RealtimeLogConfig>

ListRealtimeLogConfigs.

Source

pub fn tag_resource( &self, arn: &str, new_tags: &[Tag], ) -> Result<(), CloudFrontError>

TagResource.

Source

pub fn untag_resource( &self, arn: &str, keys: &[String], ) -> Result<(), CloudFrontError>

UntagResource.

Source

pub fn list_tags_for_resource( &self, arn: &str, ) -> Result<TagSet, CloudFrontError>

ListTagsForResource.

Trait Implementations§

Source§

impl Debug for RustackCloudFront

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more