AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi
aws.cloudfront.getOriginRequestPolicy
Explore with Pulumi AI
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.cloudfront.getOriginRequestPolicy({
name: "example-policy",
});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.get_origin_request_policy(name="example-policy")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.LookupOriginRequestPolicy(ctx, &cloudfront.LookupOriginRequestPolicyArgs{
Name: pulumi.StringRef("example-policy"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.CloudFront.GetOriginRequestPolicy.Invoke(new()
{
Name = "example-policy",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.CloudfrontFunctions;
import com.pulumi.aws.cloudfront.inputs.GetOriginRequestPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = CloudfrontFunctions.getOriginRequestPolicy(GetOriginRequestPolicyArgs.builder()
.name("example-policy")
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:cloudfront:getOriginRequestPolicy
Arguments:
name: example-policy
AWS-Managed Policies
AWS managed origin request policy names are prefixed with Managed-
:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const uaReferer = aws.cloudfront.getOriginRequestPolicy({
name: "Managed-UserAgentRefererHeaders",
});
import pulumi
import pulumi_aws as aws
ua_referer = aws.cloudfront.get_origin_request_policy(name="Managed-UserAgentRefererHeaders")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.LookupOriginRequestPolicy(ctx, &cloudfront.LookupOriginRequestPolicyArgs{
Name: pulumi.StringRef("Managed-UserAgentRefererHeaders"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var uaReferer = Aws.CloudFront.GetOriginRequestPolicy.Invoke(new()
{
Name = "Managed-UserAgentRefererHeaders",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.CloudfrontFunctions;
import com.pulumi.aws.cloudfront.inputs.GetOriginRequestPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var uaReferer = CloudfrontFunctions.getOriginRequestPolicy(GetOriginRequestPolicyArgs.builder()
.name("Managed-UserAgentRefererHeaders")
.build());
}
}
variables:
uaReferer:
fn::invoke:
Function: aws:cloudfront:getOriginRequestPolicy
Arguments:
name: Managed-UserAgentRefererHeaders
Using getOriginRequestPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getOriginRequestPolicy(args: GetOriginRequestPolicyArgs, opts?: InvokeOptions): Promise<GetOriginRequestPolicyResult>
function getOriginRequestPolicyOutput(args: GetOriginRequestPolicyOutputArgs, opts?: InvokeOptions): Output<GetOriginRequestPolicyResult>
def get_origin_request_policy(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetOriginRequestPolicyResult
def get_origin_request_policy_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOriginRequestPolicyResult]
func LookupOriginRequestPolicy(ctx *Context, args *LookupOriginRequestPolicyArgs, opts ...InvokeOption) (*LookupOriginRequestPolicyResult, error)
func LookupOriginRequestPolicyOutput(ctx *Context, args *LookupOriginRequestPolicyOutputArgs, opts ...InvokeOption) LookupOriginRequestPolicyResultOutput
> Note: This function is named LookupOriginRequestPolicy
in the Go SDK.
public static class GetOriginRequestPolicy
{
public static Task<GetOriginRequestPolicyResult> InvokeAsync(GetOriginRequestPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetOriginRequestPolicyResult> Invoke(GetOriginRequestPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetOriginRequestPolicyResult> getOriginRequestPolicy(GetOriginRequestPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:cloudfront/getOriginRequestPolicy:getOriginRequestPolicy
arguments:
# arguments dictionary
The following arguments are supported:
getOriginRequestPolicy Result
The following output properties are available:
- Comment string
- Comment to describe the origin request policy.
- List<Get
Origin Request Policy Cookies Config> - Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
- Etag string
- Current version of the origin request policy.
- Headers
Configs List<GetOrigin Request Policy Headers Config> - Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
- Query
Strings List<GetConfigs Origin Request Policy Query Strings Config> - Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
- Id string
- Name string
- Comment string
- Comment to describe the origin request policy.
- []Get
Origin Request Policy Cookies Config - Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
- Etag string
- Current version of the origin request policy.
- Headers
Configs []GetOrigin Request Policy Headers Config - Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
- Query
Strings []GetConfigs Origin Request Policy Query Strings Config - Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
- Id string
- Name string
- comment String
- Comment to describe the origin request policy.
- List<Get
Origin Request Policy Cookies Config> - Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
- etag String
- Current version of the origin request policy.
- headers
Configs List<GetOrigin Request Policy Headers Config> - Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
- query
Strings List<GetConfigs Origin Request Policy Query Strings Config> - Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
- id String
- name String
- comment string
- Comment to describe the origin request policy.
- Get
Origin Request Policy Cookies Config[] - Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
- etag string
- Current version of the origin request policy.
- headers
Configs GetOrigin Request Policy Headers Config[] - Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
- query
Strings GetConfigs Origin Request Policy Query Strings Config[] - Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
- id string
- name string
- comment str
- Comment to describe the origin request policy.
- Sequence[Get
Origin Request Policy Cookies Config] - Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
- etag str
- Current version of the origin request policy.
- headers_
configs Sequence[GetOrigin Request Policy Headers Config] - Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
- query_
strings_ Sequence[Getconfigs Origin Request Policy Query Strings Config] - Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
- id str
- name str
- comment String
- Comment to describe the origin request policy.
- List<Property Map>
- Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
- etag String
- Current version of the origin request policy.
- headers
Configs List<Property Map> - Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
- query
Strings List<Property Map>Configs - Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
- id String
- name String
Supporting Types
GetOriginRequestPolicyCookiesConfig
- String
- List<Property Map>
GetOriginRequestPolicyCookiesConfigCookie
- Items List<string>
- Items []string
- items List<String>
- items string[]
- items Sequence[str]
- items List<String>
GetOriginRequestPolicyHeadersConfig
GetOriginRequestPolicyHeadersConfigHeader
- Items List<string>
- Items []string
- items List<String>
- items string[]
- items Sequence[str]
- items List<String>
GetOriginRequestPolicyQueryStringsConfig
GetOriginRequestPolicyQueryStringsConfigQueryString
- Items List<string>
- Items []string
- items List<String>
- items string[]
- items Sequence[str]
- items List<String>
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.