AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.9.2 published on Friday, Jun 24, 2022 by Pulumi

getOriginRequestPolicy

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.CloudFront.GetOriginRequestPolicy.InvokeAsync(new Aws.CloudFront.GetOriginRequestPolicyArgs
        {
            Name = "example-policy",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(CloudfrontFunctions.getOriginRequestPolicy(GetOriginRequestPolicyArgs.builder()
            .name("example-policy")
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

example = aws.cloudfront.get_origin_request_policy(name="example-policy")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.cloudfront.getOriginRequestPolicy({
    name: "example-policy",
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:cloudfront:getOriginRequestPolicy
      Arguments:
        name: example-policy

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:

Id string

The identifier for the origin request policy.

Name string

Unique name to identify the origin request policy.

Id string

The identifier for the origin request policy.

Name string

Unique name to identify the origin request policy.

id String

The identifier for the origin request policy.

name String

Unique name to identify the origin request policy.

id string

The identifier for the origin request policy.

name string

Unique name to identify the origin request policy.

id str

The identifier for the origin request policy.

name str

Unique name to identify the origin request policy.

id String

The identifier for the origin request policy.

name String

Unique name to identify the origin request policy.

getOriginRequestPolicy Result

The following output properties are available:

Comment string

Comment to describe the origin request policy.

CookiesConfigs List<GetOriginRequestPolicyCookiesConfig>

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

The current version of the origin request policy.

HeadersConfigs List<GetOriginRequestPolicyHeadersConfig>

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.

QueryStringsConfigs List<GetOriginRequestPolicyQueryStringsConfig>

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.

CookiesConfigs []GetOriginRequestPolicyCookiesConfig

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

The current version of the origin request policy.

HeadersConfigs []GetOriginRequestPolicyHeadersConfig

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.

QueryStringsConfigs []GetOriginRequestPolicyQueryStringsConfig

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.

cookiesConfigs List<GetOriginRequestPolicyCookiesConfig>

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

The current version of the origin request policy.

headersConfigs List<GetOriginRequestPolicyHeadersConfig>

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.

queryStringsConfigs List<GetOriginRequestPolicyQueryStringsConfig>

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.

cookiesConfigs GetOriginRequestPolicyCookiesConfig[]

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

The current version of the origin request policy.

headersConfigs GetOriginRequestPolicyHeadersConfig[]

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.

queryStringsConfigs GetOriginRequestPolicyQueryStringsConfig[]

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.

cookies_configs Sequence[GetOriginRequestPolicyCookiesConfig]

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

The current version of the origin request policy.

headers_configs Sequence[GetOriginRequestPolicyHeadersConfig]

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_configs Sequence[GetOriginRequestPolicyQueryStringsConfig]

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.

cookiesConfigs 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

The current version of the origin request policy.

headersConfigs 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.

queryStringsConfigs List<Property Map>

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

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
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.