Skip to content

Update Origin Request Policy

cloudfront_update_origin_request_policy R Documentation

Updates an origin request policy configuration

Description

Updates an origin request policy configuration.

When you update an origin request policy configuration, all the fields are updated with the values provided in the request. You cannot update some fields independent of others. To update an origin request policy configuration:

  1. Use get_origin_request_policy_config to get the current configuration.

  2. Locally modify the fields in the origin request policy configuration that you want to update.

  3. Call update_origin_request_policy by providing the entire origin request policy configuration, including the fields that you modified and those that you didn't.

Usage

cloudfront_update_origin_request_policy(OriginRequestPolicyConfig, Id,
  IfMatch)

Arguments

OriginRequestPolicyConfig

[required] An origin request policy configuration.

Id

[required] The unique identifier for the origin request policy that you are updating. The identifier is returned in a cache behavior's OriginRequestPolicyId field in the response to get_distribution_config.

IfMatch

The version of the origin request policy that you are updating. The version is returned in the origin request policy's ETag field in the response to get_origin_request_policy_config.

Value

A list with the following syntax:

list(
  OriginRequestPolicy = list(
    Id = "string",
    LastModifiedTime = as.POSIXct(
      "2015-01-01"
    ),
    OriginRequestPolicyConfig = list(
      Comment = "string",
      Name = "string",
      HeadersConfig = list(
        HeaderBehavior = "none"|"whitelist"|"allViewer"|"allViewerAndWhitelistCloudFront"|"allExcept",
        Headers = list(
          Quantity = 123,
          Items = list(
            "string"
          )
        )
      ),
      CookiesConfig = list(
        CookieBehavior = "none"|"whitelist"|"all"|"allExcept",
        Cookies = list(
          Quantity = 123,
          Items = list(
            "string"
          )
        )
      ),
      QueryStringsConfig = list(
        QueryStringBehavior = "none"|"whitelist"|"all"|"allExcept",
        QueryStrings = list(
          Quantity = 123,
          Items = list(
            "string"
          )
        )
      )
    )
  ),
  ETag = "string"
)

Request syntax

svc$update_origin_request_policy(
  OriginRequestPolicyConfig = list(
    Comment = "string",
    Name = "string",
    HeadersConfig = list(
      HeaderBehavior = "none"|"whitelist"|"allViewer"|"allViewerAndWhitelistCloudFront"|"allExcept",
      Headers = list(
        Quantity = 123,
        Items = list(
          "string"
        )
      )
    ),
    CookiesConfig = list(
      CookieBehavior = "none"|"whitelist"|"all"|"allExcept",
      Cookies = list(
        Quantity = 123,
        Items = list(
          "string"
        )
      )
    ),
    QueryStringsConfig = list(
      QueryStringBehavior = "none"|"whitelist"|"all"|"allExcept",
      QueryStrings = list(
        Quantity = 123,
        Items = list(
          "string"
        )
      )
    )
  ),
  Id = "string",
  IfMatch = "string"
)