Class BucketDeployment
BucketDeployment
populates an S3 bucket with the contents of .zip files from other S3 buckets or from local disk.
Inherited Members
Namespace: Amazon.CDK.AWS.S3.Deployment
Assembly: Amazon.CDK.AWS.S3.Deployment.dll
Syntax (csharp)
public class BucketDeployment : Construct, IConstruct, IDependable
Syntax (vb)
Public Class BucketDeployment
Inherits Construct
Implements IConstruct, IDependable
Remarks
ExampleMetadata: infused
Examples
Bucket websiteBucket;
var deployment = new BucketDeployment(this, "DeployWebsite", new BucketDeploymentProps {
Sources = new [] { Source.Asset(Join(__dirname, "my-website")) },
DestinationBucket = websiteBucket
});
new ConstructThatReadsFromTheBucket(this, "Consumer", new Dictionary<string, IBucket> {
// Use 'deployment.deployedBucket' instead of 'websiteBucket' here
{ "bucket", deployment.DeployedBucket }
});
Synopsis
Constructors
Bucket |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Bucket |
Used by jsii to construct an instance of this class from DeputyProps |
Bucket |
Properties
Deployed |
The bucket after the deployment. |
Constructors
BucketDeployment(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected BucketDeployment(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
BucketDeployment(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected BucketDeployment(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
BucketDeployment(Construct, String, IBucketDeploymentProps)
public BucketDeployment(Construct scope, string id, IBucketDeploymentProps props)
Parameters
- scope Constructs.
Construct - id System.
String - props IBucket
Deployment Props
Properties
DeployedBucket
The bucket after the deployment.
public virtual IBucket DeployedBucket { get; }
Property Value
Remarks
If you want to reference the destination bucket in another construct and make sure the
bucket deployment has happened before the next operation is started, pass the other construct
a reference to deployment.deployedBucket
.
Doing this replaces calling otherResource.node.addDependency(deployment)
.