Documentation
¶
Overview ¶
The CDK Construct Library for AWS::S3ObjectLambda
Index ¶
- func AccessPoint_IsConstruct(x interface{}) *bool
- func AccessPoint_IsOwnedResource(construct constructs.IConstruct) *bool
- func AccessPoint_IsResource(construct constructs.IConstruct) *bool
- func AccessPoint_PROPERTY_INJECTION_ID() *string
- func NewAccessPoint_Override(a AccessPoint, scope constructs.Construct, id *string, props *AccessPointProps)
- type AccessPoint
- type AccessPointAttributes
- type AccessPointProps
- type IAccessPoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessPoint_IsConstruct ¶
func AccessPoint_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func AccessPoint_IsOwnedResource ¶
func AccessPoint_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func AccessPoint_IsResource ¶
func AccessPoint_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func AccessPoint_PROPERTY_INJECTION_ID ¶
func AccessPoint_PROPERTY_INJECTION_ID() *string
func NewAccessPoint_Override ¶
func NewAccessPoint_Override(a AccessPoint, scope constructs.Construct, id *string, props *AccessPointProps)
Experimental.
Types ¶
type AccessPoint ¶
type AccessPoint interface {
awscdk.Resource
IAccessPoint
// The ARN of the access point.
// Experimental.
AccessPointArn() *string
// The creation data of the access point.
// Experimental.
AccessPointCreationDate() *string
// The ARN of the access point.
// Experimental.
AccessPointName() *string
// Implement the `IAccessPoint.domainName` field.
// Experimental.
DomainName() *string
// The environment this resource belongs to.
//
// For resources that are created and managed in a Stack (those created by
// creating new class instances like `new Role()`, `new Bucket()`, etc.), this
// is always the same as the environment of the stack they belong to.
//
// For referenced resources (those obtained from referencing methods like
// `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
// different than the stack they were imported into.
// Experimental.
Env() *interfaces.ResourceEnvironment
// The tree node.
// Experimental.
Node() constructs.Node
// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
//
// This value will resolve to one of the following:
// - a concrete value (e.g. `"my-awesome-bucket"`)
// - `undefined`, when a name should be generated by CloudFormation
// - a concrete name generated automatically during synthesis, in
// cross-environment scenarios.
// Experimental.
PhysicalName() *string
// Implement the `IAccessPoint.regionalDomainName` field.
// Experimental.
RegionalDomainName() *string
// The ARN of the S3 access point.
// Experimental.
S3AccessPointArn() *string
// The stack in which this resource is defined.
// Experimental.
Stack() awscdk.Stack
// Apply the given removal policy to this resource.
//
// The Removal Policy controls what happens to this resource when it stops
// being managed by CloudFormation, either because you've removed it from the
// CDK application or because you've made a change that requires the resource
// to be replaced.
//
// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
// Experimental.
ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
// Experimental.
GeneratePhysicalName() *string
// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
//
// Normally, this token will resolve to `arnAttr`, but if the resource is
// referenced across environments, `arnComponents` will be used to synthesize
// a concrete ARN with the resource's physical name. Make sure to reference
// `this.physicalName` in `arnComponents`.
// Experimental.
GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
//
// Normally, this token will resolve to `nameAttr`, but if the resource is
// referenced across environments, it will be resolved to `this.physicalName`,
// which will be a concrete name.
// Experimental.
GetResourceNameAttribute(nameAttr *string) *string
// Returns a string representation of this construct.
// Experimental.
ToString() *string
// Implement the `IAccessPoint.virtualHostedUrlForObject` method.
// Experimental.
VirtualHostedUrlForObject(key *string, options *awss3.VirtualHostedStyleUrlOptions) *string
// Applies one or more mixins to this construct.
//
// Mixins are applied in order. The list of constructs is captured at the
// start of the call, so constructs added by a mixin will not be visited.
// Use multiple `with()` calls if subsequent mixins should apply to added
// constructs.
// Experimental.
With(mixins ...constructs.IMixin) constructs.IConstruct
}
An S3 object lambda access point for intercepting and transforming `GetObject` requests.
Example:
import "github.com/aws/aws-cdk-go/awscdk"
import s3 "github.com/aws/aws-cdk-go/awscdk"
import s3objectlambda "github.com/aws/aws-cdk-go/awscdks3objectlambdaalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"
stack := cdk.NewStack()
bucket := s3.NewBucket(stack, jsii.String("MyBucket"))
handler := lambda.NewFunction(stack, jsii.String("MyFunction"), &FunctionProps{
Runtime: lambda.Runtime_NODEJS_LATEST(),
Handler: jsii.String("index.handler"),
Code: lambda.Code_FromAsset(jsii.String("lambda.zip")),
})
s3objectlambda.NewAccessPoint(stack, jsii.String("MyObjectLambda"), &AccessPointProps{
Bucket: Bucket,
Handler: Handler,
AccessPointName: jsii.String("my-access-point"),
Payload: map[string]interface{}{
"prop": jsii.String("value"),
},
})
Experimental.
func NewAccessPoint ¶
func NewAccessPoint(scope constructs.Construct, id *string, props *AccessPointProps) AccessPoint
Experimental.
type AccessPointAttributes ¶
type AccessPointAttributes struct {
// The ARN of the access point.
// Experimental.
AccessPointArn *string `field:"required" json:"accessPointArn" yaml:"accessPointArn"`
// The creation data of the access point.
// Experimental.
AccessPointCreationDate *string `field:"required" json:"accessPointCreationDate" yaml:"accessPointCreationDate"`
}
The access point resource attributes.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import s3objectlambda_alpha "github.com/aws/aws-cdk-go/awscdks3objectlambdaalpha"
accessPointAttributes := &AccessPointAttributes{
AccessPointArn: jsii.String("accessPointArn"),
AccessPointCreationDate: jsii.String("accessPointCreationDate"),
}
Experimental.
type AccessPointProps ¶
type AccessPointProps struct {
// The bucket to which this access point belongs.
// Experimental.
Bucket interfacesawss3.IBucketRef `field:"required" json:"bucket" yaml:"bucket"`
// The Lambda function used to transform objects.
// Experimental.
Handler awslambda.IFunction `field:"required" json:"handler" yaml:"handler"`
// The name of the S3 object lambda access point.
// Default: a unique name will be generated.
//
// Experimental.
AccessPointName *string `field:"optional" json:"accessPointName" yaml:"accessPointName"`
// Whether CloudWatch metrics are enabled for the access point.
// Default: false.
//
// Experimental.
CloudWatchMetricsEnabled *bool `field:"optional" json:"cloudWatchMetricsEnabled" yaml:"cloudWatchMetricsEnabled"`
// Additional JSON that provides supplemental data passed to the Lambda function on every request.
// Default: - No data.
//
// Experimental.
Payload *map[string]interface{} `field:"optional" json:"payload" yaml:"payload"`
// Whether the Lambda function can process `GetObject-PartNumber` requests.
// Default: false.
//
// Experimental.
SupportsGetObjectPartNumber *bool `field:"optional" json:"supportsGetObjectPartNumber" yaml:"supportsGetObjectPartNumber"`
// Whether the Lambda function can process `GetObject-Range` requests.
// Default: false.
//
// Experimental.
SupportsGetObjectRange *bool `field:"optional" json:"supportsGetObjectRange" yaml:"supportsGetObjectRange"`
}
The S3 object lambda access point configuration.
Example:
import "github.com/aws/aws-cdk-go/awscdk"
import s3 "github.com/aws/aws-cdk-go/awscdk"
import s3objectlambda "github.com/aws/aws-cdk-go/awscdks3objectlambdaalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"
stack := cdk.NewStack()
bucket := s3.NewBucket(stack, jsii.String("MyBucket"))
handler := lambda.NewFunction(stack, jsii.String("MyFunction"), &FunctionProps{
Runtime: lambda.Runtime_NODEJS_LATEST(),
Handler: jsii.String("index.handler"),
Code: lambda.Code_FromAsset(jsii.String("lambda.zip")),
})
s3objectlambda.NewAccessPoint(stack, jsii.String("MyObjectLambda"), &AccessPointProps{
Bucket: Bucket,
Handler: Handler,
AccessPointName: jsii.String("my-access-point"),
Payload: map[string]interface{}{
"prop": jsii.String("value"),
},
})
Experimental.
type IAccessPoint ¶
type IAccessPoint interface {
awscdk.IResource
// The virtual hosted-style URL of an S3 object through this access point.
//
// Specify `regional: false` at the options for non-regional URL.
//
// Returns: an ObjectS3Url token.
// Experimental.
VirtualHostedUrlForObject(key *string, options *awss3.VirtualHostedStyleUrlOptions) *string
// The ARN of the access point.
// Experimental.
AccessPointArn() *string
// The creation data of the access point.
// Experimental.
AccessPointCreationDate() *string
// The IPv4 DNS name of the access point.
// Experimental.
DomainName() *string
// The regional domain name of the access point.
// Experimental.
RegionalDomainName() *string
}
The interface that represents the AccessPoint resource. Experimental.
func AccessPoint_FromAccessPointAttributes ¶
func AccessPoint_FromAccessPointAttributes(scope constructs.Construct, id *string, attrs *AccessPointAttributes) IAccessPoint
Reference an existing AccessPoint defined outside of the CDK code. Experimental.