We recommend new projects start with resources from the AWS provider.
aws-native.cloudfront.OriginAccessControl
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Creates a new origin access control in CloudFront. After you create an origin access control, you can add it to an origin in a CloudFront distribution so that CloudFront sends authenticated (signed) requests to the origin. This makes it possible to block public access to the origin, allowing viewers (users) to access the origin’s content only through CloudFront. For more information about using a CloudFront origin access control, see Restricting access to an origin in the Amazon CloudFront Developer Guide.
Create OriginAccessControl Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OriginAccessControl(name: string, args: OriginAccessControlArgs, opts?: CustomResourceOptions);
@overload
def OriginAccessControl(resource_name: str,
args: OriginAccessControlArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OriginAccessControl(resource_name: str,
opts: Optional[ResourceOptions] = None,
origin_access_control_config: Optional[OriginAccessControlConfigArgs] = None)
func NewOriginAccessControl(ctx *Context, name string, args OriginAccessControlArgs, opts ...ResourceOption) (*OriginAccessControl, error)
public OriginAccessControl(string name, OriginAccessControlArgs args, CustomResourceOptions? opts = null)
public OriginAccessControl(String name, OriginAccessControlArgs args)
public OriginAccessControl(String name, OriginAccessControlArgs args, CustomResourceOptions options)
type: aws-native:cloudfront:OriginAccessControl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. OriginAccessControlArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. OriginAccessControlArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. OriginAccessControlArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. OriginAccessControlArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. OriginAccessControlArgs - The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
OriginAccessControl Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The OriginAccessControl resource accepts the following input properties:
- Origin
Access Control Config This property is required. Pulumi.Aws Native. Cloud Front. Inputs. Origin Access Control Config - The origin access control.
- Origin
Access Control Config This property is required. OriginAccess Control Config Args - The origin access control.
- origin
Access Control Config This property is required. OriginAccess Control Config - The origin access control.
- origin
Access Control Config This property is required. OriginAccess Control Config - The origin access control.
- origin_
access_ control_ config This property is required. OriginAccess Control Config Args - The origin access control.
- origin
Access Control Config This property is required. Property Map - The origin access control.
Outputs
All input properties are implicitly available as output properties. Additionally, the OriginAccessControl resource produces the following output properties:
Supporting Types
OriginAccessControlConfig, OriginAccessControlConfigArgs
- Name
This property is required. string - A name to identify the origin access control. You can specify up to 64 characters.
- Origin
Access Control Origin Type This property is required. string - The type of origin that this origin access control is for.
- Signing
Behavior This property is required. string - Specifies which requests CloudFront signs (adds authentication information to). Specify
always
for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:always
– CloudFront signs all origin requests, overwriting theAuthorization
header from the viewer request if one exists.never
– CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.no-override
– If the viewer request doesn't contain theAuthorization
header, then CloudFront signs the origin request. If the viewer request contains theAuthorization
header, then CloudFront doesn't sign the origin request and instead passes along theAuthorization
header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
- Signing
Protocol This property is required. string - The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is
sigv4
. - Description string
- A description of the origin access control.
- Name
This property is required. string - A name to identify the origin access control. You can specify up to 64 characters.
- Origin
Access Control Origin Type This property is required. string - The type of origin that this origin access control is for.
- Signing
Behavior This property is required. string - Specifies which requests CloudFront signs (adds authentication information to). Specify
always
for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:always
– CloudFront signs all origin requests, overwriting theAuthorization
header from the viewer request if one exists.never
– CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.no-override
– If the viewer request doesn't contain theAuthorization
header, then CloudFront signs the origin request. If the viewer request contains theAuthorization
header, then CloudFront doesn't sign the origin request and instead passes along theAuthorization
header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
- Signing
Protocol This property is required. string - The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is
sigv4
. - Description string
- A description of the origin access control.
- name
This property is required. String - A name to identify the origin access control. You can specify up to 64 characters.
- origin
Access Control Origin Type This property is required. String - The type of origin that this origin access control is for.
- signing
Behavior This property is required. String - Specifies which requests CloudFront signs (adds authentication information to). Specify
always
for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:always
– CloudFront signs all origin requests, overwriting theAuthorization
header from the viewer request if one exists.never
– CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.no-override
– If the viewer request doesn't contain theAuthorization
header, then CloudFront signs the origin request. If the viewer request contains theAuthorization
header, then CloudFront doesn't sign the origin request and instead passes along theAuthorization
header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
- signing
Protocol This property is required. String - The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is
sigv4
. - description String
- A description of the origin access control.
- name
This property is required. string - A name to identify the origin access control. You can specify up to 64 characters.
- origin
Access Control Origin Type This property is required. string - The type of origin that this origin access control is for.
- signing
Behavior This property is required. string - Specifies which requests CloudFront signs (adds authentication information to). Specify
always
for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:always
– CloudFront signs all origin requests, overwriting theAuthorization
header from the viewer request if one exists.never
– CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.no-override
– If the viewer request doesn't contain theAuthorization
header, then CloudFront signs the origin request. If the viewer request contains theAuthorization
header, then CloudFront doesn't sign the origin request and instead passes along theAuthorization
header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
- signing
Protocol This property is required. string - The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is
sigv4
. - description string
- A description of the origin access control.
- name
This property is required. str - A name to identify the origin access control. You can specify up to 64 characters.
- origin_
access_ control_ origin_ type This property is required. str - The type of origin that this origin access control is for.
- signing_
behavior This property is required. str - Specifies which requests CloudFront signs (adds authentication information to). Specify
always
for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:always
– CloudFront signs all origin requests, overwriting theAuthorization
header from the viewer request if one exists.never
– CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.no-override
– If the viewer request doesn't contain theAuthorization
header, then CloudFront signs the origin request. If the viewer request contains theAuthorization
header, then CloudFront doesn't sign the origin request and instead passes along theAuthorization
header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
- signing_
protocol This property is required. str - The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is
sigv4
. - description str
- A description of the origin access control.
- name
This property is required. String - A name to identify the origin access control. You can specify up to 64 characters.
- origin
Access Control Origin Type This property is required. String - The type of origin that this origin access control is for.
- signing
Behavior This property is required. String - Specifies which requests CloudFront signs (adds authentication information to). Specify
always
for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:always
– CloudFront signs all origin requests, overwriting theAuthorization
header from the viewer request if one exists.never
– CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.no-override
– If the viewer request doesn't contain theAuthorization
header, then CloudFront signs the origin request. If the viewer request contains theAuthorization
header, then CloudFront doesn't sign the origin request and instead passes along theAuthorization
header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
- signing
Protocol This property is required. String - The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is
sigv4
. - description String
- A description of the origin access control.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.