AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon CloudFront UpdateOriginRequestPolicy API operation.

Syntax

Update-CFOriginRequestPolicy
-Id <String>
-OriginRequestPolicyConfig_Comment <String>
-CookiesConfig_CookieBehavior <OriginRequestPolicyCookieBehavior>
-HeadersConfig_HeaderBehavior <OriginRequestPolicyHeaderBehavior>
-IfMatch <String>
-Cookies_Item <String[]>
-Headers_Item <String[]>
-QueryStrings_Item <String[]>
-OriginRequestPolicyConfig_Name <String>
-Cookies_Quantity <Int32>
-Headers_Quantity <Int32>
-QueryStrings_Quantity <Int32>
-QueryStringsConfig_QueryStringBehavior <OriginRequestPolicyQueryStringBehavior>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonCloudFrontConfig>

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 GetOriginRequestPolicyConfig to get the current configuration.
  2. Locally modify the fields in the origin request policy configuration that you want to update.
  3. Call UpdateOriginRequestPolicy by providing the entire origin request policy configuration, including the fields that you modified and those that you didn't.

Parameters

-ClientConfig <AmazonCloudFrontConfig>
Amazon.PowerShell.Cmdlets.CF.AmazonCloudFrontClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Cookies_Item <String[]>
A list of cookie names.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOriginRequestPolicyConfig_CookiesConfig_Cookies_Items
-Cookies_Quantity <Int32>
The number of cookie names in the Items list.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOriginRequestPolicyConfig_CookiesConfig_Cookies_Quantity
-CookiesConfig_CookieBehavior <OriginRequestPolicyCookieBehavior>
Determines whether cookies in viewer requests are included in requests that CloudFront sends to the origin. Valid values are:
  • none – No cookies in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to none, any cookies that are listed in a CachePolicyare included in origin requests.
  • whitelist – Only the cookies in viewer requests that are listed in the CookieNames type are included in requests that CloudFront sends to the origin.
  • all – All cookies in viewer requests are included in requests that CloudFront sends to the origin.
  • allExcept – All cookies in viewer requests are included in requests that CloudFront sends to the origin, except for those listed in the CookieNames type, which are not included.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOriginRequestPolicyConfig_CookiesConfig_CookieBehavior
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Headers_Item <String[]>
A list of HTTP header names.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOriginRequestPolicyConfig_HeadersConfig_Headers_Items
-Headers_Quantity <Int32>
The number of header names in the Items list.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOriginRequestPolicyConfig_HeadersConfig_Headers_Quantity
-HeadersConfig_HeaderBehavior <OriginRequestPolicyHeaderBehavior>
Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values are:
  • none – No HTTP headers in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to none, any headers that are listed in a CachePolicyare included in origin requests.
  • whitelist – Only the HTTP headers that are listed in the Headers type are included in requests that CloudFront sends to the origin.
  • allViewer – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin.
  • allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional CloudFront headers that are listed in the Headers type are included in requests that CloudFront sends to the origin. The additional headers are added by CloudFront.
  • allExcept – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin, except for those listed in the Headers type, which are not included.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOriginRequestPolicyConfig_HeadersConfig_HeaderBehavior
-Id <String>
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 GetDistributionConfig.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-IfMatch <String>
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 GetOriginRequestPolicyConfig.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-OriginRequestPolicyConfig_Comment <String>
A comment to describe the origin request policy. The comment cannot be longer than 128 characters.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-OriginRequestPolicyConfig_Name <String>
A unique name to identify the origin request policy.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the Id parameter. The -PassThru parameter is deprecated, use -Select '^Id' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-QueryStrings_Item <String[]>
A list of query string names.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOriginRequestPolicyConfig_QueryStringsConfig_QueryStrings_Items
-QueryStrings_Quantity <Int32>
The number of query string names in the Items list.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOriginRequestPolicyConfig_QueryStringsConfig_QueryStrings_Quantity
-QueryStringsConfig_QueryStringBehavior <OriginRequestPolicyQueryStringBehavior>
Determines whether any URL query strings in viewer requests are included in requests that CloudFront sends to the origin. Valid values are:
  • none – No query strings in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to none, any query strings that are listed in a CachePolicyare included in origin requests.
  • whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in requests that CloudFront sends to the origin.
  • all – All query strings in viewer requests are included in requests that CloudFront sends to the origin.
  • allExcept – All query strings in viewer requests are included in requests that CloudFront sends to the origin, except for those listed in the QueryStringNames type, which are not included.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOriginRequestPolicyConfig_QueryStringsConfig_QueryStringBehavior
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'OriginRequestPolicy'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CloudFront.Model.UpdateOriginRequestPolicyResponse). Specifying the name of a property of type Amazon.CloudFront.Model.UpdateOriginRequestPolicyResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.CloudFront.Model.OriginRequestPolicy object. The service call response (type Amazon.CloudFront.Model.UpdateOriginRequestPolicyResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z