Class S3OriginAccessControl
An Origin Access Control for Amazon S3 origins.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class S3OriginAccessControl : Resource, IOriginAccessControl, IResource
Syntax (vb)
Public Class S3OriginAccessControl
Inherits Resource
Implements IOriginAccessControl, IResource
Remarks
Resource: AWS::CloudFront::OriginAccessControl
ExampleMetadata: infused
Examples
var myBucket = new Bucket(this, "myBucket");
var oac = new S3OriginAccessControl(this, "MyOAC", new S3OriginAccessControlProps {
Signing = Signing.SIGV4_NO_OVERRIDE
});
var s3Origin = S3BucketOrigin.WithOriginAccessControl(myBucket, new S3BucketOriginWithOACProps {
OriginAccessControl = oac
});
new Distribution(this, "myDist", new DistributionProps {
DefaultBehavior = new BehaviorOptions {
Origin = s3Origin
}
});
Synopsis
Constructors
S3OriginAccessControl(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
S3OriginAccessControl(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
S3OriginAccessControl(Construct, String, IS3OriginAccessControlProps) |
Properties
OriginAccessControlId | The unique identifier of this Origin Access Control. |
Methods
FromOriginAccessControlId(Construct, String, String) | Imports an S3 origin access control from its id. |
Constructors
S3OriginAccessControl(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected S3OriginAccessControl(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
S3OriginAccessControl(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected S3OriginAccessControl(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
S3OriginAccessControl(Construct, String, IS3OriginAccessControlProps)
public S3OriginAccessControl(Construct scope, string id, IS3OriginAccessControlProps props = null)
Parameters
- scope Constructs.Construct
- id System.String
- props IS3OriginAccessControlProps
Properties
OriginAccessControlId
The unique identifier of this Origin Access Control.
public virtual string OriginAccessControlId { get; }
Property Value
System.String
Remarks
Attribute: true
Methods
FromOriginAccessControlId(Construct, String, String)
Imports an S3 origin access control from its id.
public static IOriginAccessControl FromOriginAccessControlId(Construct scope, string id, string originAccessControlId)
Parameters
- scope Constructs.Construct
- id System.String
- originAccessControlId System.String
Returns
Implements
Constructs.IConstruct
Constructs.IDependable