class S3ComponentData
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.S3ComponentData |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#S3ComponentData |
Java | software.amazon.awscdk.services.imagebuilder.alpha.S3ComponentData |
Python | aws_cdk.aws_imagebuilder_alpha.S3ComponentData |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป S3ComponentData |
Extends
Component
Obtainable from
Component.fromAsset(), Component.fromS3()
Helper class for S3-based component data references, containing additional permission grant methods on the S3 object.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as imagebuilder_alpha from '@aws-cdk/aws-imagebuilder-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_kms as interfaces_aws_kms } from 'aws-cdk-lib/interfaces';
declare const dockerImage: cdk.DockerImage;
declare const grantable: iam.IGrantable;
declare const keyRef: interfaces_aws_kms.IKeyRef;
declare const localBundling: cdk.ILocalBundling;
const s3ComponentData = imagebuilder_alpha.S3ComponentData.fromAsset(this, 'MyS3ComponentData', 'path', /* all optional props */ {
assetHash: 'assetHash',
assetHashType: cdk.AssetHashType.SOURCE,
bundling: {
image: dockerImage,
// the properties below are optional
bundlingFileAccess: cdk.BundlingFileAccess.VOLUME_COPY,
command: ['command'],
entrypoint: ['entrypoint'],
environment: {
environmentKey: 'environment',
},
local: localBundling,
network: 'network',
outputType: cdk.BundlingOutput.ARCHIVED,
platform: 'platform',
securityOpt: 'securityOpt',
user: 'user',
volumes: [{
containerPath: 'containerPath',
hostPath: 'hostPath',
// the properties below are optional
consistency: cdk.DockerVolumeConsistency.CONSISTENT,
}],
volumesFrom: ['volumesFrom'],
workingDirectory: 'workingDirectory',
},
deployTime: false,
displayName: 'displayName',
exclude: ['exclude'],
followSymlinks: cdk.SymlinkFollowMode.NEVER,
ignoreMode: cdk.IgnoreMode.GLOB,
readers: [grantable],
sourceKMSKey: keyRef,
});
Initializer (protected)
super(bucket: IBucket, key: string)
Parameters
- bucket
IBucket - key
string
Properties
| Name | Type | Description |
|---|---|---|
| bucket | IBucket | |
| is | boolean | Indicates that the provided component data is an S3 reference. |
| key | string | |
| value | string | The resulting inline string or S3 URL which references the component data. |
bucket
Type:
IBucket
isS3Reference
Type:
boolean
Indicates that the provided component data is an S3 reference.
key
Type:
string
value
Type:
string
The resulting inline string or S3 URL which references the component data.
Methods
| Name | Description |
|---|---|
| grant | Grant put permissions to the given grantee for the component data in S3. |
| grant | Grant read permissions to the given grantee for the component data in S3. |
grantPut(grantee)
public grantPut(grantee: IGrantable): Grant
Parameters
- grantee
IGrantableโ The principal.
Returns
Grant put permissions to the given grantee for the component data in S3.
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantableโ The principal.
Returns
Grant read permissions to the given grantee for the component data in S3.

.NET
Go
Java
Python
TypeScript (