Skip to contents

This is the Amazon CloudFront API Reference. This guide is for developers who need detailed information about CloudFront API actions, data types, and errors. For detailed information about CloudFront features, see the Amazon CloudFront Developer Guide.

Usage

cloudfront(
  config = list(),
  credentials = list(),
  endpoint = NULL,
  region = NULL
)

Arguments

config

Optional configuration of credentials, endpoint, and/or region.

  • credentials:

    • creds:

      • access_key_id: AWS access key ID

      • secret_access_key: AWS secret access key

      • session_token: AWS temporary session token

    • profile: The name of a profile to use. If not given, then the default profile is used.

    • anonymous: Set anonymous credentials.

  • endpoint: The complete URL to use for the constructed client.

  • region: The AWS Region used in instantiating the client.

  • close_connection: Immediately close all HTTP connections.

  • timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

  • s3_force_path_style: Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

  • sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

credentials

Optional credentials shorthand for the config parameter

  • creds:

    • access_key_id: AWS access key ID

    • secret_access_key: AWS secret access key

    • session_token: AWS temporary session token

  • profile: The name of a profile to use. If not given, then the default profile is used.

  • anonymous: Set anonymous credentials.

endpoint

Optional shorthand for complete URL to use for the constructed client.

region

Optional shorthand for AWS Region used in instantiating the client.

