Class CfnOriginAccessControl
Creates a new origin access control in CloudFront.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnOriginAccessControl : CfnResource, IInspectable
Syntax (vb)
Public Class CfnOriginAccessControl
Inherits CfnResource
Implements IInspectable
Remarks
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 AWS origin in the Amazon CloudFront Developer Guide .
CloudformationResource: AWS::CloudFront::OriginAccessControl
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFront;
var cfnOriginAccessControl = new CfnOriginAccessControl(this, "MyCfnOriginAccessControl", new CfnOriginAccessControlProps {
OriginAccessControlConfig = new OriginAccessControlConfigProperty {
Name = "name",
OriginAccessControlOriginType = "originAccessControlOriginType",
SigningBehavior = "signingBehavior",
SigningProtocol = "signingProtocol",
// the properties below are optional
Description = "description"
}
});
Synopsis
Constructors
CfnOriginAccessControl(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnOriginAccessControl(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnOriginAccessControl(Construct, String, ICfnOriginAccessControlProps) |
Properties
AttrId | The unique identifier of the origin access control. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
OriginAccessControlConfig | The origin access control. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnOriginAccessControl(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnOriginAccessControl(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnOriginAccessControl(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnOriginAccessControl(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnOriginAccessControl(Construct, String, ICfnOriginAccessControlProps)
public CfnOriginAccessControl(Construct scope, string id, ICfnOriginAccessControlProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnOriginAccessControlProps
Resource properties.
Properties
AttrId
The unique identifier of the origin access control.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
OriginAccessControlConfig
The origin access control.
public virtual object OriginAccessControlConfig { get; set; }
Property Value
System.Object
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>