Update Response Headers Policy
cloudfront_update_response_headers_policy | R Documentation |
Updates a response headers policy¶
Description¶
Updates a response headers policy.
When you update a response headers policy, the entire policy is replaced. You cannot update some policy fields independent of others. To update a response headers policy configuration:
-
Use
get_response_headers_policy_config
to get the current policy's configuration. -
Modify the fields in the response headers policy configuration that you want to update.
-
Call
update_response_headers_policy
, providing the entire response headers policy configuration, including the fields that you modified and those that you didn't.
Usage¶
cloudfront_update_response_headers_policy(ResponseHeadersPolicyConfig,
Id, IfMatch)
Arguments¶
ResponseHeadersPolicyConfig |
[required] A response headers policy configuration. |
Id |
[required] The identifier for the response headers policy that you are updating. |
IfMatch |
The version of the response headers policy that you are updating. The version is returned in the cache policy's |
Value¶
A list with the following syntax:
list(
ResponseHeadersPolicy = list(
Id = "string",
LastModifiedTime = as.POSIXct(
"2015-01-01"
),
ResponseHeadersPolicyConfig = list(
Comment = "string",
Name = "string",
CorsConfig = list(
AccessControlAllowOrigins = list(
Quantity = 123,
Items = list(
"string"
)
),
AccessControlAllowHeaders = list(
Quantity = 123,
Items = list(
"string"
)
),
AccessControlAllowMethods = list(
Quantity = 123,
Items = list(
"GET"|"POST"|"OPTIONS"|"PUT"|"DELETE"|"PATCH"|"HEAD"|"ALL"
)
),
AccessControlAllowCredentials = TRUE|FALSE,
AccessControlExposeHeaders = list(
Quantity = 123,
Items = list(
"string"
)
),
AccessControlMaxAgeSec = 123,
OriginOverride = TRUE|FALSE
),
SecurityHeadersConfig = list(
XSSProtection = list(
Override = TRUE|FALSE,
Protection = TRUE|FALSE,
ModeBlock = TRUE|FALSE,
ReportUri = "string"
),
FrameOptions = list(
Override = TRUE|FALSE,
FrameOption = "DENY"|"SAMEORIGIN"
),
ReferrerPolicy = list(
Override = TRUE|FALSE,
ReferrerPolicy = "no-referrer"|"no-referrer-when-downgrade"|"origin"|"origin-when-cross-origin"|"same-origin"|"strict-origin"|"strict-origin-when-cross-origin"|"unsafe-url"
),
ContentSecurityPolicy = list(
Override = TRUE|FALSE,
ContentSecurityPolicy = "string"
),
ContentTypeOptions = list(
Override = TRUE|FALSE
),
StrictTransportSecurity = list(
Override = TRUE|FALSE,
IncludeSubdomains = TRUE|FALSE,
Preload = TRUE|FALSE,
AccessControlMaxAgeSec = 123
)
),
ServerTimingHeadersConfig = list(
Enabled = TRUE|FALSE,
SamplingRate = 123.0
),
CustomHeadersConfig = list(
Quantity = 123,
Items = list(
list(
Header = "string",
Value = "string",
Override = TRUE|FALSE
)
)
),
RemoveHeadersConfig = list(
Quantity = 123,
Items = list(
list(
Header = "string"
)
)
)
)
),
ETag = "string"
)
Request syntax¶
svc$update_response_headers_policy(
ResponseHeadersPolicyConfig = list(
Comment = "string",
Name = "string",
CorsConfig = list(
AccessControlAllowOrigins = list(
Quantity = 123,
Items = list(
"string"
)
),
AccessControlAllowHeaders = list(
Quantity = 123,
Items = list(
"string"
)
),
AccessControlAllowMethods = list(
Quantity = 123,
Items = list(
"GET"|"POST"|"OPTIONS"|"PUT"|"DELETE"|"PATCH"|"HEAD"|"ALL"
)
),
AccessControlAllowCredentials = TRUE|FALSE,
AccessControlExposeHeaders = list(
Quantity = 123,
Items = list(
"string"
)
),
AccessControlMaxAgeSec = 123,
OriginOverride = TRUE|FALSE
),
SecurityHeadersConfig = list(
XSSProtection = list(
Override = TRUE|FALSE,
Protection = TRUE|FALSE,
ModeBlock = TRUE|FALSE,
ReportUri = "string"
),
FrameOptions = list(
Override = TRUE|FALSE,
FrameOption = "DENY"|"SAMEORIGIN"
),
ReferrerPolicy = list(
Override = TRUE|FALSE,
ReferrerPolicy = "no-referrer"|"no-referrer-when-downgrade"|"origin"|"origin-when-cross-origin"|"same-origin"|"strict-origin"|"strict-origin-when-cross-origin"|"unsafe-url"
),
ContentSecurityPolicy = list(
Override = TRUE|FALSE,
ContentSecurityPolicy = "string"
),
ContentTypeOptions = list(
Override = TRUE|FALSE
),
StrictTransportSecurity = list(
Override = TRUE|FALSE,
IncludeSubdomains = TRUE|FALSE,
Preload = TRUE|FALSE,
AccessControlMaxAgeSec = 123
)
),
ServerTimingHeadersConfig = list(
Enabled = TRUE|FALSE,
SamplingRate = 123.0
),
CustomHeadersConfig = list(
Quantity = 123,
Items = list(
list(
Header = "string",
Value = "string",
Override = TRUE|FALSE
)
)
),
RemoveHeadersConfig = list(
Quantity = 123,
Items = list(
list(
Header = "string"
)
)
)
),
Id = "string",
IfMatch = "string"
)