pub struct RustackCloudFront { /* private fields */ }Expand description
Main provider.
Implementations§
Source§impl RustackCloudFront
impl RustackCloudFront
Sourcepub fn new(config: CloudFrontConfig) -> Self
pub fn new(config: CloudFrontConfig) -> Self
Build a new provider with managed policies pre-seeded.
Sourcepub fn store(&self) -> &Arc<CloudFrontStore>
pub fn store(&self) -> &Arc<CloudFrontStore>
Shared store handle.
Sourcepub fn config(&self) -> &CloudFrontConfig
pub fn config(&self) -> &CloudFrontConfig
Runtime configuration.
Sourcepub fn create_distribution(
self: &Arc<Self>,
config: DistributionConfig,
tags: TagSet,
) -> Result<Distribution, CloudFrontError>
pub fn create_distribution( self: &Arc<Self>, config: DistributionConfig, tags: TagSet, ) -> Result<Distribution, CloudFrontError>
CreateDistribution / CreateDistributionWithTags.
Sourcepub fn get_distribution(
&self,
id: &str,
) -> Result<Distribution, CloudFrontError>
pub fn get_distribution( &self, id: &str, ) -> Result<Distribution, CloudFrontError>
GetDistribution returns the full Distribution record.
Sourcepub fn update_distribution(
self: &Arc<Self>,
id: &str,
if_match: Option<&str>,
new_config: DistributionConfig,
) -> Result<Distribution, CloudFrontError>
pub fn update_distribution( self: &Arc<Self>, id: &str, if_match: Option<&str>, new_config: DistributionConfig, ) -> Result<Distribution, CloudFrontError>
UpdateDistribution.
Sourcepub fn delete_distribution(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_distribution( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteDistribution.
Sourcepub fn list_distributions(&self) -> Vec<Distribution>
pub fn list_distributions(&self) -> Vec<Distribution>
ListDistributions (unpaginated — Rustack scale makes this fine).
Sourcepub fn copy_distribution(
self: &Arc<Self>,
primary_id: &str,
caller_reference: &str,
staging: bool,
) -> Result<Distribution, CloudFrontError>
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.
Sourcepub fn create_invalidation(
self: &Arc<Self>,
distribution_id: &str,
batch: InvalidationBatch,
) -> Result<Invalidation, CloudFrontError>
pub fn create_invalidation( self: &Arc<Self>, distribution_id: &str, batch: InvalidationBatch, ) -> Result<Invalidation, CloudFrontError>
CreateInvalidation.
Sourcepub fn get_invalidation(
&self,
distribution_id: &str,
invalidation_id: &str,
) -> Result<Invalidation, CloudFrontError>
pub fn get_invalidation( &self, distribution_id: &str, invalidation_id: &str, ) -> Result<Invalidation, CloudFrontError>
GetInvalidation.
Sourcepub fn list_invalidations(&self, distribution_id: &str) -> Vec<Invalidation>
pub fn list_invalidations(&self, distribution_id: &str) -> Vec<Invalidation>
ListInvalidations for a distribution.
Sourcepub fn create_oac(
&self,
cfg: OriginAccessControlConfig,
) -> Result<OriginAccessControl, CloudFrontError>
pub fn create_oac( &self, cfg: OriginAccessControlConfig, ) -> Result<OriginAccessControl, CloudFrontError>
CreateOriginAccessControl.
Sourcepub fn get_oac(&self, id: &str) -> Result<OriginAccessControl, CloudFrontError>
pub fn get_oac(&self, id: &str) -> Result<OriginAccessControl, CloudFrontError>
GetOriginAccessControl.
Sourcepub fn update_oac(
&self,
id: &str,
if_match: Option<&str>,
cfg: OriginAccessControlConfig,
) -> Result<OriginAccessControl, CloudFrontError>
pub fn update_oac( &self, id: &str, if_match: Option<&str>, cfg: OriginAccessControlConfig, ) -> Result<OriginAccessControl, CloudFrontError>
UpdateOriginAccessControl.
Sourcepub fn delete_oac(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_oac( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteOriginAccessControl.
Sourcepub fn list_oacs(&self) -> Vec<OriginAccessControl>
pub fn list_oacs(&self) -> Vec<OriginAccessControl>
ListOriginAccessControls.
Sourcepub fn create_oai(
&self,
cfg: CloudFrontOriginAccessIdentityConfig,
) -> Result<CloudFrontOriginAccessIdentity, CloudFrontError>
pub fn create_oai( &self, cfg: CloudFrontOriginAccessIdentityConfig, ) -> Result<CloudFrontOriginAccessIdentity, CloudFrontError>
CreateCloudFrontOriginAccessIdentity.
Sourcepub fn get_oai(
&self,
id: &str,
) -> Result<CloudFrontOriginAccessIdentity, CloudFrontError>
pub fn get_oai( &self, id: &str, ) -> Result<CloudFrontOriginAccessIdentity, CloudFrontError>
GetCloudFrontOriginAccessIdentity.
Sourcepub fn update_oai(
&self,
id: &str,
if_match: Option<&str>,
cfg: CloudFrontOriginAccessIdentityConfig,
) -> Result<CloudFrontOriginAccessIdentity, CloudFrontError>
pub fn update_oai( &self, id: &str, if_match: Option<&str>, cfg: CloudFrontOriginAccessIdentityConfig, ) -> Result<CloudFrontOriginAccessIdentity, CloudFrontError>
UpdateCloudFrontOriginAccessIdentity.
Sourcepub fn delete_oai(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_oai( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteCloudFrontOriginAccessIdentity.
Sourcepub fn list_oais(&self) -> Vec<CloudFrontOriginAccessIdentity>
pub fn list_oais(&self) -> Vec<CloudFrontOriginAccessIdentity>
ListCloudFrontOriginAccessIdentities.
Sourcepub fn create_cache_policy(
&self,
cfg: CachePolicyConfig,
) -> Result<CachePolicy, CloudFrontError>
pub fn create_cache_policy( &self, cfg: CachePolicyConfig, ) -> Result<CachePolicy, CloudFrontError>
CreateCachePolicy.
Sourcepub fn get_cache_policy(&self, id: &str) -> Result<CachePolicy, CloudFrontError>
pub fn get_cache_policy(&self, id: &str) -> Result<CachePolicy, CloudFrontError>
GetCachePolicy.
Sourcepub fn update_cache_policy(
&self,
id: &str,
if_match: Option<&str>,
cfg: CachePolicyConfig,
) -> Result<CachePolicy, CloudFrontError>
pub fn update_cache_policy( &self, id: &str, if_match: Option<&str>, cfg: CachePolicyConfig, ) -> Result<CachePolicy, CloudFrontError>
UpdateCachePolicy — managed policies are immutable.
Sourcepub fn delete_cache_policy(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_cache_policy( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteCachePolicy.
Sourcepub fn list_cache_policies(&self) -> Vec<CachePolicy>
pub fn list_cache_policies(&self) -> Vec<CachePolicy>
ListCachePolicies.
Sourcepub fn create_origin_request_policy(
&self,
cfg: OriginRequestPolicyConfig,
) -> Result<OriginRequestPolicy, CloudFrontError>
pub fn create_origin_request_policy( &self, cfg: OriginRequestPolicyConfig, ) -> Result<OriginRequestPolicy, CloudFrontError>
CreateOriginRequestPolicy.
Sourcepub fn get_origin_request_policy(
&self,
id: &str,
) -> Result<OriginRequestPolicy, CloudFrontError>
pub fn get_origin_request_policy( &self, id: &str, ) -> Result<OriginRequestPolicy, CloudFrontError>
GetOriginRequestPolicy.
Sourcepub fn update_origin_request_policy(
&self,
id: &str,
if_match: Option<&str>,
cfg: OriginRequestPolicyConfig,
) -> Result<OriginRequestPolicy, CloudFrontError>
pub fn update_origin_request_policy( &self, id: &str, if_match: Option<&str>, cfg: OriginRequestPolicyConfig, ) -> Result<OriginRequestPolicy, CloudFrontError>
UpdateOriginRequestPolicy.
Sourcepub fn delete_origin_request_policy(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_origin_request_policy( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteOriginRequestPolicy.
Sourcepub fn list_origin_request_policies(&self) -> Vec<OriginRequestPolicy>
pub fn list_origin_request_policies(&self) -> Vec<OriginRequestPolicy>
ListOriginRequestPolicies.
Sourcepub fn create_response_headers_policy(
&self,
cfg: ResponseHeadersPolicyConfig,
) -> Result<ResponseHeadersPolicy, CloudFrontError>
pub fn create_response_headers_policy( &self, cfg: ResponseHeadersPolicyConfig, ) -> Result<ResponseHeadersPolicy, CloudFrontError>
CreateResponseHeadersPolicy.
Sourcepub fn get_response_headers_policy(
&self,
id: &str,
) -> Result<ResponseHeadersPolicy, CloudFrontError>
pub fn get_response_headers_policy( &self, id: &str, ) -> Result<ResponseHeadersPolicy, CloudFrontError>
GetResponseHeadersPolicy.
Sourcepub fn update_response_headers_policy(
&self,
id: &str,
if_match: Option<&str>,
cfg: ResponseHeadersPolicyConfig,
) -> Result<ResponseHeadersPolicy, CloudFrontError>
pub fn update_response_headers_policy( &self, id: &str, if_match: Option<&str>, cfg: ResponseHeadersPolicyConfig, ) -> Result<ResponseHeadersPolicy, CloudFrontError>
UpdateResponseHeadersPolicy.
Sourcepub fn delete_response_headers_policy(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_response_headers_policy( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteResponseHeadersPolicy.
Sourcepub fn list_response_headers_policies(&self) -> Vec<ResponseHeadersPolicy>
pub fn list_response_headers_policies(&self) -> Vec<ResponseHeadersPolicy>
ListResponseHeadersPolicies.
Sourcepub fn create_key_group(
&self,
cfg: KeyGroupConfig,
) -> Result<KeyGroup, CloudFrontError>
pub fn create_key_group( &self, cfg: KeyGroupConfig, ) -> Result<KeyGroup, CloudFrontError>
CreateKeyGroup.
Sourcepub fn get_key_group(&self, id: &str) -> Result<KeyGroup, CloudFrontError>
pub fn get_key_group(&self, id: &str) -> Result<KeyGroup, CloudFrontError>
GetKeyGroup.
Sourcepub fn update_key_group(
&self,
id: &str,
if_match: Option<&str>,
cfg: KeyGroupConfig,
) -> Result<KeyGroup, CloudFrontError>
pub fn update_key_group( &self, id: &str, if_match: Option<&str>, cfg: KeyGroupConfig, ) -> Result<KeyGroup, CloudFrontError>
UpdateKeyGroup.
Sourcepub fn delete_key_group(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_key_group( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteKeyGroup.
Sourcepub fn list_key_groups(&self) -> Vec<KeyGroup>
pub fn list_key_groups(&self) -> Vec<KeyGroup>
ListKeyGroups.
Sourcepub fn create_public_key(
&self,
cfg: PublicKeyConfig,
) -> Result<PublicKey, CloudFrontError>
pub fn create_public_key( &self, cfg: PublicKeyConfig, ) -> Result<PublicKey, CloudFrontError>
CreatePublicKey.
Sourcepub fn get_public_key(&self, id: &str) -> Result<PublicKey, CloudFrontError>
pub fn get_public_key(&self, id: &str) -> Result<PublicKey, CloudFrontError>
GetPublicKey.
Sourcepub fn update_public_key(
&self,
id: &str,
if_match: Option<&str>,
cfg: PublicKeyConfig,
) -> Result<PublicKey, CloudFrontError>
pub fn update_public_key( &self, id: &str, if_match: Option<&str>, cfg: PublicKeyConfig, ) -> Result<PublicKey, CloudFrontError>
UpdatePublicKey.
Sourcepub fn delete_public_key(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_public_key( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeletePublicKey.
Sourcepub fn list_public_keys(&self) -> Vec<PublicKey>
pub fn list_public_keys(&self) -> Vec<PublicKey>
ListPublicKeys.
Sourcepub fn create_function(
&self,
name: String,
cfg: FunctionConfig,
code: Vec<u8>,
) -> Result<CloudFrontFunction, CloudFrontError>
pub fn create_function( &self, name: String, cfg: FunctionConfig, code: Vec<u8>, ) -> Result<CloudFrontFunction, CloudFrontError>
CreateFunction.
Sourcepub fn get_function(
&self,
name: &str,
) -> Result<CloudFrontFunction, CloudFrontError>
pub fn get_function( &self, name: &str, ) -> Result<CloudFrontFunction, CloudFrontError>
DescribeFunction / GetFunction (code is the distinction — same storage).
Sourcepub fn update_function(
&self,
name: &str,
if_match: Option<&str>,
cfg: FunctionConfig,
code: Vec<u8>,
) -> Result<CloudFrontFunction, CloudFrontError>
pub fn update_function( &self, name: &str, if_match: Option<&str>, cfg: FunctionConfig, code: Vec<u8>, ) -> Result<CloudFrontFunction, CloudFrontError>
UpdateFunction.
Sourcepub fn delete_function(
&self,
name: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_function( &self, name: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteFunction.
Sourcepub fn publish_function(
&self,
name: &str,
if_match: Option<&str>,
) -> Result<CloudFrontFunction, CloudFrontError>
pub fn publish_function( &self, name: &str, if_match: Option<&str>, ) -> Result<CloudFrontFunction, CloudFrontError>
PublishFunction: flips stage from DEVELOPMENT to LIVE.
Sourcepub fn test_function(
&self,
name: &str,
event_object: &[u8],
) -> Result<(Vec<u8>, String), CloudFrontError>
pub fn test_function( &self, name: &str, event_object: &[u8], ) -> Result<(Vec<u8>, String), CloudFrontError>
TestFunction: returns canned success.
Sourcepub fn list_functions(&self) -> Vec<CloudFrontFunction>
pub fn list_functions(&self) -> Vec<CloudFrontFunction>
ListFunctions.
Sourcepub fn create_fle_config(
&self,
cfg: FieldLevelEncryptionConfig,
) -> Result<FieldLevelEncryption, CloudFrontError>
pub fn create_fle_config( &self, cfg: FieldLevelEncryptionConfig, ) -> Result<FieldLevelEncryption, CloudFrontError>
CreateFieldLevelEncryptionConfig.
Sourcepub fn get_fle_config(
&self,
id: &str,
) -> Result<FieldLevelEncryption, CloudFrontError>
pub fn get_fle_config( &self, id: &str, ) -> Result<FieldLevelEncryption, CloudFrontError>
GetFieldLevelEncryption / GetFieldLevelEncryptionConfig.
Sourcepub fn update_fle_config(
&self,
id: &str,
if_match: Option<&str>,
cfg: FieldLevelEncryptionConfig,
) -> Result<FieldLevelEncryption, CloudFrontError>
pub fn update_fle_config( &self, id: &str, if_match: Option<&str>, cfg: FieldLevelEncryptionConfig, ) -> Result<FieldLevelEncryption, CloudFrontError>
UpdateFieldLevelEncryptionConfig.
Sourcepub fn delete_fle_config(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_fle_config( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteFieldLevelEncryptionConfig.
Sourcepub fn list_fle_configs(&self) -> Vec<FieldLevelEncryption>
pub fn list_fle_configs(&self) -> Vec<FieldLevelEncryption>
ListFieldLevelEncryptionConfigs.
Sourcepub fn create_fle_profile(
&self,
cfg: FieldLevelEncryptionProfileConfig,
) -> Result<FieldLevelEncryptionProfile, CloudFrontError>
pub fn create_fle_profile( &self, cfg: FieldLevelEncryptionProfileConfig, ) -> Result<FieldLevelEncryptionProfile, CloudFrontError>
CreateFieldLevelEncryptionProfile.
Sourcepub fn get_fle_profile(
&self,
id: &str,
) -> Result<FieldLevelEncryptionProfile, CloudFrontError>
pub fn get_fle_profile( &self, id: &str, ) -> Result<FieldLevelEncryptionProfile, CloudFrontError>
GetFieldLevelEncryptionProfile.
Sourcepub fn update_fle_profile(
&self,
id: &str,
if_match: Option<&str>,
cfg: FieldLevelEncryptionProfileConfig,
) -> Result<FieldLevelEncryptionProfile, CloudFrontError>
pub fn update_fle_profile( &self, id: &str, if_match: Option<&str>, cfg: FieldLevelEncryptionProfileConfig, ) -> Result<FieldLevelEncryptionProfile, CloudFrontError>
UpdateFieldLevelEncryptionProfile.
Sourcepub fn delete_fle_profile(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_fle_profile( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteFieldLevelEncryptionProfile.
Sourcepub fn list_fle_profiles(&self) -> Vec<FieldLevelEncryptionProfile>
pub fn list_fle_profiles(&self) -> Vec<FieldLevelEncryptionProfile>
ListFieldLevelEncryptionProfiles.
Sourcepub fn create_monitoring_subscription(
&self,
distribution_id: &str,
enabled: bool,
) -> Result<MonitoringSubscription, CloudFrontError>
pub fn create_monitoring_subscription( &self, distribution_id: &str, enabled: bool, ) -> Result<MonitoringSubscription, CloudFrontError>
CreateMonitoringSubscription.
Sourcepub fn get_monitoring_subscription(
&self,
distribution_id: &str,
) -> Result<MonitoringSubscription, CloudFrontError>
pub fn get_monitoring_subscription( &self, distribution_id: &str, ) -> Result<MonitoringSubscription, CloudFrontError>
GetMonitoringSubscription.
Sourcepub fn delete_monitoring_subscription(
&self,
distribution_id: &str,
) -> Result<(), CloudFrontError>
pub fn delete_monitoring_subscription( &self, distribution_id: &str, ) -> Result<(), CloudFrontError>
DeleteMonitoringSubscription.
Sourcepub fn create_kvs(
&self,
name: String,
comment: String,
) -> Result<KeyValueStore, CloudFrontError>
pub fn create_kvs( &self, name: String, comment: String, ) -> Result<KeyValueStore, CloudFrontError>
CreateKeyValueStore.
Sourcepub fn get_kvs(&self, id: &str) -> Result<KeyValueStore, CloudFrontError>
pub fn get_kvs(&self, id: &str) -> Result<KeyValueStore, CloudFrontError>
DescribeKeyValueStore.
Sourcepub fn update_kvs(
&self,
id: &str,
if_match: Option<&str>,
comment: String,
) -> Result<KeyValueStore, CloudFrontError>
pub fn update_kvs( &self, id: &str, if_match: Option<&str>, comment: String, ) -> Result<KeyValueStore, CloudFrontError>
UpdateKeyValueStore.
Sourcepub fn delete_kvs(
&self,
id: &str,
if_match: Option<&str>,
) -> Result<(), CloudFrontError>
pub fn delete_kvs( &self, id: &str, if_match: Option<&str>, ) -> Result<(), CloudFrontError>
DeleteKeyValueStore.
Sourcepub fn list_kvs(&self) -> Vec<KeyValueStore>
pub fn list_kvs(&self) -> Vec<KeyValueStore>
ListKeyValueStores.
Sourcepub fn create_realtime_log_config(
&self,
cfg: RealtimeLogConfig,
) -> Result<RealtimeLogConfig, CloudFrontError>
pub fn create_realtime_log_config( &self, cfg: RealtimeLogConfig, ) -> Result<RealtimeLogConfig, CloudFrontError>
CreateRealtimeLogConfig.
Sourcepub fn get_realtime_log_config(
&self,
name: &str,
) -> Result<RealtimeLogConfig, CloudFrontError>
pub fn get_realtime_log_config( &self, name: &str, ) -> Result<RealtimeLogConfig, CloudFrontError>
GetRealtimeLogConfig.
Sourcepub fn update_realtime_log_config(
&self,
cfg: RealtimeLogConfig,
) -> Result<RealtimeLogConfig, CloudFrontError>
pub fn update_realtime_log_config( &self, cfg: RealtimeLogConfig, ) -> Result<RealtimeLogConfig, CloudFrontError>
UpdateRealtimeLogConfig.
Sourcepub fn delete_realtime_log_config(
&self,
name: &str,
) -> Result<(), CloudFrontError>
pub fn delete_realtime_log_config( &self, name: &str, ) -> Result<(), CloudFrontError>
DeleteRealtimeLogConfig.
Sourcepub fn list_realtime_log_configs(&self) -> Vec<RealtimeLogConfig>
pub fn list_realtime_log_configs(&self) -> Vec<RealtimeLogConfig>
ListRealtimeLogConfigs.
Sourcepub fn tag_resource(
&self,
arn: &str,
new_tags: &[Tag],
) -> Result<(), CloudFrontError>
pub fn tag_resource( &self, arn: &str, new_tags: &[Tag], ) -> Result<(), CloudFrontError>
TagResource.
Sourcepub fn untag_resource(
&self,
arn: &str,
keys: &[String],
) -> Result<(), CloudFrontError>
pub fn untag_resource( &self, arn: &str, keys: &[String], ) -> Result<(), CloudFrontError>
UntagResource.
ListTagsForResource.