Source
Specifies bucket deployment source.
Usage:
Source.bucket(bucketName, objectKey)
Source.asset('/local/path/to/directory')
Source.asset('/local/path/to/a/file.zip')
Source.data('hello/world/file.txt', 'Hello, world!')
Source.jsonData('config.json', { key: value })
Initializers
using AlibabaCloud.SDK.ROS.CDK.Ossdeployment;
new Source();
Name | Type | Description |
---|---|---|
Static Functions
Name | Description |
---|---|
Asset |
Uses a local file path as the source of the target bucket contents. |
Bucket |
Uses a file stored in an OSS bucket as the source for the destination bucket contents. |
Data |
Deploys an object with the specified string contents into the bucket. |
JsonData |
Deploys an object with the specified JSON object into the bucket. |
Asset
using AlibabaCloud.SDK.ROS.CDK.Ossdeployment;
Source.Asset(string Path, AssetOptions Options = null, string ObjectPrefix = null);
Uses a local file path as the source of the target bucket contents.
ROS CDK will create a temporary bucket and upload the files you want to upload to it. Make sure that the region id you specify in synth and deploy is the same region id as the destination upload bucket.
If the local asset is a .zip archive, make sure you trust the producer of the archive.
- Type: string
The path to a local file or a directory.
- Type: AlibabaCloud.SDK.ROS.CDK.Ossassets.AssetOptions
Options for the Asset.
- Type: string
The prefix of object key.
You can use it to specify the location of the object in the target bucket.
Bucket
using AlibabaCloud.SDK.ROS.CDK.Ossdeployment;
Source.Bucket(object Bucket, object ObjectKey);
Uses a file stored in an OSS bucket as the source for the destination bucket contents.
Make sure you trust the producer of the archive. The source bucket and the destination bucket must be in the same region.
- Type: object
The OSS Bucket.
- Type: object
The path of.
Data
using AlibabaCloud.SDK.ROS.CDK.Ossdeployment;
Source.Data(string ObjectKey, string Data);
Deploys an object with the specified string contents into the bucket.
To store a JSON object use Source.jsonData()
.
- Type: string
The destination OSS object key (relative to the root of the OSS deployment).
- Type: string
The data to be stored in the object.
JsonData
using AlibabaCloud.SDK.ROS.CDK.Ossdeployment;
Source.JsonData(string ObjectKey, object Obj);
Deploys an object with the specified JSON object into the bucket.
- Type: string
The destination OSS object key (relative to the root of the OSS deployment).
- Type: object
A JSON object.