@Generated(value="jsii-pacmak/1.71.0 (build f1f58ae)", date="2022-12-07T17:24:44.238Z") @Stability(value=Stable) public class CfnOriginAccessControl extends CfnResource implements IInspectable
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.
For an Amazon S3 origin, this makes it possible to block public access to the Amazon S3 bucket so that viewers (users) can access the content in the bucket only through CloudFront.
For more information about using a CloudFront origin access control, see Restricting access to an Amazon S3 origin in the Amazon CloudFront Developer Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudfront.*;
CfnOriginAccessControl cfnOriginAccessControl = CfnOriginAccessControl.Builder.create(this, "MyCfnOriginAccessControl")
.originAccessControlConfig(OriginAccessControlConfigProperty.builder()
.name("name")
.originAccessControlOriginType("originAccessControlOriginType")
.signingBehavior("signingBehavior")
.signingProtocol("signingProtocol")
// the properties below are optional
.description("description")
.build())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnOriginAccessControl.Builder
A fluent builder for
CfnOriginAccessControl. |
static interface |
CfnOriginAccessControl.OriginAccessControlConfigProperty
Creates a new origin access control in CloudFront.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnOriginAccessControl(Construct scope,
String id,
CfnOriginAccessControlProps props)
Create a new `AWS::CloudFront::OriginAccessControl`.
|
protected |
CfnOriginAccessControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnOriginAccessControl(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrId()
The unique identifier of the origin access control.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getOriginAccessControlConfig()
The origin access control.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setOriginAccessControlConfig(CfnOriginAccessControl.OriginAccessControlConfigProperty value)
The origin access control.
|
void |
setOriginAccessControlConfig(IResolvable value)
The origin access control.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnOriginAccessControl(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnOriginAccessControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnOriginAccessControl(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnOriginAccessControlProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrId()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public Object getOriginAccessControlConfig()
@Stability(value=Stable)
public void setOriginAccessControlConfig(@NotNull
IResolvable value)
@Stability(value=Stable)
public void setOriginAccessControlConfig(@NotNull
CfnOriginAccessControl.OriginAccessControlConfigProperty value)
Copyright © 2022. All rights reserved.