Value

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- cloudfront(
  config = list(
    credentials = list(
      creds = list(
        access_key_id = "string",
        secret_access_key = "string",
        session_token = "string"
      ),
      profile = "string",
      anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
      access_key_id = "string",
      secret_access_key = "string",
      session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

associate_aliasThe AssociateAlias API operation only supports standard distributions
associate_distribution_tenant_web_aclAssociates the WAF web ACL with a distribution tenant
associate_distribution_web_aclAssociates the WAF web ACL with a distribution
copy_distributionCreates a staging distribution using the configuration of the provided primary distribution
create_anycast_ip_listCreates an Anycast static IP list
create_cache_policyCreates a cache policy
create_cloud_front_origin_access_identityCreates a new origin access identity
create_connection_functionCreates a connection function
create_connection_groupCreates a connection group
create_continuous_deployment_policyCreates a continuous deployment policy that distributes traffic for a custom domain name to two different CloudFront distributions
create_distributionCreates a CloudFront distribution
create_distribution_tenantCreates a distribution tenant
create_distribution_with_tagsCreate a new distribution with tags
create_field_level_encryption_configCreate a new field-level encryption configuration
create_field_level_encryption_profileCreate a field-level encryption profile
create_functionCreates a CloudFront function
create_invalidationCreate a new invalidation
create_invalidation_for_distribution_tenantCreates an invalidation for a distribution tenant
create_key_groupCreates a key group that you can use with CloudFront signed URLs and signed cookies
create_key_value_storeSpecifies the key value store resource to add to your account
create_monitoring_subscriptionEnables or disables additional Amazon CloudWatch metrics for the specified CloudFront distribution
create_origin_access_controlCreates a new origin access control in CloudFront
create_origin_request_policyCreates an origin request policy
create_public_keyUploads a public key to CloudFront that you can use with signed URLs and signed cookies, or with field-level encryption
create_realtime_log_configCreates a real-time log configuration
create_response_headers_policyCreates a response headers policy
create_streaming_distributionThis API is deprecated
create_streaming_distribution_with_tagsThis API is deprecated
create_trust_storeCreates a trust store
create_vpc_originCreate an Amazon CloudFront VPC origin
delete_anycast_ip_listDeletes an Anycast static IP list
delete_cache_policyDeletes a cache policy
delete_cloud_front_origin_access_identityDelete an origin access identity
delete_connection_functionDeletes a connection function
delete_connection_groupDeletes a connection group
delete_continuous_deployment_policyDeletes a continuous deployment policy
delete_distributionDelete a distribution
delete_distribution_tenantDeletes a distribution tenant
delete_field_level_encryption_configRemove a field-level encryption configuration
delete_field_level_encryption_profileRemove a field-level encryption profile
delete_functionDeletes a CloudFront function
delete_key_groupDeletes a key group
delete_key_value_storeSpecifies the key value store to delete
delete_monitoring_subscriptionDisables additional CloudWatch metrics for the specified CloudFront distribution
delete_origin_access_controlDeletes a CloudFront origin access control
delete_origin_request_policyDeletes an origin request policy
delete_public_keyRemove a public key you previously added to CloudFront
delete_realtime_log_configDeletes a real-time log configuration
delete_resource_policyDeletes the resource policy attached to the CloudFront resource
delete_response_headers_policyDeletes a response headers policy
delete_streaming_distributionDelete a streaming distribution
delete_trust_storeDeletes a trust store
delete_vpc_originDelete an Amazon CloudFront VPC origin
describe_connection_functionDescribes a connection function
describe_functionGets configuration information and metadata about a CloudFront function, but not the function's code
describe_key_value_storeSpecifies the key value store and its configuration
disassociate_distribution_tenant_web_aclDisassociates a distribution tenant from the WAF web ACL
disassociate_distribution_web_aclDisassociates a distribution from the WAF web ACL
get_anycast_ip_listGets an Anycast static IP list
get_cache_policyGets a cache policy, including the following metadata:
get_cache_policy_configGets a cache policy configuration
get_cloud_front_origin_access_identityGet the information about an origin access identity
get_cloud_front_origin_access_identity_configGet the configuration information about an origin access identity
get_connection_functionGets a connection function
get_connection_groupGets information about a connection group
get_connection_group_by_routing_endpointGets information about a connection group by using the endpoint that you specify
get_continuous_deployment_policyGets a continuous deployment policy, including metadata (the policy's identifier and the date and time when the policy was last modified)
get_continuous_deployment_policy_configGets configuration information about a continuous deployment policy
get_distributionGet the information about a distribution
get_distribution_configGet the configuration information about a distribution
get_distribution_tenantGets information about a distribution tenant
get_distribution_tenant_by_domainGets information about a distribution tenant by the associated domain
get_field_level_encryptionGet the field-level encryption configuration information
get_field_level_encryption_configGet the field-level encryption configuration information
get_field_level_encryption_profileGet the field-level encryption profile information
get_field_level_encryption_profile_configGet the field-level encryption profile configuration information
get_functionGets the code of a CloudFront function
get_invalidationGet the information about an invalidation
get_invalidation_for_distribution_tenantGets information about a specific invalidation for a distribution tenant
get_key_groupGets a key group, including the date and time when the key group was last modified
get_key_group_configGets a key group configuration
get_managed_certificate_detailsGets details about the CloudFront managed ACM certificate
get_monitoring_subscriptionGets information about whether additional CloudWatch metrics are enabled for the specified CloudFront distribution
get_origin_access_controlGets a CloudFront origin access control, including its unique identifier
get_origin_access_control_configGets a CloudFront origin access control configuration
get_origin_request_policyGets an origin request policy, including the following metadata:
get_origin_request_policy_configGets an origin request policy configuration
get_public_keyGets a public key
get_public_key_configGets a public key configuration
get_realtime_log_configGets a real-time log configuration
get_resource_policyRetrieves the resource policy for the specified CloudFront resource that you own and have shared
get_response_headers_policyGets a response headers policy, including metadata (the policy's identifier and the date and time when the policy was last modified)
get_response_headers_policy_configGets a response headers policy configuration
get_streaming_distributionGets information about a specified RTMP distribution, including the distribution configuration
get_streaming_distribution_configGet the configuration information about a streaming distribution
get_trust_storeGets a trust store
get_vpc_originGet the details of an Amazon CloudFront VPC origin
list_anycast_ip_listsLists your Anycast static IP lists
list_cache_policiesGets a list of cache policies
list_cloud_front_origin_access_identitiesLists origin access identities
list_conflicting_aliasesThe ListConflictingAliases API operation only supports standard distributions
list_connection_functionsLists connection functions
list_connection_groupsLists the connection groups in your Amazon Web Services account
list_continuous_deployment_policiesGets a list of the continuous deployment policies in your Amazon Web Services account
list_distributionsList CloudFront distributions
list_distributions_by_anycast_ip_list_idLists the distributions in your account that are associated with the specified AnycastIpListId
list_distributions_by_cache_policy_idGets a list of distribution IDs for distributions that have a cache behavior that's associated with the specified cache policy
list_distributions_by_connection_functionLists distributions by connection function
list_distributions_by_connection_modeLists the distributions by the connection mode that you specify
list_distributions_by_key_groupGets a list of distribution IDs for distributions that have a cache behavior that references the specified key group
list_distributions_by_origin_request_policy_idGets a list of distribution IDs for distributions that have a cache behavior that's associated with the specified origin request policy
list_distributions_by_owned_resourceLists the CloudFront distributions that are associated with the specified resource that you own
list_distributions_by_realtime_log_configGets a list of distributions that have a cache behavior that's associated with the specified real-time log configuration
list_distributions_by_response_headers_policy_idGets a list of distribution IDs for distributions that have a cache behavior that's associated with the specified response headers policy
list_distributions_by_trust_storeLists distributions by trust store
list_distributions_by_vpc_origin_idList CloudFront distributions by their VPC origin ID
list_distributions_by_web_acl_idList the distributions that are associated with a specified WAF web ACL
list_distribution_tenantsLists the distribution tenants in your Amazon Web Services account
list_distribution_tenants_by_customizationLists distribution tenants by the customization that you specify
list_domain_conflictsWe recommend that you use the ListDomainConflicts API operation to check for domain conflicts, as it supports both standard distributions and distribution tenants
list_field_level_encryption_configsList all field-level encryption configurations that have been created in CloudFront for this account
list_field_level_encryption_profilesRequest a list of field-level encryption profiles that have been created in CloudFront for this account
list_functionsGets a list of all CloudFront functions in your Amazon Web Services account
list_invalidationsLists invalidation batches
list_invalidations_for_distribution_tenantLists the invalidations for a distribution tenant
list_key_groupsGets a list of key groups
list_key_value_storesSpecifies the key value stores to list
list_origin_access_controlsGets the list of CloudFront origin access controls (OACs) in this Amazon Web Services account
list_origin_request_policiesGets a list of origin request policies
list_public_keysList all public keys that have been added to CloudFront for this account
list_realtime_log_configsGets a list of real-time log configurations
list_response_headers_policiesGets a list of response headers policies
list_streaming_distributionsList streaming distributions
list_tags_for_resourceList tags for a CloudFront resource
list_trust_storesLists trust stores
list_vpc_originsList the CloudFront VPC origins in your account
publish_connection_functionPublishes a connection function
publish_functionPublishes a CloudFront function by copying the function code from the DEVELOPMENT stage to LIVE
put_resource_policyCreates a resource control policy for a given CloudFront resource
tag_resourceAdd tags to a CloudFront resource
test_connection_functionTests a connection function
test_functionTests a CloudFront function
untag_resourceRemove tags from a CloudFront resource
update_anycast_ip_listUpdates an Anycast static IP list
update_cache_policyUpdates a cache policy configuration
update_cloud_front_origin_access_identityUpdate an origin access identity
update_connection_functionUpdates a connection function
update_connection_groupUpdates a connection group
update_continuous_deployment_policyUpdates a continuous deployment policy
update_distributionUpdates the configuration for a CloudFront distribution
update_distribution_tenantUpdates a distribution tenant
update_distribution_with_staging_configCopies the staging distribution's configuration to its corresponding primary distribution
update_domain_associationWe recommend that you use the UpdateDomainAssociation API operation to move a domain association, as it supports both standard distributions and distribution tenants
update_field_level_encryption_configUpdate a field-level encryption configuration
update_field_level_encryption_profileUpdate a field-level encryption profile
update_functionUpdates a CloudFront function
update_key_groupUpdates a key group
update_key_value_storeSpecifies the key value store to update
update_origin_access_controlUpdates a CloudFront origin access control
update_origin_request_policyUpdates an origin request policy configuration
update_public_keyUpdate public key information
update_realtime_log_configUpdates a real-time log configuration
update_response_headers_policyUpdates a response headers policy
update_streaming_distributionUpdate a streaming distribution
update_trust_storeUpdates a trust store
update_vpc_originUpdate an Amazon CloudFront VPC origin in your account
verify_dns_configurationVerify the DNS configuration for your domain names

Examples

if (FALSE) { # \dontrun{
svc <- cloudfront()
svc$associate_alias(
  Foo = 123
)
} # }